deploy: Make secrets deployment optional
This commit is contained in:
parent
2b6a7bc1f6
commit
f1620679d4
|
@ -8,11 +8,12 @@ let
|
||||||
kropsDeploy =
|
kropsDeploy =
|
||||||
{ hostname
|
{ hostname
|
||||||
, target ? null
|
, target ? null
|
||||||
|
, secrets ? true
|
||||||
, extraSources ? { }
|
, extraSources ? { }
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
source = lib.evalSource [
|
source = lib.evalSource [
|
||||||
({
|
{
|
||||||
nixpkgs.git = {
|
nixpkgs.git = {
|
||||||
ref = sources.nixpkgs.rev;
|
ref = sources.nixpkgs.rev;
|
||||||
url = https://github.com/NixOS/nixpkgs;
|
url = https://github.com/NixOS/nixpkgs;
|
||||||
|
@ -32,11 +33,14 @@ let
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
nixos-config.symlink = "config/machines/${hostname}/configuration.nix";
|
nixos-config.symlink = "config/machines/${hostname}/configuration.nix";
|
||||||
|
}
|
||||||
|
(lib.mkIf secrets {
|
||||||
secrets.pass = {
|
secrets.pass = {
|
||||||
dir = toString ~/.password-store;
|
dir = toString ~/.password-store;
|
||||||
name = "nixos/machines/${hostname}";
|
name = "nixos/machines/${hostname}";
|
||||||
};
|
};
|
||||||
} // extraSources)
|
})
|
||||||
|
extraSources
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
kropsPkgs.krops.writeDeploy "deploy-${hostname}" {
|
kropsPkgs.krops.writeDeploy "deploy-${hostname}" {
|
||||||
|
|
Loading…
Reference in a new issue