From 6ee64463a89c300cf9113cd36f0e7a968f83665c Mon Sep 17 00:00:00 2001 From: thiloho <123883702+thiloho@users.noreply.github.com> Date: Sun, 11 Aug 2024 16:54:17 +0000 Subject: [PATCH] Set hardware configuration for demo server --- nix/demo-server/hardware-configuration.nix | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 nix/demo-server/hardware-configuration.nix diff --git a/nix/demo-server/hardware-configuration.nix b/nix/demo-server/hardware-configuration.nix new file mode 100644 index 0000000..dd3e37d --- /dev/null +++ b/nix/demo-server/hardware-configuration.nix @@ -0,0 +1,39 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/profiles/qemu-guest.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "virtio_scsi" "sr_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/af7c3a41-3427-4354-8bf5-bd98698792c5"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/BA3C-CCAF"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/a58e9054-0b76-4da5-ae13-0d73515ec41e"; } + ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp1s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux"; +}