Skip to content

Commit 76289e0

Browse files
committed
lib: remove 22.11 deprecations
Several years since deprecation and removal. Signed-off-by: Austin Horstman <[email protected]>
1 parent b8a61b3 commit 76289e0

File tree

1 file changed

+21
-59
lines changed

1 file changed

+21
-59
lines changed

lib/default.nix

Lines changed: 21 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,32 @@
11
{ lib }:
22
{
33
hm = (import ../modules/lib/stdlib-extended.nix lib).hm;
4+
45
homeManagerConfiguration =
56
{
7+
check ? true,
8+
extraSpecialArgs ? { },
9+
lib ? pkgs.lib,
610
modules ? [ ],
711
pkgs,
8-
lib ? pkgs.lib,
9-
extraSpecialArgs ? { },
10-
check ? true,
11-
# Deprecated:
12-
configuration ? null,
13-
}@args:
14-
let
15-
msgForRemovedArg = ''
16-
The 'homeManagerConfiguration' arguments
17-
18-
- 'configuration',
19-
- 'username',
20-
- 'homeDirectory'
21-
- 'stateVersion',
22-
- 'extraModules', and
23-
- 'system'
24-
25-
have been removed. Instead use the arguments 'pkgs' and
26-
'modules'. See the 22.11 release notes for more: https://nix-community.github.io/home-manager/release-notes.xhtml#sec-release-22.11-highlights
27-
'';
28-
29-
throwForRemovedArgs =
30-
v:
31-
let
32-
used = builtins.filter (n: (args.${n} or null) != null) [
33-
"configuration"
34-
"username"
35-
"homeDirectory"
36-
"stateVersion"
37-
"extraModules"
38-
"system"
39-
];
40-
msg =
41-
msgForRemovedArg
42-
+ ''
43-
12+
}:
13+
import ../modules {
14+
inherit
15+
check
16+
extraSpecialArgs
17+
lib
18+
pkgs
19+
;
20+
configuration =
21+
{ ... }:
22+
{
23+
imports = modules ++ [ { programs.home-manager.path = "${../.}"; } ];
4424

45-
Deprecated args passed: ''
46-
+ builtins.concatStringsSep " " used;
47-
in
48-
lib.throwIf (used != [ ]) msg v;
25+
nixpkgs = {
26+
config = lib.mkDefault pkgs.config;
4927

50-
in
51-
throwForRemovedArgs (
52-
import ../modules {
53-
inherit
54-
pkgs
55-
lib
56-
check
57-
extraSpecialArgs
58-
;
59-
configuration =
60-
{ ... }:
61-
{
62-
imports = modules ++ [ { programs.home-manager.path = "${../.}"; } ];
63-
nixpkgs = {
64-
config = lib.mkDefault pkgs.config;
65-
inherit (pkgs) overlays;
66-
};
28+
inherit (pkgs) overlays;
6729
};
68-
}
69-
);
30+
};
31+
};
7032
}

0 commit comments

Comments
 (0)