diff --git a/nixos/machines/nyarlathotep/boot.nix b/nixos/machines/nyarlathotep/boot.nix deleted file mode 100644 index 745f410..0000000 --- a/nixos/machines/nyarlathotep/boot.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ - imports = [ ]; - boot.loader.grub = { - device = "nodev"; - enable = true; - }; -} - diff --git a/nixos/machines/nyarlathotep/configuration.nix b/nixos/machines/nyarlathotep/configuration.nix index 1a0e12a..05616fa 100644 --- a/nixos/machines/nyarlathotep/configuration.nix +++ b/nixos/machines/nyarlathotep/configuration.nix @@ -5,7 +5,7 @@ imports = [ ./hardware-configuration.nix (import ./mail.nix flake-inputs) ../../roles - ./boot.nix + ../../roles/xen_guest.nix ./network.nix ]; diff --git a/nixos/machines/nyarlathotep/hardware-configuration.nix b/nixos/machines/nyarlathotep/hardware-configuration.nix index 81be995..d75ae28 100644 --- a/nixos/machines/nyarlathotep/hardware-configuration.nix +++ b/nixos/machines/nyarlathotep/hardware-configuration.nix @@ -1,11 +1,6 @@ {config, lib, pkgs, modulesPath, ...}: { imports = [ ]; - boot.initrd.availableKernelModules = - [ "ata_piix" "sr_mod" "xen_blkfront" ]; - boot.kernelModules = [ ]; - boot.extraModulePackages = [ ]; - fileSystems."/" = { device = "/dev/disk/by-uuid/a72da670-f631-49b1-bcb3-6d378cc1f2d0"; fsType = "ext4"; diff --git a/nixos/roles/xen_guest.nix b/nixos/roles/xen_guest.nix new file mode 100644 index 0000000..9c9ee32 --- /dev/null +++ b/nixos/roles/xen_guest.nix @@ -0,0 +1,15 @@ +{...}: { + imports = [ ]; + boot = { + loader.grub = { + device = "nodev"; + enable = true; + }; + initrd = { + availableKernelModules = [ "ata_piix" "sr_mod" "xen_blkfront" ]; + kernelModules = [ ]; + }; + extraModulePackages = [ ]; + }; +} +