aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Bantyev2020-11-15 20:29:43 +0300
committernotgne22020-11-16 12:54:05 -0700
commit54b6b551a1416e5fd88a91e31c5bfd25bfa9fe4c (patch)
tree29062951a2d2afaf6dc61a2f41cf19dbd064cecd
parent1c84cace61cb2ac6044f3c3da3dd98285bf1f3b4 (diff)
Add activation presets for NixOS and noop activation
-rw-r--r--flake.nix4
1 files changed, 4 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
index 5d9427f..9c912e9 100644
--- a/flake.nix
+++ b/flake.nix
@@ -56,6 +56,10 @@
];
};
+ nixosActivate = base: setActivate base "$PROFILE/bin/switch-to-configuration switch";
+
+ noopActivate = base: setActivate base ":";
+
deployChecks = deploy: builtins.mapAttrs (_: check: check deploy) {
schema = deploy: pkgs.runCommandNoCC "jsonschema-deploy-system" { } ''
${pkgs.python3.pkgs.jsonschema}/bin/jsonschema -i ${pkgs.writeText "deploy.json" (builtins.toJSON deploy)} ${./interface.json} && touch $out