about summary refs log tree commit diff stats
path: root/flake/nixosConfigurations
diff options
context:
space:
mode:
authorene <ene@sils.li>2023-02-20 11:08:02 +0100
committerene <ene@sils.li>2023-02-20 11:08:02 +0100
commitde1fc0cd2f87a53037b266a1e901a7413acc9c27 (patch)
treef7a8229754981e860aa523704c8c13e7e9048fd6 /flake/nixosConfigurations
parentFix(hosts): Use correct names and add mammun (diff)
downloadnixos-config-de1fc0cd2f87a53037b266a1e901a7413acc9c27.tar.gz
nixos-config-de1fc0cd2f87a53037b266a1e901a7413acc9c27.zip
Fix(flake): Make the addition output file better
Diffstat (limited to 'flake/nixosConfigurations')
-rw-r--r--flake/nixosConfigurations/default.nix79
1 files changed, 48 insertions, 31 deletions
diff --git a/flake/nixosConfigurations/default.nix b/flake/nixosConfigurations/default.nix
index 562222b7..d10d2570 100644
--- a/flake/nixosConfigurations/default.nix
+++ b/flake/nixosConfigurations/default.nix
@@ -1,47 +1,64 @@
+# vim: ts=2
 {
   inputs,
   system,
   pkgs,
   sysLib,
   ...
-}: {
+}: let
+  homeManagerConfig = {
+    home-manager = {
+      useGlobalPkgs = true;
+      useUserPackages = true;
+      users.soispha = import ../../home-manager;
+      extraSpecialArgs = {
+        inherit
+          pkgs
+          sysLib
+          ;
+
+        inherit
+          (inputs)
+          strip_js_comments
+          user_js
+          system
+          neovim_config
+          impermanence
+          snap-sync
+          ;
+      };
+    };
+  };
+  defaultModules = [
+    inputs.agenix.nixosModules.default
+
+    inputs.home-manager.nixosModules.home-manager
+    homeManagerConfig
+  ];
+in {
   tiamat = inputs.nixpkgs.lib.nixosSystem {
     inherit system;
     specialArgs =
       pkgs.lib.recursiveUpdate inputs
       sysLib;
-    modules = [
-      ../../hosts/tiamat/configuration.nix
-      inputs.agenix.nixosModules.default
-
-      inputs.home-manager.nixosModules.home-manager
-      {
-        home-manager = {
-          useGlobalPkgs = true;
-          useUserPackages = true;
-          users.soispha = import ../../home-manager;
-          extraSpecialArgs = {
-            inherit
-              pkgs
-              sysLib
-              ;
-
-            inherit
-              (inputs)
-              strip_js_comments
-              user_js
-              system
-              neovim_config
-              impermanence
-              snap-sync
-              ;
-          };
-        };
-      }
-    ];
+    modules =
+      [
+        ../../hosts/tiamat/configuration.nix
+      ]
+      ++ defaultModules;
   };
 
-# mammun = self.outputs.nixosConfigurations.tiamat;
+  mammun = inputs.nixpkgs.lib.nixosSystem {
+    inherit system;
+    specialArgs =
+      pkgs.lib.recursiveUpdate inputs
+      sysLib;
+    modules =
+      [
+        ../../hosts/mammun/configuration.nix
+      ]
+      ++ defaultModules;
+  };
   spawn = inputs.nixpkgs.lib.nixosSystem {
     specialArgs = inputs;
     modules = [../../hosts/spawn/configuration.nix];