From ab779a7476acc3a5b6dc350badd67f72f9402d6e Mon Sep 17 00:00:00 2001 From: Quentin Aristote Date: Sun, 13 Nov 2022 21:55:15 +0100 Subject: remove hardware configuration from test config --- config/default.nix | 1 - config/hardware-configuration.nix | 27 --------------------------- flake.nix | 2 +- hardware-configuration.nix | 27 +++++++++++++++++++++++++++ tests/configuration.nix | 4 +++- 5 files changed, 31 insertions(+), 30 deletions(-) delete mode 100644 config/hardware-configuration.nix create mode 100644 hardware-configuration.nix diff --git a/config/default.nix b/config/default.nix index 9cb4668..b35ce72 100644 --- a/config/default.nix +++ b/config/default.nix @@ -6,7 +6,6 @@ (modulesPath + "/profiles/minimal.nix") ./boot.nix ./environment.nix - ./hardware-configuration.nix ./networking.nix ./services ./users.nix diff --git a/config/hardware-configuration.nix b/config/hardware-configuration.nix deleted file mode 100644 index 1b79e6f..0000000 --- a/config/hardware-configuration.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ pkgs, lib, modulesPath, ... }: - -{ - imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; - - boot.initrd.availableKernelModules = - [ "ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-amd" ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = { - device = "/dev/disk/by-uuid/2b302948-5608-41c6-b54c-1c0e39ff6a58"; - fsType = "ext4"; - }; - - boot.initrd.luks.devices."root".device = - "/dev/disk/by-uuid/eaec758b-ba22-42ab-8992-e765cec9be55"; - - fileSystems."/boot" = { - device = "/dev/disk/by-uuid/74d78eba-c29a-4724-8fb7-624e0a03faa5"; - fsType = "ext4"; - }; - - swapDevices = [{ device = "/swap"; }]; - -} diff --git a/flake.nix b/flake.nix index d02d308..6ca1663 100644 --- a/flake.nix +++ b/flake.nix @@ -9,7 +9,7 @@ hermes = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = attrs; - modules = [ ./configuration.nix ]; + modules = [ ./configuration.nix ./hardware-configuration.nix ]; }; hermes-test = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; diff --git a/hardware-configuration.nix b/hardware-configuration.nix new file mode 100644 index 0000000..1b79e6f --- /dev/null +++ b/hardware-configuration.nix @@ -0,0 +1,27 @@ +{ pkgs, lib, modulesPath, ... }: + +{ + imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; + + boot.initrd.availableKernelModules = + [ "ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = { + device = "/dev/disk/by-uuid/2b302948-5608-41c6-b54c-1c0e39ff6a58"; + fsType = "ext4"; + }; + + boot.initrd.luks.devices."root".device = + "/dev/disk/by-uuid/eaec758b-ba22-42ab-8992-e765cec9be55"; + + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/74d78eba-c29a-4724-8fb7-624e0a03faa5"; + fsType = "ext4"; + }; + + swapDevices = [{ device = "/swap"; }]; + +} diff --git a/tests/configuration.nix b/tests/configuration.nix index e878c12..73c4bfa 100644 --- a/tests/configuration.nix +++ b/tests/configuration.nix @@ -1,4 +1,4 @@ -{ config, lib, ... }: +{ config, lib, modulesPath, ... }: let nginxPorts = lib.concatLists @@ -15,6 +15,8 @@ let in { imports = [ ../configuration.nix ]; + boot.isContainer = true; + networking = lib.mkForce { domain = "aristote.vm"; -- cgit v1.2.3