mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 19:46:05 +01:00
lib: remove 22.11 deprecations
Several years since deprecation and removal. Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
This commit is contained in:
parent
cc8896c321
commit
6587238e40
1 changed files with 21 additions and 59 deletions
|
|
@ -1,70 +1,32 @@
|
|||
{ lib }:
|
||||
{
|
||||
hm = (import ../modules/lib/stdlib-extended.nix lib).hm;
|
||||
|
||||
homeManagerConfiguration =
|
||||
{
|
||||
check ? true,
|
||||
extraSpecialArgs ? { },
|
||||
lib ? pkgs.lib,
|
||||
modules ? [ ],
|
||||
pkgs,
|
||||
lib ? pkgs.lib,
|
||||
extraSpecialArgs ? { },
|
||||
check ? true,
|
||||
# Deprecated:
|
||||
configuration ? null,
|
||||
}@args:
|
||||
let
|
||||
msgForRemovedArg = ''
|
||||
The 'homeManagerConfiguration' arguments
|
||||
|
||||
- 'configuration',
|
||||
- 'username',
|
||||
- 'homeDirectory'
|
||||
- 'stateVersion',
|
||||
- 'extraModules', and
|
||||
- 'system'
|
||||
|
||||
have been removed. Instead use the arguments 'pkgs' and
|
||||
'modules'. See the 22.11 release notes for more: https://nix-community.github.io/home-manager/release-notes.xhtml#sec-release-22.11-highlights
|
||||
'';
|
||||
|
||||
throwForRemovedArgs =
|
||||
v:
|
||||
let
|
||||
used = builtins.filter (n: (args.${n} or null) != null) [
|
||||
"configuration"
|
||||
"username"
|
||||
"homeDirectory"
|
||||
"stateVersion"
|
||||
"extraModules"
|
||||
"system"
|
||||
];
|
||||
msg =
|
||||
msgForRemovedArg
|
||||
+ ''
|
||||
|
||||
|
||||
Deprecated args passed: ''
|
||||
+ builtins.concatStringsSep " " used;
|
||||
in
|
||||
lib.throwIf (used != [ ]) msg v;
|
||||
|
||||
in
|
||||
throwForRemovedArgs (
|
||||
}:
|
||||
import ../modules {
|
||||
inherit
|
||||
pkgs
|
||||
lib
|
||||
check
|
||||
extraSpecialArgs
|
||||
lib
|
||||
pkgs
|
||||
;
|
||||
configuration =
|
||||
{ ... }:
|
||||
{
|
||||
imports = modules ++ [ { programs.home-manager.path = "${../.}"; } ];
|
||||
|
||||
nixpkgs = {
|
||||
config = lib.mkDefault pkgs.config;
|
||||
|
||||
inherit (pkgs) overlays;
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue