deploy: Make secrets deployment optional

pull/30/head
Simon Bruder 2021-01-06 23:45:29 +01:00
parent 2b6a7bc1f6
commit f1620679d4
Signed by: simon
GPG Key ID: 8D3C82F9F309F8EC
1 changed files with 6 additions and 2 deletions

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}" {