nixos/containers: source policy from separate skopeo output

This commit is contained in:
zowoq 2023-01-01 12:14:10 +10:00
parent 86d55aa667
commit 5da87a8c7b

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, utils, ... }: { config, lib, pkgs, ... }:
let let
cfg = config.virtualisation.containers; cfg = config.virtualisation.containers;
@ -136,7 +136,7 @@ in
environment.etc."containers/policy.json".source = environment.etc."containers/policy.json".source =
if cfg.policy != { } then pkgs.writeText "policy.json" (builtins.toJSON cfg.policy) if cfg.policy != { } then pkgs.writeText "policy.json" (builtins.toJSON cfg.policy)
else utils.copyFile "${pkgs.skopeo.src}/default-policy.json"; else "${pkgs.skopeo.policy}/default-policy.json";
}; };
} }