diff --git a/darwin/default.nix b/darwin/default.nix index e6dadbc..5d78465 100644 --- a/darwin/default.nix +++ b/darwin/default.nix @@ -1,27 +1,23 @@ -{ top, overlays }: +{ top, nixpkgs }: let inherit (top.nixunstable) lib; mac = { system ? "aarch64-darwin", name, - channel ? top.nixunstable, hm ? top.hmunstable, }: let - nixpkgs = import channel { - inherit system overlays; - }; + pkgs = nixpkgs.${system}; in top.darwin.lib.darwinSystem { - inherit system; + inherit pkgs system; specialArgs = { - inherit nixpkgs overlays top; + inherit top; inherit (top) self; }; modules = [ { - nixpkgs.overlays = overlays; home-manager = { extraSpecialArgs = { inherit top; diff --git a/flake.nix b/flake.nix index 7cdb3ca..4fe65e4 100644 --- a/flake.nix +++ b/flake.nix @@ -54,34 +54,46 @@ { self, ... }@top: let local_overlay = import ./overlays; - overlays = [ + overlays = system: [ top.agenix.overlays.default local_overlay top.nixvimunstable.overlays.default + top.proxmox.overlays.${system} + top.nurpkgs.overlays.default + top.vsext.overlays.default ]; metadata = builtins.fromJSON (builtins.readFile ./network.json); - in - top.flake-parts.lib.mkFlake { inputs = top; } { systems = [ "aarch64-linux" "x86_64-linux" "aarch64-darwin" ]; + nixpkgs = top.nixunstable.lib.genAttrs systems ( + system: + import top.nixunstable { + inherit system; + config = { + allowUnfree = true; + allowUnfreePredicate = _: true; + permittedInsecurePackages = [ "ventoy-1.1.05" ]; + }; + overlays = overlays system; + } + ); + in + top.flake-parts.lib.mkFlake { inputs = top; } { + inherit systems; flake = { colmenaHive = top.colmena.lib.makeHive ( { meta = { - nixpkgs = import top.nixunstable { - inherit overlays; - system = "x86_64-linux"; - }; + nixpkgs = nixpkgs.x86_64-linux; specialArgs = { inherit metadata self top - overlays ; }; }; @@ -105,11 +117,11 @@ ) self.nixosConfigurations) ); - darwinConfigurations = (import ./darwin { inherit top overlays; }); + darwinConfigurations = (import ./darwin { inherit top nixpkgs; }); - nixosConfigurations = (import ./hosts { inherit top overlays metadata; }); + nixosConfigurations = (import ./hosts { inherit top nixpkgs metadata; }); - homeConfigurations = (import ./home { inherit top overlays metadata; }); + homeConfigurations = (import ./home { inherit top nixpkgs metadata; }); modules = import ./modules; @@ -125,7 +137,7 @@ }: { _module.args = { - pkgs = import top.nixunstable { inherit system overlays; }; + pkgs = nixpkgs.${system}; }; packages = (import ./pkgs { inherit pkgs; }); diff --git a/home/default.nix b/home/default.nix index 177f17b..730d9ef 100644 --- a/home/default.nix +++ b/home/default.nix @@ -1,22 +1,10 @@ { metadata, - overlays, + nixpkgs, top, }: let - pkgs = - system: - (import top.nixunstable { - inherit system; - config = { - allowUnfree = true; - allowUnfreePredicate = _: true; - }; - overlays = overlays ++ [ - top.nurpkgs.overlays.default - top.vsext.overlays.default - ]; - }); + pkgs = system: nixpkgs.${system}; user = system: host: username: top.hmunstable.lib.homeManagerConfiguration { diff --git a/hosts/default.nix b/hosts/default.nix index b9985fd..6330b17 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -1,7 +1,7 @@ { top, - overlays, metadata, + nixpkgs, }: let vm = args: (unstable (args // { extraMods = [ top.nixos-generators.nixosModules.all-formats ]; })); @@ -22,8 +22,7 @@ let { nixpkgs = { inherit system; - overlays = - overlays ++ (channel.lib.optional (system == "x86_64-linux") top.proxmox.overlays.${system}); + pkgs = nixpkgs.${system}; }; } # Imported ones diff --git a/modules/nix-conf.nix b/modules/nix-conf.nix index 671dc15..b2d9679 100644 --- a/modules/nix-conf.nix +++ b/modules/nix-conf.nix @@ -79,11 +79,5 @@ in ]; }; }; - - nixpkgs.config = { - allowUnfree = true; - allowUnfreePredicate = _: true; - permittedInsecurePackages = [ "ventoy-1.1.05" ]; - }; }; }