home: document the 'home.profileDirectory' default

This commit is contained in:
Benedikt Rips
2026-06-23 11:11:50 -05:00
committed by Austin Horstman
parent d6b7bf1695
commit 1ac720f007
+12 -11
View File
@@ -213,9 +213,18 @@ in
home.profileDirectory = mkOption {
type = types.path;
defaultText = literalExpression ''
"''${home.homeDirectory}/.nix-profile" or
"/etc/profiles/per-user/''${home.username}"
default =
if config.submoduleSupport.enable && config.submoduleSupport.externalPackageInstall then
"/etc/profiles/per-user/${cfg.username}"
else if config.nix.useXdg then
"${config.xdg.stateHome}/nix/profile"
else
cfg.homeDirectory + "/.nix-profile";
defaultText = ''
- `/etc/profiles/per-user/''${home.username}`, if Home Manager is installed as
a submodule and `home-manager.useUserPackages` is enabled, else
- `''${xdg.stateHome}/nix/profile`, if `nix.useXdg` is enabled, else
- `''${home.homeDirectory}/.nix-profile`.
'';
readOnly = true;
description = ''
@@ -621,14 +630,6 @@ in
lib.mkDefault (builtins.getEnv "HOME")
);
home.profileDirectory =
if config.submoduleSupport.enable && config.submoduleSupport.externalPackageInstall then
"/etc/profiles/per-user/${cfg.username}"
else if config.nix.useXdg then
"${config.xdg.stateHome}/nix/profile"
else
cfg.homeDirectory + "/.nix-profile";
programs.bash.shellAliases = cfg.shellAliases;
programs.zsh.shellAliases = cfg.shellAliases;
programs.fish.shellAliases = cfg.shellAliases;