From f1620679d4ecc53107b7d827f5145f1d382905c5 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Wed, 6 Jan 2021 23:45:29 +0100 Subject: [PATCH] deploy: Make secrets deployment optional --- deploy.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/deploy.nix b/deploy.nix index 9c2e2b3..6c07e8e 100644 --- a/deploy.nix +++ b/deploy.nix @@ -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}" {