diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-12-25 18:25:51 +0100 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-12-25 18:25:51 +0100 |
commit | d9ab6c7ea59d29af3ae8c29c7367fe0e8808f5db (patch) | |
tree | 4076dca44feeb7fccf90af3f9c9cc6e73b845c6f /hosts/by-name/server2/hardware.nix | |
parent | fix(treewide): Add constant uids and gids to each user and group (diff) | |
download | nixos-server-d9ab6c7ea59d29af3ae8c29c7367fe0e8808f5db.tar.gz nixos-server-d9ab6c7ea59d29af3ae8c29c7367fe0e8808f5db.zip |
refactor(hosts): Use a `by-name` structure and construct all host depended values
This allows us to outsource the host-handling from the `flake.nix` file.
Diffstat (limited to 'hosts/by-name/server2/hardware.nix')
-rw-r--r-- | hosts/by-name/server2/hardware.nix | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/hosts/by-name/server2/hardware.nix b/hosts/by-name/server2/hardware.nix new file mode 100644 index 0000000..a6e4e40 --- /dev/null +++ b/hosts/by-name/server2/hardware.nix @@ -0,0 +1,15 @@ +{modulesPath, ...}: { + imports = [ + (modulesPath + "/profiles/qemu-guest.nix") + (modulesPath + "/profiles/headless.nix") + ]; + + vhack.disko = { + enable = true; + # FIXME: Find a better way to specify the disk + disk = "/dev/vda"; + }; + + boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk"]; + nixpkgs.hostPlatform = "x86_64-linux"; +} |