diff options
-rw-r--r-- | flake.nix | 41 |
1 files changed, 24 insertions, 17 deletions
@@ -40,25 +40,32 @@ }; lib = rec { - setActivate = base: activate: pkgs.buildEnv { - name = ("activatable-" + base.name); - paths = [ - base - (pkgs.writeTextFile { - name = base.name + "-activate-path"; - text = '' - #!${pkgs.runtimeShell} - ${activate} - ''; - executable = true; - destination = "/deploy-rs-activate"; - }) - ]; - }; - nixosActivate = base: setActivate base "$PROFILE/bin/switch-to-configuration switch"; + setActivate = builtins.trace + "deploy-rs#lib.setActivate is deprecated, use activate.noop, activate.nixos or activate.custom instead" + activate.custom; + + activate = rec { + custom = base: activate: pkgs.buildEnv { + name = ("activatable-" + base.name); + paths = [ + base + (pkgs.writeTextFile { + name = base.name + "-activate-path"; + text = '' + #!${pkgs.runtimeShell} + ${activate} + ''; + executable = true; + destination = "/deploy-rs-activate"; + }) + ]; + }; - noopActivate = base: setActivate base ":"; + nixos = base: custom base "$PROFILE/bin/switch-to-configuration switch"; + + noop = base: custom base ":"; + }; deployChecks = deploy: builtins.mapAttrs (_: check: check deploy) { schema = deploy: pkgs.runCommandNoCC "jsonschema-deploy-system" { } '' |