diff options
author | tv <tv@krebsco.de> | 2019-02-26 19:50:53 +0100 |
---|---|---|
committer | tv <tv@krebsco.de> | 2019-02-26 19:50:53 +0100 |
commit | 5dd80e884a8d303659f43547f587fcb128dddaa0 (patch) | |
tree | 27bac83d328f5165f3ee7cac77e17885a65b8b11 | |
parent | ba211472ef79e77b9016c4b4b13efe7e8bebd93e (diff) |
pkgs.krops.rebuild: allow passing arbitrary argsv1.12.1
-rw-r--r-- | pkgs/krops/default.nix | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/pkgs/krops/default.nix b/pkgs/krops/default.nix index 7b176b3..d5a75d7 100644 --- a/pkgs/krops/default.nix +++ b/pkgs/krops/default.nix @@ -4,7 +4,7 @@ in { exec, nix, openssh, populate, writeDash }: rec { - rebuild = target: + rebuild = args: target: exec "rebuild.${target.host}" rec { filename = "${openssh}/bin/ssh"; argv = [ @@ -12,7 +12,9 @@ in "-l" target.user "-p" target.port target.host - "nixos-rebuild switch -I ${lib.escapeShellArg target.path}" + "nixos-rebuild -I ${lib.escapeShellArg target.path} ${ + lib.concatMapStringsSep " " lib.escapeShellArg args + }" ]; }; @@ -22,7 +24,7 @@ in writeDash name '' set -efu ${populate { inherit force source; target = target'; }} - ${rebuild target'} + ${rebuild ["switch"] target'} ''; writeTest = name: { force ? false, source, target }: let |