module/home-manager: remove modulesPath
option
This option has been deprecated for a month and is removed according to the news entry.
This commit is contained in:
parent
3c875267af
commit
592fd61788
|
@ -342,16 +342,6 @@ in
|
|||
'';
|
||||
}
|
||||
|
||||
{
|
||||
time = "2017-10-23T22:54:33+00:00";
|
||||
condition = config.programs.home-manager.modulesPath != null;
|
||||
message = ''
|
||||
The 'programs.home-manager.modulesPath' option is now
|
||||
deprecated and will be removed on November 24, 2017. Please
|
||||
use the option 'programs.home-manager.path' instead.
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
time = "2017-10-23T23:10:29+00:00";
|
||||
condition = !config.programs.home-manager.enable;
|
||||
|
|
|
@ -28,43 +28,14 @@ in
|
|||
attempted.
|
||||
'';
|
||||
};
|
||||
|
||||
modulesPath = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
example = "$HOME/devel/home-manager/modules";
|
||||
description = ''
|
||||
The default path to use for Home Manager modules. If this
|
||||
path does not exist then
|
||||
<filename>$HOME/.config/nixpkgs/home-manager/modules</filename>
|
||||
and <filename>$HOME/.nixpkgs/home-manager/modules</filename>
|
||||
will be attempted. DEPRECATED: Use
|
||||
<varname>programs.home-manager.path</varname> instead.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
warnings = mkIf (cfg.modulesPath != null) [
|
||||
("'programs.home-manager.modulesPath' is deprecated, "
|
||||
+ "please use 'programs.home-manager.path")
|
||||
];
|
||||
|
||||
assertions = [{
|
||||
assertion = cfg.path == null || cfg.modulesPath == null;
|
||||
message = "Cannot simultaneously use "
|
||||
+ "'programs.home-manager.path' and "
|
||||
+ "'programs.home-manager.modulesPath'.";
|
||||
}];
|
||||
|
||||
home.packages = [
|
||||
(import ../../home-manager {
|
||||
inherit pkgs;
|
||||
path =
|
||||
if cfg.modulesPath != null
|
||||
then "$(dirname ${cfg.modulesPath})"
|
||||
else cfg.path;
|
||||
inherit (cfg) path;
|
||||
})
|
||||
];
|
||||
|
||||
|
|
Loading…
Reference in a new issue