about summary refs log tree commit diff
path: root/nixosConfigurations/default.nix
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2022-12-17 20:35:36 +0300
committerAzat Bahawi <azat@bahawi.net>2022-12-17 20:35:36 +0300
commit313e18cb6119d4b03580d8d34fbec0c78bca872c (patch)
tree7d3f9583af9422c80fe20ae1dd1747e6b2c9b9a5 /nixosConfigurations/default.nix
parent2022-12-17 (diff)
2022-12-17
Diffstat (limited to '')
-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