deploy: Make secrets deployment optional

This commit is contained in:
Simon Bruder 2021-01-06 23:45:29 +01:00
parent 2b6a7bc1f6
commit f1620679d4
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC

View file

@ -8,11 +8,12 @@ let
kropsDeploy =
{ hostname
, target ? null
, secrets ? true
, extraSources ? { }
}:
let
source = lib.evalSource [
({
{
nixpkgs.git = {
ref = sources.nixpkgs.rev;
url = https://github.com/NixOS/nixpkgs;
@ -32,11 +33,14 @@ let
];
};
nixos-config.symlink = "config/machines/${hostname}/configuration.nix";
}
(lib.mkIf secrets {
secrets.pass = {
dir = toString ~/.password-store;
name = "nixos/machines/${hostname}";
};
} // extraSources)
})
extraSources
];
in
kropsPkgs.krops.writeDeploy "deploy-${hostname}" {