flake: Better fix for registry changes

This commit is contained in:
Charlotte Van Petegem 2024-02-28 09:51:02 +01:00
parent 2188d0848b
commit 4faf1d7955
No known key found for this signature in database
GPG key ID: 019E764B7184435A

View file

@ -141,14 +141,17 @@
modules = commonModules ++ [ modules = commonModules ++ [
({ config, ... }: ({ config, ... }:
{ {
nixpkgs.pkgs = import nixpkgs { nixpkgs = {
inherit overlays system; pkgs = import nixpkgs {
config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) config.chvp.base.nix.unfreePackages; inherit overlays system;
config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) config.chvp.base.nix.unfreePackages;
};
flake.source = lib.mkForce "${nixpkgs}";
}; };
networking.hostName = name; networking.hostName = name;
nix = { nix = {
extraOptions = "extra-experimental-features = nix-command flakes"; extraOptions = "extra-experimental-features = nix-command flakes";
registry = (builtins.mapAttrs (name: v: { flake = v; }) inputs) // { nixpkgs = { flake = nixpkgs; to.path = lib.mkForce "${nixpkgs}"; }; }; registry = (builtins.mapAttrs (name: v: { flake = v; }) inputs) // { nixpkgs = { flake = nixpkgs; }; };
}; };
}) })
./machines/${name} ./machines/${name}