aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--flake.nix41
1 files changed, 24 insertions, 17 deletions
diff --git a/flake.nix b/flake.nix
index 9c912e9..a836b3c 100644
--- a/flake.nix
+++ b/flake.nix
@@ -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" { } ''