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.nix87
1 files changed, 52 insertions, 35 deletions
diff --git a/nix-conf/flake.nix b/nix-conf/flake.nix
index cea1afe..ad2dee9 100644
--- a/nix-conf/flake.nix
+++ b/nix-conf/flake.nix
@@ -53,22 +53,31 @@
       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 ]; nix.settings.experimental-features = "nix-command flakes"; })
+          (
+            { 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 ]; nix.settings.experimental-features = "nix-command flakes"; })
+          (
+            { config, pkgs, ... }:
+            {
+              nixpkgs.overlays = [ linux-overlay-unstable ];
+            }
+          )
+          ./config.nix
           ./machines/edrahil/configuration.nix
           sops-nix.nixosModules.sops
         ];
@@ -76,14 +85,26 @@
       nixosConfigurations."djmuk1" = nixpkgs-stable.lib.nixosSystem {
         system = linux-system;
         modules = [
-          ({ config, pkgs, ... }: { nixpkgs.overlays = [ linux-overlay-unstable ]; nix.settings.experimental-features = "nix-command flakes"; })
+          (
+            { 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 ]; nix.settings.experimental-features = "nix-command flakes"; })
+          (
+            { config, pkgs, ... }:
+            {
+              nixpkgs.overlays = [ linux-arm-overlay-unstable ];
+            }
+          )
+          ./config.nix
           ./machines/djmuk2/configuration.nix
         ];
       };
@@ -94,7 +115,6 @@
           (
             { pkgs, ... }:
             {
-              nix.settings.experimental-features = "nix-command flakes";
               nix.settings.trusted-users = [
                 "dmorgan"
                 "@staff"
@@ -105,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" = {
@@ -130,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
         ];
       };
@@ -165,11 +186,10 @@
           (
             { config, pkgs, ... }:
             {
-              nix.package = pkgs.nix;
               nixpkgs.overlays = [ linux-overlay-unstable ];
-              nixpkgs.config = nixpkgs-config;
             }
           )
+          ./config.nix
           ./home/egalmoth.nix
         ];
       };
@@ -183,11 +203,10 @@
           (
             { config, pkgs, ... }:
             {
-              nix.package = pkgs.nix;
               nixpkgs.overlays = [ linux-overlay-unstable ];
-              nixpkgs.config = nixpkgs-config;
             }
           )
+          ./config.nix
           ./home/edrahil.nix
         ];
       };
@@ -201,11 +220,10 @@
           (
             { config, pkgs, ... }:
             {
-              nix.package = pkgs.nix;
               nixpkgs.overlays = [ linux-overlay-unstable ];
-              nixpkgs.config = nixpkgs-config;
             }
           )
+          ./config.nix
           ./home/djmuk1.nix
         ];
       };
@@ -219,11 +237,10 @@
           (
             { config, pkgs, ... }:
             {
-              nix.package = pkgs.nix;
               nixpkgs.overlays = [ linux-arm-overlay-unstable ];
-              nixpkgs.config = nixpkgs-config;
             }
           )
+          ./config.nix
           ./home/djmuk2.nix
         ];
       };