about summary refs log tree commit diff stats
path: root/nix-conf/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nix-conf/flake.nix')
-rw-r--r--nix-conf/flake.nix111
1 files changed, 79 insertions, 32 deletions
diff --git a/nix-conf/flake.nix b/nix-conf/flake.nix
index c674c80..ad2dee9 100644
--- a/nix-conf/flake.nix
+++ b/nix-conf/flake.nix
@@ -41,7 +41,7 @@
       darwin-system = "aarch64-darwin";
       linux-system = "x86_64-linux";
       linux-arm-system = "aarch64-linux";
-      darwin-pkgs = nixpkgs-stable.legacyPackages.${darwin-system};
+      darwin-pkgs = nixpkgs.legacyPackages.${darwin-system};
       linux-pkgs = nixpkgs-stable.legacyPackages.${linux-system};
       linux-arm-pkgs = nixpkgs-stable.legacyPackages.${linux-arm-system};
       darwin-overlay-unstable = final: prev: {
@@ -53,18 +53,68 @@
       linux-arm-overlay-unstable = final: prev: {
         unstable = nixpkgs.legacyPackages.${linux-arm-system};
       };
-      nixpkgs-config = {
-        allowUnfreePredicate = pkg: builtins.elem (nixpkgs.lib.getName pkg) [ "aspell-dict-en-science" ];
-      };
     in
     {
+      nixosConfigurations."egalmoth" = nixpkgs-stable.lib.nixosSystem {
+        system = linux-system;
+        modules = [
+          (
+            { config, pkgs, ... }:
+            {
+              nixpkgs.overlays = [ linux-overlay-unstable ];
+            }
+          )
+          ./config.nix
+          ./machines/egalmoth/configuration.nix
+        ];
+      };
+      nixosConfigurations."edrahil" = nixpkgs-stable.lib.nixosSystem {
+        system = linux-system;
+        modules = [
+          (
+            { config, pkgs, ... }:
+            {
+              nixpkgs.overlays = [ linux-overlay-unstable ];
+            }
+          )
+          ./config.nix
+          ./machines/edrahil/configuration.nix
+          sops-nix.nixosModules.sops
+        ];
+      };
+      nixosConfigurations."djmuk1" = nixpkgs-stable.lib.nixosSystem {
+        system = linux-system;
+        modules = [
+          (
+            { config, pkgs, ... }:
+            {
+              nixpkgs.overlays = [ linux-overlay-unstable ];
+            }
+          )
+          ./config.nix
+          ./machines/djmuk1/configuration.nix
+        ];
+      };
+      nixosConfigurations."djmuk2" = nixpkgs-stable.lib.nixosSystem {
+        system = linux-arm-system;
+        modules = [
+          (
+            { config, pkgs, ... }:
+            {
+              nixpkgs.overlays = [ linux-arm-overlay-unstable ];
+            }
+          )
+          ./config.nix
+          ./machines/djmuk2/configuration.nix
+        ];
+      };
+
       darwinConfigurations."LDN-DMORGAN" = nix-darwin.lib.darwinSystem {
         modules = [
           # TODO move to separate file
           (
             { pkgs, ... }:
             {
-              nix.settings.experimental-features = "nix-command flakes";
               nix.settings.trusted-users = [
                 "dmorgan"
                 "@staff"
@@ -75,8 +125,14 @@
               #system.primaryUser = "dmorgan"; # required to update com.apple.symbolichotkeys
               system.keyboard.enableKeyMapping = true;
               system.keyboard.userKeyMapping = [
-                { HIDKeyboardModifierMappingSrc = 30064771296; HIDKeyboardModifierMappingDst = 30064771299; }
-                { HIDKeyboardModifierMappingSrc = 30064771299; HIDKeyboardModifierMappingDst = 30064771296; }
+                {
+                  HIDKeyboardModifierMappingSrc = 30064771296;
+                  HIDKeyboardModifierMappingDst = 30064771299;
+                }
+                {
+                  HIDKeyboardModifierMappingSrc = 30064771299;
+                  HIDKeyboardModifierMappingDst = 30064771296;
+                }
               ];
               #system.defaults.CustomUserPreferences = {
               #  "com.apple.symbolichotkeys" = {
@@ -100,28 +156,23 @@
               ];
             }
           )
-          # TODO remove or re-enable?
-          #home-manager.darwinModules.home-manager
-          #{
-          #  nixpkgs.overlays = [ darwin-overlay-unstable ];
-          #  nixpkgs.config = nixpkgs-config;
-          #  home-manager = {
-          #    useGlobalPkgs = true;
-          #    useUserPackages = true;
-          #    extraSpecialArgs = {
-          #      inherit inputs;
-          #      system = darwin-system;
-          #    };
-          #    users.dmorgan = ./home/otm.nix;
-          #  };
-          #}
+          ./config.nix
         ];
       };
       homeConfigurations."dmorgan@LDN-DMORGAN" = home-manager.lib.homeManagerConfiguration {
         pkgs = darwin-pkgs;
-        extraSpecialArgs = { inherit inputs; system = darwin-system; };
+        extraSpecialArgs = {
+          inherit inputs;
+          system = darwin-system;
+        };
         modules = [
-          ({ config, pkgs, ...  }: { nixpkgs.overlays = [ darwin-overlay-unstable ]; nixpkgs.config = nixpkgs-config; nix.package = pkgs.nix; })
+          (
+            { config, pkgs, ... }:
+            {
+              nixpkgs.overlays = [ darwin-overlay-unstable ];
+            }
+          )
+          ./config.nix
           ./home/otm.nix
         ];
       };
@@ -135,11 +186,10 @@
           (
             { config, pkgs, ... }:
             {
-              nix.package = pkgs.nix;
               nixpkgs.overlays = [ linux-overlay-unstable ];
-              nixpkgs.config = nixpkgs-config;
             }
           )
+          ./config.nix
           ./home/egalmoth.nix
         ];
       };
@@ -153,11 +203,10 @@
           (
             { config, pkgs, ... }:
             {
-              nix.package = pkgs.nix;
               nixpkgs.overlays = [ linux-overlay-unstable ];
-              nixpkgs.config = nixpkgs-config;
             }
           )
+          ./config.nix
           ./home/edrahil.nix
         ];
       };
@@ -171,11 +220,10 @@
           (
             { config, pkgs, ... }:
             {
-              nix.package = pkgs.nix;
               nixpkgs.overlays = [ linux-overlay-unstable ];
-              nixpkgs.config = nixpkgs-config;
             }
           )
+          ./config.nix
           ./home/djmuk1.nix
         ];
       };
@@ -189,11 +237,10 @@
           (
             { config, pkgs, ... }:
             {
-              nix.package = pkgs.nix;
               nixpkgs.overlays = [ linux-arm-overlay-unstable ];
-              nixpkgs.config = nixpkgs-config;
             }
           )
+          ./config.nix
           ./home/djmuk2.nix
         ];
       };