about summary refs log tree commit diff
path: root/nixosConfigurations/default.nix
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--nixosConfigurations/default.nix129
1 files changed, 66 insertions, 63 deletions
diff --git a/nixosConfigurations/default.nix b/nixosConfigurations/default.nix
index b2e1511..1f0d78c 100644
--- a/nixosConfigurations/default.nix
+++ b/nixosConfigurations/default.nix
@@ -1,14 +1,17 @@
 inputs:
-with inputs.self.lib; let
-  mkConfiguration = name: {
-    modules ? [],
-    configuration ? ./${name},
-    this ? my.configurations.${name},
-    extraSpecialArgs ? {
-      localUsername = my.username;
-      localHostname = this.hostname;
-    },
-  }:
+with inputs.self.lib;
+let
+  mkConfiguration =
+    name:
+    {
+      modules ? [ ],
+      configuration ? ./${name},
+      this ? my.configurations.${name},
+      extraSpecialArgs ? {
+        localUsername = my.username;
+        localHostname = this.hostname;
+      },
+    }:
     nameValuePair name (nixosSystem {
       inherit (this) system;
       modules =
@@ -16,12 +19,10 @@ with inputs.self.lib; let
         ++ attrValues inputs.self.modules
         ++ attrValues inputs.self.nixosModules
         ++ optional (configuration != null) (import configuration);
-      specialArgs =
-        {
-          inherit inputs this;
-          inherit (inputs.self) lib;
-        }
-        // extraSpecialArgs;
+      specialArgs = {
+        inherit inputs this;
+        inherit (inputs.self) lib;
+      } // extraSpecialArgs;
     });
 
   mkIso = system: {
@@ -32,7 +33,9 @@ with inputs.self.lib; let
       isHeadful = false;
     };
     configuration = ./iso;
-    modules = ["${inputs.nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal-new-kernel.nix"];
+    modules = [
+      "${inputs.nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal-new-kernel.nix"
+    ];
   };
 
   mkTest = this: {
@@ -43,55 +46,55 @@ with inputs.self.lib; let
     inherit this;
   };
 in
-  mapAttrs' mkConfiguration {
-    iso-arm = mkIso "aarch64-linux";
-    iso-x86 = mkIso "x86_64-linux";
+mapAttrs' mkConfiguration {
+  iso-arm = mkIso "aarch64-linux";
+  iso-x86 = mkIso "x86_64-linux";
 
-    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;
-    };
+  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;
+  };
 
-    eonwe.modules = with inputs; [
-      nixos-hardware.nixosModules.common-cpu-amd
-      nixos-hardware.nixosModules.common-cpu-amd-pstate
-      nixos-hardware.nixosModules.common-gpu-amd
-      nixos-hardware.nixosModules.common-pc-ssd
-      nixpkgs.nixosModules.notDetected
-    ];
+  eonwe.modules = with inputs; [
+    nixos-hardware.nixosModules.common-cpu-amd
+    nixos-hardware.nixosModules.common-cpu-amd-pstate
+    nixos-hardware.nixosModules.common-gpu-amd
+    nixos-hardware.nixosModules.common-pc-ssd
+    nixpkgs.nixosModules.notDetected
+  ];
 
-    melian.modules = with inputs; [
-      nixos-hardware.nixosModules.common-pc-laptop-ssd
-      nixos-hardware.nixosModules.lenovo-thinkpad-t480
-      nixpkgs.nixosModules.notDetected
-    ];
+  melian.modules = with inputs; [
+    nixos-hardware.nixosModules.common-pc-laptop-ssd
+    nixos-hardware.nixosModules.lenovo-thinkpad-t480
+    nixpkgs.nixosModules.notDetected
+  ];
 
-    manwe.modules = with inputs; [
-      "${nixpkgs}/nixos/modules/profiles/qemu-guest.nix"
-      nixos-hardware.nixosModules.common-cpu-amd
-      nixos-hardware.nixosModules.common-pc-ssd
-      nixpkgs.nixosModules.notDetected
-    ];
+  manwe.modules = with inputs; [
+    "${nixpkgs}/nixos/modules/profiles/qemu-guest.nix"
+    nixos-hardware.nixosModules.common-cpu-amd
+    nixos-hardware.nixosModules.common-pc-ssd
+    nixpkgs.nixosModules.notDetected
+  ];
 
-    varda.modules = with inputs; [
-      "${nixpkgs}/nixos/modules/profiles/qemu-guest.nix"
-      nixos-hardware.nixosModules.common-cpu-amd
-      nixos-hardware.nixosModules.common-pc-ssd
-      nixpkgs.nixosModules.notDetected
-    ];
+  varda.modules = with inputs; [
+    "${nixpkgs}/nixos/modules/profiles/qemu-guest.nix"
+    nixos-hardware.nixosModules.common-cpu-amd
+    nixos-hardware.nixosModules.common-pc-ssd
+    nixpkgs.nixosModules.notDetected
+  ];
 
-    yavanna.modules = with inputs; [
-      "${nixpkgs}/nixos/modules/profiles/qemu-guest.nix"
-      nixos-hardware.nixosModules.common-cpu-intel
-      nixos-hardware.nixosModules.common-pc-hdd
-      nixpkgs.nixosModules.notDetected
-    ];
-  }
+  yavanna.modules = with inputs; [
+    "${nixpkgs}/nixos/modules/profiles/qemu-guest.nix"
+    nixos-hardware.nixosModules.common-cpu-intel
+    nixos-hardware.nixosModules.common-pc-hdd
+    nixpkgs.nixosModules.notDetected
+  ];
+}

Consider giving Nix/NixOS a try! <3