summary refs log tree commit diff stats
path: root/hosts/by-name/server1/hardware.nix
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-12-25 18:25:51 +0100
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-12-25 18:25:51 +0100
commitd9ab6c7ea59d29af3ae8c29c7367fe0e8808f5db (patch)
tree4076dca44feeb7fccf90af3f9c9cc6e73b845c6f /hosts/by-name/server1/hardware.nix
parentfix(treewide): Add constant uids and gids to each user and group (diff)
downloadnixos-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/server1/hardware.nix')
-rw-r--r--hosts/by-name/server1/hardware.nix14
1 files changed, 14 insertions, 0 deletions
diff --git a/hosts/by-name/server1/hardware.nix b/hosts/by-name/server1/hardware.nix
new file mode 100644
index 0000000..9abc64c
--- /dev/null
+++ b/hosts/by-name/server1/hardware.nix
@@ -0,0 +1,14 @@
+{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"];
+  boot.initrd.kernelModules = [];
+}