Skip to content

Commit be2a688

Browse files
Merge pull request #412 from NuschtOS/warning
containers: fix warning on current unstable
2 parents ea1537d + 8253cea commit be2a688

1 file changed

Lines changed: 13 additions & 7 deletions

File tree

modules/containers.nix

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ config, lib, libS, ... }:
1+
{ config, lib, libS, options, ... }:
22

33
let
44
cfg = config.virtualisation;
@@ -31,12 +31,18 @@ in
3131
"--volumes"
3232
];
3333
in {
34-
containers.registries.search = lib.mkIf cfgp.recommendedDefaults [
35-
"docker.io"
36-
"quay.io"
37-
"ghcr.io"
38-
"gcr.io"
39-
];
34+
containers.registries = let
35+
search = lib.mkIf cfgp.recommendedDefaults [
36+
"docker.io"
37+
"quay.io"
38+
"ghcr.io"
39+
"gcr.io"
40+
];
41+
in if options.virtualisation.registries.settings or false then {
42+
settings = { inherit search; };
43+
} else {
44+
inherit search;
45+
};
4046

4147
docker = {
4248
daemon.settings = let

0 commit comments

Comments
 (0)