diff --git a/flake.nix b/flake.nix index caff8f6..0047b6a 100644 --- a/flake.nix +++ b/flake.nix @@ -85,7 +85,7 @@ neovim-nightly, nixvim, arkenfox, - }: let + } @ inputs: let # All overlays to apply overlays = self.overlays @@ -202,6 +202,7 @@ hosts = import ./hosts { inherit self lib; inherit overlays modules; + inputs = builtins.removeAttrs inputs [ "self" ]; }; in { packages = eachSupportedSystem (system: let diff --git a/hosts/default.nix b/hosts/default.nix index 8123d7a..6dd5532 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -3,14 +3,20 @@ self, overlays, modules, + inputs, }: let inherit (lib) types; inherit (builtins) attrValues removeAttrs; host-modules = hostName: let - global = {pkgs, ...}: { + global = {pkgs, lib, ...}: { profiles.core.enable = lib.mkDefault true; + # Add flake inputs to system closure to prevent garbage collection + environment.etc."flake-inputs".text = + lib.concatStringsSep "\n" + (lib.mapAttrsToList (k: v: "${k} -> ${v}") inputs); + home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.sharedModules =