deploy: Make secrets deployment optional
This commit is contained in:
parent
2b6a7bc1f6
commit
f1620679d4
|
@ -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}" {
|
||||
|
|
Loading…
Reference in a new issue