From 5dd80e884a8d303659f43547f587fcb128dddaa0 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 26 Feb 2019 19:50:53 +0100 Subject: pkgs.krops.rebuild: allow passing arbitrary args --- pkgs/krops/default.nix | 8 +++++--- 1 file 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 -- cgit v1.2.3