feat(nix): pin NIX_PATH to nixpkgs input

This commit is contained in:
winston 2023-08-21 07:07:11 +02:00
parent 20d1a24292
commit a026a050a6
Signed by: winston
GPG key ID: 3786770EDBC2B481
4 changed files with 148 additions and 44 deletions

View file

@ -18,6 +18,39 @@
"type": "github" "type": "github"
} }
}, },
"crane": {
"inputs": {
"flake-compat": [
"nekowinston-nur"
],
"flake-utils": [
"nekowinston-nur",
"flake-utils"
],
"nixpkgs": [
"nekowinston-nur",
"nixpkgs"
],
"rust-overlay": [
"nekowinston-nur",
"rust-overlay"
]
},
"locked": {
"lastModified": 1686108916,
"narHash": "sha256-looLH5MdY4erLiJw0XwQohGdr0fJL9y6TJY3898RA2U=",
"owner": "ipetkov",
"repo": "crane",
"rev": "8ab1a49432695bd80ff4b7f6c6515da0e926d922",
"type": "github"
},
"original": {
"owner": "ipetkov",
"ref": "v0.12.2",
"repo": "crane",
"type": "github"
}
},
"darwin": { "darwin": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -25,11 +58,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1690431538, "lastModified": 1691963303,
"narHash": "sha256-Uml8ivMMOFPB9fNSDcw72imGHRdJpaK12sRm2DTLLe8=", "narHash": "sha256-zqvt4N4Ic06BrGo02itCIPTEKzVnGT0BtGbIr+aUGqE=",
"owner": "lnl7", "owner": "lnl7",
"repo": "nix-darwin", "repo": "nix-darwin",
"rev": "16c07487ac9bc59f58b121d13160c67befa3342e", "rev": "3fcd83783a1e2ddad0f14821da4186a95bc76c50",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -59,11 +92,11 @@
"nixpkgs-lib": "nixpkgs-lib" "nixpkgs-lib": "nixpkgs-lib"
}, },
"locked": { "locked": {
"lastModified": 1688466019, "lastModified": 1690933134,
"narHash": "sha256-VeM2akYrBYMsb4W/MmBo1zmaMfgbL4cH3Pu8PGyIwJ0=", "narHash": "sha256-ab989mN63fQZBFrkk4Q8bYxQCktuHmBIBqUG1jl6/FQ=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "8e8d955c22df93dbe24f19ea04f47a74adbdc5ec", "rev": "59cf3f1447cfc75087e7273b04b31e689a8599fb",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -94,6 +127,24 @@
"inputs": { "inputs": {
"systems": "systems_2" "systems": "systems_2"
}, },
"locked": {
"lastModified": 1689068808,
"narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_3": {
"inputs": {
"systems": "systems_3"
},
"locked": { "locked": {
"lastModified": 1685518550, "lastModified": 1685518550,
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=", "narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
@ -136,11 +187,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1690476848, "lastModified": 1692222899,
"narHash": "sha256-PSmzyuEbMxEn2uwwLYUN2l1psoJXb7jm/kfHD12Sq0k=", "narHash": "sha256-dHrv+lMUKFXLnzc/yYhEpNr34JYG8gwD4eH6qcrScFI=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "8d243f7da13d6ee32f722a3f1afeced150b6d4da", "rev": "2471d965a3522025157a790fc49c3567fd56e26e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -151,14 +202,17 @@
}, },
"nekowinston-nur": { "nekowinston-nur": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_2" "crane": "crane",
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_2",
"rust-overlay": "rust-overlay"
}, },
"locked": { "locked": {
"lastModified": 1690527758, "lastModified": 1692169395,
"narHash": "sha256-mNRQBMxyB7c4tswGGZse1RMU6Q3b/F1vUZJpENDAIz8=", "narHash": "sha256-kSMv426umcKU6tsmkkdc17NpODYh7+JW2/4IqnsN3wA=",
"owner": "nekowinston", "owner": "nekowinston",
"repo": "nur", "repo": "nur",
"rev": "084cb1e42eec7d8c0af6e0cbf8738810ffba7f4d", "rev": "59d396643d3d98f952825ec5b38a682578e9d74f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -174,11 +228,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1690083300, "lastModified": 1691897365,
"narHash": "sha256-xnUtWO/5TuuHkIpmzMXGvHJqS06FSVADnAZ4bvqO4Zo=", "narHash": "sha256-jvWIU4ht3YAmF8TDVM2Ps2+Gf4MtNGLL1zEWQZdTrzU=",
"owner": "Mic92", "owner": "Mic92",
"repo": "nix-index-database", "repo": "nix-index-database",
"rev": "c1e6fc40dd5c0d16940bc012421268b94e404b0b", "rev": "f4d70d098f066a30c7087144063dca179495f7d6",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -198,11 +252,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1690507807, "lastModified": 1692235382,
"narHash": "sha256-B6SGiKX+7J76zAvUPbKABlYaxhb5sBBjjyHyStVzuXc=", "narHash": "sha256-T+mR2Jh9x2S94VzuRJxorRUcEIShuXtECCzvmbLRuyY=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nix-vscode-extensions", "repo": "nix-vscode-extensions",
"rev": "9ca8239be3719292cd3fb566f4fc8dc8299f380d", "rev": "953c8a9f3ecafdea6cdcd112d997f4a23cf50b7f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -230,11 +284,11 @@
"nixpkgs-lib": { "nixpkgs-lib": {
"locked": { "locked": {
"dir": "lib", "dir": "lib",
"lastModified": 1688049487, "lastModified": 1690881714,
"narHash": "sha256-100g4iaKC9MalDjUW9iN6Jl/OocTDtXdeAj7pEGIRh4=", "narHash": "sha256-h/nXluEqdiQHs1oSgkOOWF+j8gcJMWhwnZ9PFabN6q0=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "4bc72cae107788bf3f24f30db2e2f685c9298dc9", "rev": "9e1960bc196baf6881340d53dccb203a951745a2",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -263,11 +317,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1690031011, "lastModified": 1691654369,
"narHash": "sha256-kzK0P4Smt7CL53YCdZCBbt9uBFFhE0iNvCki20etAf4=", "narHash": "sha256-gSILTEx1jRaJjwZxRlnu3ZwMn1FVNk80qlwiCX8kmpo=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "12303c652b881435065a98729eb7278313041e49", "rev": "ce5e4a6ef2e59d89a971bc434ca8ca222b9c7f5e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -279,11 +333,11 @@
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1690367991, "lastModified": 1692174805,
"narHash": "sha256-2VwOn1l8y6+cu7zjNE8MgeGJNNz1eat1HwHrINeogFA=", "narHash": "sha256-xmNPFDi/AUMIxwgOH/IVom55Dks34u1g7sFKKebxUm0=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "c9cf0708f00fbe553319258e48ca89ff9a413703", "rev": "caac0eb6bdcad0b32cb2522e03e4002c8975c62e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -311,11 +365,11 @@
}, },
"nur": { "nur": {
"locked": { "locked": {
"lastModified": 1690577284, "lastModified": 1692237263,
"narHash": "sha256-XBiICyjhSXLH6sZCjT1dPsNaCAdDBqHJUVTDy9W4KOI=", "narHash": "sha256-B+P6HJyHm4xNVdFG3eEY2Uu0br7DVr1r3EYQPPnOo2U=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nur", "repo": "nur",
"rev": "49fa94849d9b0478203a05d8291dc192cbc69c7b", "rev": "6bdd89c5f8922468eab362e2206901e30b742259",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -327,17 +381,17 @@
"pre-commit-hooks": { "pre-commit-hooks": {
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
"flake-utils": "flake-utils_2", "flake-utils": "flake-utils_3",
"gitignore": "gitignore", "gitignore": "gitignore",
"nixpkgs": "nixpkgs_4", "nixpkgs": "nixpkgs_4",
"nixpkgs-stable": "nixpkgs-stable" "nixpkgs-stable": "nixpkgs-stable"
}, },
"locked": { "locked": {
"lastModified": 1690464206, "lastModified": 1692203373,
"narHash": "sha256-38V4kmOh6ikpfGiAS+Kt2H/TA2DubSqE66veP/jmB4Q=", "narHash": "sha256-St6Ie93YMi8ugwnbIFLuse7KE9f7nwmwT+fo86Mk/8Y=",
"owner": "cachix", "owner": "cachix",
"repo": "pre-commit-hooks.nix", "repo": "pre-commit-hooks.nix",
"rev": "9289996dcac62fd45836db7c07b87d2521eb526d", "rev": "3e3d45c1f26e212abe24188ece996871d94618d8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -363,6 +417,31 @@
"swayfx": "swayfx" "swayfx": "swayfx"
} }
}, },
"rust-overlay": {
"inputs": {
"flake-utils": [
"nekowinston-nur",
"flake-utils"
],
"nixpkgs": [
"nekowinston-nur",
"nixpkgs"
]
},
"locked": {
"lastModified": 1691892594,
"narHash": "sha256-Lt9/WUnI/ZqBYnHOC3n6Lg5jTfd/ZI+39jZx5HmolSQ=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "c638e10caf94caaa97fb1df74e3bb467dc9b92db",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"sops": { "sops": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -373,16 +452,17 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1690199016, "lastModified": 1691828918,
"narHash": "sha256-yTLL72q6aqGmzHq+C3rDp3rIjno7EJZkFLof6Ika7cE=", "narHash": "sha256-p8kvccP/qxUrASzGemRx2MB9Kefd9DzrtmJr5whhOCg=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "c36df4fe4bf4bb87759b1891cab21e7a05219500", "rev": "1c673ba1053ad3e421fe043702237497bda0c621",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "1c673ba1053ad3e421fe043702237497bda0c621",
"type": "github" "type": "github"
} }
}, },
@ -394,11 +474,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1690164515, "lastModified": 1690650806,
"narHash": "sha256-lZq+8IT44cyhe2r3jKEys91xZk2VlTBiIcuQCnpEsMQ=", "narHash": "sha256-38x1YjoxUZiSmE0e6TuLG/t7gZquR/dYZOlsgJ69jZI=",
"owner": "willpower3309", "owner": "willpower3309",
"repo": "swayfx", "repo": "swayfx",
"rev": "c15e9f5d39d356562747fd11f7738df90476ac52", "rev": "c47aa61c64925c72722dfbfa01cd47643a92c7d9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -436,6 +516,21 @@
"repo": "default", "repo": "default",
"type": "github" "type": "github"
} }
},
"systems_3": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View file

@ -22,7 +22,7 @@
nix-index-database.url = "github:Mic92/nix-index-database"; nix-index-database.url = "github:Mic92/nix-index-database";
sops.inputs.nixpkgs-stable.follows = "nixpkgs"; sops.inputs.nixpkgs-stable.follows = "nixpkgs";
sops.inputs.nixpkgs.follows = "nixpkgs"; sops.inputs.nixpkgs.follows = "nixpkgs";
sops.url = "github:Mic92/sops-nix"; sops.url = "github:Mic92/sops-nix/1c673ba1053ad3e421fe043702237497bda0c621";
swayfx.inputs.flake-compat.follows = ""; swayfx.inputs.flake-compat.follows = "";
swayfx.inputs.nixpkgs.follows = "nixpkgs"; swayfx.inputs.nixpkgs.follows = "nixpkgs";
swayfx.url = "github:willpower3309/swayfx"; swayfx.url = "github:willpower3309/swayfx";
@ -82,7 +82,7 @@
}; };
devShells.default = config.pre-commit.devShell.overrideAttrs (old: { devShells.default = config.pre-commit.devShell.overrideAttrs (old: {
buildInputs = with pkgs; [nvd nix-output-monitor]; buildInputs = with pkgs; [gum nix-output-monitor nvd];
}); });
legacyPackages.homeConfigurations = let legacyPackages.homeConfigurations = let

View file

@ -1,4 +1,9 @@
{pkgs, ...}: { {
lib,
inputs,
pkgs,
...
}: {
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
nix = { nix = {
gc.automatic = true; gc.automatic = true;
@ -13,4 +18,7 @@
} }
// ((import ../../../flake.nix).nixConfig); // ((import ../../../flake.nix).nixConfig);
}; };
# set nixPath to the flake nixpkgs without channels
environment.variables.NIX_PATH = lib.mkForce "nixpkgs=${inputs.nixpkgs.outPath}";
} }

View file

@ -87,6 +87,7 @@
++ pkgs.lib.optionals isDarwin [nekowinston-nur.darwinModules.default] ++ pkgs.lib.optionals isDarwin [nekowinston-nur.darwinModules.default]
++ [(hmCommonConfig {inherit username;})] ++ [(hmCommonConfig {inherit username;})]
++ extraModules; ++ extraModules;
specialArgs = {inherit inputs;};
}; };
}; };
mkSystems = systems: inputs.nixpkgs.lib.mkMerge (map mkSystem systems); mkSystems = systems: inputs.nixpkgs.lib.mkMerge (map mkSystem systems);