about summary refs log tree commit diff
path: root/nixosConfigurations/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixosConfigurations/default.nix')
-rw-r--r--nixosConfigurations/default.nix61
1 files changed, 36 insertions, 25 deletions
diff --git a/nixosConfigurations/default.nix b/nixosConfigurations/default.nix
index 8ebeda4..1ca634a 100644
--- a/nixosConfigurations/default.nix
+++ b/nixosConfigurations/default.nix
@@ -25,34 +25,45 @@ with lib; let
         }
         // extraSpecialArgs;
     });
+
+  mkIso = system: {
+    this = {
+      hostname = "iso";
+      inherit system;
+      isHeadless = false;
+      isHeadful = false;
+    };
+    configuration = ./iso;
+    modules = with inputs; [
+      "${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal-new-kernel.nix"
+    ];
+  };
+
+  mkTest = this: {
+    modules = with inputs; [
+      "${nixpkgs}/nixos/modules/profiles/qemu-guest.nix"
+      nixpkgs.nixosModules.notDetected
+    ];
+    inherit this;
+  };
 in
   mapAttrs' mkConfiguration {
-    # A dummy configuration to test the "headless" profile.
-    test-headless = {
-      modules = with inputs; [
-        "${nixpkgs}/nixos/modules/profiles/qemu-guest.nix"
-        nixpkgs.nixosModules.notDetected
-      ];
-      this = {
-        hostname = "test-headless";
-        system = "x86_64-linux";
-        isHeadless = true;
-        isHeadful = false;
-      };
-    };
+    # ISO images.
+    iso-arm = mkIso "aarch64-linux";
+    iso-x86 = mkIso "x86_64-linux";
 
-    # A dummy configuration to test the "headful" profile.
-    test-headful = {
-      modules = with inputs; [
-        "${nixpkgs}/nixos/modules/profiles/qemu-guest.nix"
-        nixpkgs.nixosModules.notDetected
-      ];
-      this = {
-        hostname = "test-headful";
-        system = "x86_64-linux";
-        isHeadless = false;
-        isHeadful = true;
-      };
+    # Dummy configuration test profiles.
+    test-headless = mkTest {
+      hostname = "test-headless";
+      system = "x86_64-linux";
+      isHeadless = true;
+      isHeadful = false;
+    };
+    test-headful = mkTest {
+      hostname = "test-headful";
+      system = "x86_64-linux";
+      isHeadless = false;
+      isHeadful = true;
     };
 
     # A beefy desktop: 7950x/rx6750xt/128GB.

Consider giving Nix/NixOS a try! <3