use nixpkgs.lib

This commit is contained in:
jopejoe1 2024-04-26 11:59:50 +02:00
parent 2e38451ba7
commit 42a8a7e2d3

View file

@ -51,11 +51,11 @@ let
nix = { nix = {
settings = { settings = {
substituters = lib.mkForce [ substituters = nixpkgs.lib.mkForce [
"https://cache.nixos.org" "https://cache.nixos.org"
"https://nix-community.cachix.org" "https://nix-community.cachix.org"
]; ];
trusted-public-keys = lib.mkForce [ trusted-public-keys = nixpkgs.lib.mkForce [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
]; ];
@ -76,15 +76,15 @@ let
}; };
distributedBuilds = true; distributedBuilds = true;
package = pkgs.nixVersions.unstable; package = pkgs.nixVersions.unstable;
registry = lib.mkForce ( registry = nixpkgs.lib.mkForce (
(lib.mapAttrs (_: flake: { inherit flake; })) ( (nixpkgs.lib.mapAttrs (_: flake: { inherit flake; })) (
(lib.filterAttrs (_: lib.isType "flake")) self.inputs (nixpkgs.lib.filterAttrs (_: nixpkgs.lib.isType "flake")) self.inputs
) )
// { // {
self.flake = self; self.flake = self;
} }
); );
nixPath = lib.mkForce [ "/etc/nix/path" ]; nixPath = nixpkgs.lib.mkForce [ "/etc/nix/path" ];
}; };
nixpkgs = { nixpkgs = {
@ -94,7 +94,7 @@ let
}; };
}; };
environment.etc = lib.mapAttrs' (name: value: { environment.etc = nixpkgs.lib.mapAttrs' (name: value: {
name = "nix/path/${name}"; name = "nix/path/${name}";
value.source = value.flake; value.source = value.flake;
}) config.nix.registry; }) config.nix.registry;
@ -105,7 +105,7 @@ let
backupFileExtension = "backup"; backupFileExtension = "backup";
}; };
systemd.services.nix-daemon.serviceConfig.LimitNOFILE = lib.mkForce 1048576000; systemd.services.nix-daemon.serviceConfig.LimitNOFILE = nixpkgs.lib.mkForce 1048576000;
networking.hosts = { }; networking.hosts = { };