diff --git a/default.nix b/default.nix index 9cd1637..d6c5e01 100644 --- a/default.nix +++ b/default.nix @@ -13,33 +13,19 @@ let storePathLength = builtins.stringLength (builtins.toString builtins.storeDir); evaluatingInStore = (builtins.substring 0 storePathLength currentFilePath) == builtins.storeDir; - gitlessSelfInStore = { - outPath = builtins.path { - path = ./.; - name = "source"; - filter = path: type: - let - selfPath = builtins.dirOf currentFilePath; - gitIgnoreFilters = lib.parseGitignore selfPath path; - result = type != "unknown" - && type != "symlink" - && builtins.baseNameOf path != ".git" - && lib.runGitignoreFilter gitIgnoreFilters path type; - in result; - }; - selfMode = "path"; + selfInStore = builtins.path { + path = ./.; + name = "source"; + filter = path: type: + let + selfPath = builtins.dirOf currentFilePath; + gitIgnoreFilters = lib.parseGitignore selfPath path; + result = type != "unknown" + && type != "symlink" + && builtins.baseNameOf path != ".git" + && lib.runGitignoreFilter gitIgnoreFilters path type; + in result; }; - gitfullSelfInStore = builtins.fetchGit "file://${builtins.toString ./.}" // { - selfMode = "git"; - }; - - selfInStore' = builtins.tryEval gitfullSelfInStore; - selfInStore = if selfInStore'.success then selfInStore'.value else gitlessSelfInStore; in -if !(evaluatingInStore) then { ... }@args: import selfInStore ({ - selfPath = { - outPath = builtins.toString ./.; - selfMode = "store"; - }; -} // args ) +if !(evaluatingInStore) then { ... }@args: import selfInStore ({ selfPath = selfInStore; } // args ) else { ... }@args: import ./outputs.nix ({ selfPath = selfInStore; } // args) diff --git a/nix-os/nix.nix b/nix-os/nix.nix index bce75a5..8d4c425 100644 --- a/nix-os/nix.nix +++ b/nix-os/nix.nix @@ -54,7 +54,6 @@ in { nix.package = wrappedNixExecutables false; environment.systemPackages = [ pkgs.nix-output-monitor - pkgs.nix-diff ] ++ lib.map (lib.hiPrio) [ (wrappedNixExecutables true) wrappedNixosExecutables diff --git a/outputs.nix b/outputs.nix index b95e04b..4146c0f 100644 --- a/outputs.nix +++ b/outputs.nix @@ -1,10 +1,7 @@ { inputsPath ? ./inputs.nix, inputs ? import inputsPath {}, - selfPath ? { - outPath = builtins.toString ./.; - selfMode = "impure"; - }, + selfPath ? builtins.toString ./., }: let