mirror of
https://github.com/nix-community/home-manager
synced 2024-11-23 11:39:46 +01:00
parent
41101d0e62
commit
ddeeb031fd
2 changed files with 25 additions and 9 deletions
|
@ -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,7 +580,8 @@ 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.bash
|
||||||
pkgs.coreutils
|
pkgs.coreutils
|
||||||
pkgs.diffutils # For `cmp` and `diff`.
|
pkgs.diffutils # For `cmp` and `diff`.
|
||||||
|
@ -578,7 +589,8 @@ in
|
||||||
pkgs.gnugrep
|
pkgs.gnugrep
|
||||||
pkgs.gnused
|
pkgs.gnused
|
||||||
pkgs.ncurses # For `tput`.
|
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