aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--flake.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
index 9e8bb4e..edfb6bd 100644
--- a/flake.nix
+++ b/flake.nix
@@ -106,6 +106,13 @@
home-manager = base: custom base.activationPackage "$PROFILE/activate";
+ # Activation script for 'darwinSystem' from nix-darwin.
+ # 'HOME=/var/root' is needed because 'sudo' on darwin doesn't change 'HOME' directory,
+ # while 'darwin-rebuild' (which is invoked under the hood) performs some nix-channel
+ # checks that rely on 'HOME'. As a result, if 'sshUser' is different from root,
+ # deployment may fail without explicit 'HOME' redefinition.
+ darwin = base: custom base.config.system.build.toplevel "HOME=/var/root $PROFILE/activate";
+
noop = base: custom base ":";
};