parent
41101d0e62
commit
ddeeb031fd
|
@ -373,6 +373,16 @@ in
|
||||||
description = "The package containing the complete activation script.";
|
description = "The package containing the complete activation script.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
home.extraActivationPath = mkOption {
|
||||||
|
internal = true;
|
||||||
|
type = types.listOf types.package;
|
||||||
|
default = [ ];
|
||||||
|
description = ''
|
||||||
|
Extra packages to add to <envar>PATH</envar> within the activation
|
||||||
|
script.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
home.extraBuilderCommands = mkOption {
|
home.extraBuilderCommands = mkOption {
|
||||||
type = types.lines;
|
type = types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
|
@ -570,15 +580,17 @@ in
|
||||||
|
|
||||||
# Programs that always should be available on the activation
|
# Programs that always should be available on the activation
|
||||||
# script's PATH.
|
# script's PATH.
|
||||||
activationBinPaths = lib.makeBinPath [
|
activationBinPaths = lib.makeBinPath (
|
||||||
pkgs.bash
|
[
|
||||||
pkgs.coreutils
|
pkgs.bash
|
||||||
pkgs.diffutils # For `cmp` and `diff`.
|
pkgs.coreutils
|
||||||
pkgs.findutils
|
pkgs.diffutils # For `cmp` and `diff`.
|
||||||
pkgs.gnugrep
|
pkgs.findutils
|
||||||
pkgs.gnused
|
pkgs.gnugrep
|
||||||
pkgs.ncurses # For `tput`.
|
pkgs.gnused
|
||||||
]
|
pkgs.ncurses # For `tput`.
|
||||||
|
] ++ config.home.extraActivationPath
|
||||||
|
)
|
||||||
+ optionalString (!cfg.emptyActivationPath) "\${PATH:+:}$PATH";
|
+ optionalString (!cfg.emptyActivationPath) "\${PATH:+:}$PATH";
|
||||||
|
|
||||||
activationScript = pkgs.writeShellScript "activation-script" ''
|
activationScript = pkgs.writeShellScript "activation-script" ''
|
||||||
|
|
|
@ -32,6 +32,10 @@ let
|
||||||
|
|
||||||
home.username = config.users.users.${name}.name;
|
home.username = config.users.users.${name}.name;
|
||||||
home.homeDirectory = config.users.users.${name}.home;
|
home.homeDirectory = config.users.users.${name}.home;
|
||||||
|
|
||||||
|
# Make activation script use same version of Nix as system as a whole.
|
||||||
|
# This avoids problems with Nix not being in PATH.
|
||||||
|
home.extraActivationPath = [ config.nix.package ];
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
] ++ cfg.sharedModules;
|
] ++ cfg.sharedModules;
|
||||||
|
|
Loading…
Reference in a new issue