diff --git a/.config/nix/systems/darwin/configuration.nix b/.config/nix/systems/darwin/configuration.nix index 9c35dc6..036aa8a 100644 --- a/.config/nix/systems/darwin/configuration.nix +++ b/.config/nix/systems/darwin/configuration.nix @@ -1,4 +1,4 @@ -{ pkgs, config, vars, ... }: +{ pkgs, config, vars, common, ... }: { # I don't want to risk breaking my hackintosh setup in case Apple decided to @@ -15,8 +15,7 @@ py.dnspython ])); in - [ - pkgs.zsh + common.packages ++ [ pkgs.git pkgs.vim pkgs.neovim diff --git a/.config/nix/systems/darwin/default.nix b/.config/nix/systems/darwin/default.nix index 39bf514..daff59a 100644 --- a/.config/nix/systems/darwin/default.nix +++ b/.config/nix/systems/darwin/default.nix @@ -25,6 +25,7 @@ let config.allowUnfree = true; }; }; + mkCommon = import ../mkCommon.nix; in { # Host list @@ -36,10 +37,11 @@ in "ThiccBook-Pro" = let inherit (systemConfig "x86_64-darwin") system pkgs; + common = (mkCommon pkgs); in nix-darwin.lib.darwinSystem { inherit system; - specialArgs = { inherit inputs pkgs home-manager vars; }; + specialArgs = { inherit inputs pkgs home-manager vars common; }; modules = [ ./configuration.nix home-manager.darwinModules.home-manager @@ -54,6 +56,7 @@ in MacBookProM1 = let inherit (systemConfig "aarch64-darwin") system pkgs; + vars.common = (mkCommon pkgs); in nix-darwin.lib.darwinSystem { inherit system; diff --git a/.config/nix/systems/mkCommon.nix b/.config/nix/systems/mkCommon.nix new file mode 100644 index 0000000..57912e9 --- /dev/null +++ b/.config/nix/systems/mkCommon.nix @@ -0,0 +1,7 @@ +{ pkgs, ... }: + +{ + packages = [ + pkgs.zsh + ]; +} diff --git a/.config/nix/systems/nix/configuration.nix b/.config/nix/systems/nix/configuration.nix index 8481e18..400bb79 100644 --- a/.config/nix/systems/nix/configuration.nix +++ b/.config/nix/systems/nix/configuration.nix @@ -1,4 +1,4 @@ -{ pkgs, config, vars, ... }: +{ pkgs, config, vars, common, ... }: { # NOTE: List packages installed in system profile. To search by name, run: @@ -11,7 +11,7 @@ py.dnspython ])); in - [ + common.packages ++ [ pkgs.zsh pkgs.git pkgs.vim diff --git a/.config/nix/systems/nix/default.nix b/.config/nix/systems/nix/default.nix index ba02d84..170c869 100644 --- a/.config/nix/systems/nix/default.nix +++ b/.config/nix/systems/nix/default.nix @@ -25,15 +25,17 @@ let config.allowUnfree = true; }; }; + mkCommon = import ../mkCommon.nix; in { "potato" = let inherit (systemConfig "x86_64-linux") system pkgs; + common = (mkCommon pkgs); in system-manager.lib.makeSystemConfig { inherit system; - specialArgs = { inherit inputs pkgs home-manager vars; }; + specialArgs = { inherit inputs pkgs home-manager vars common; }; modules = [ ./configuration.nix # home-manager.darwinModules.home-manager