Skip to content

Commit bca4b89

Browse files
jokogrblaggacao
authored andcommitted
Update home-manager to 22.11
This commit updates the home-manager flake input to the 22.11 release and creates additional support for the new homeManagerConfiguration setup that is introduced there: Some arguments that were previously in use, now need to be used inside the new modules argument (check [here][hm-22.11-highlights] for more details). Finally, the examples of using home-manager now declare explicitly the stateVersion, since the 22.11 release makes this mandatory. [hm-22.11-highlights]: https://nix-community.github.io/home-manager/release-notes.html#sec-release-22.11-highlights
1 parent 504459e commit bca4b89

File tree

10 files changed

+108
-38
lines changed

10 files changed

+108
-38
lines changed

examples/devos/flake.lock

+21-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/devos/flake.nix

+11-3
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
digga.inputs.home-manager.follows = "home";
3737
digga.inputs.deploy.follows = "deploy";
3838

39-
home.url = "github:nix-community/home-manager/release-22.05";
39+
home.url = "github:nix-community/home-manager/release-22.11";
4040
home.inputs.nixpkgs.follows = "nixos";
4141

4242
darwin.url = "github:LnL7/nix-darwin";
@@ -196,8 +196,16 @@
196196
# it could just be left to the developer to determine what's
197197
# appropriate. after all, configuring these hm users is one of the
198198
# first steps in customizing the template.
199-
nixos = {suites, ...}: {imports = suites.base;};
200-
darwin = {suites, ...}: {imports = suites.base;};
199+
nixos = {suites, ...}: {
200+
imports = suites.base;
201+
202+
home.stateVersion = "22.11";
203+
};
204+
darwin = {suites, ...}: {
205+
imports = suites.base;
206+
207+
home.stateVersion = "22.11";
208+
};
201209
}; # digga.lib.importers.rakeLeaves ./users/hm;
202210
};
203211

examples/groupByConfig/flake.lock

+21-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/groupByConfig/flake.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
darwin.url = "github:LnL7/nix-darwin";
2020
darwin.inputs.nixpkgs.follows = "nixpkgs-darwin-stable";
2121

22-
home.url = "github:nix-community/home-manager/release-22.05";
22+
home.url = "github:nix-community/home-manager/release-22.11";
2323
home.inputs.nixpkgs.follows = "nixos";
2424
};
2525

examples/hmOnly/flake.lock

+21-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/hmOnly/flake.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
digga.url = "github:divnix/digga";
77
digga.inputs.nixpkgs.follows = "nixos";
88
digga.inputs.home-manager.follows = "home";
9-
home.url = "github:nix-community/home-manager/release-22.05";
9+
home.url = "github:nix-community/home-manager/release-22.11";
1010
home.inputs.nixpkgs.follows = "nixos";
1111
};
1212

examples/hmOnly/home/users/testuser.nix

+4-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@
88
in {
99
imports = suites.shell;
1010

11-
home.packages = [pkgs.hello];
11+
home = {
12+
packages = [pkgs.hello];
13+
stateVersion = "22.11";
14+
};
1215

1316
programs.browserpass.enable = true;
1417
programs.starship.enable = true;

flake.lock

+7-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@
1515
deploy.url = "github:serokell/deploy-rs";
1616
deploy.inputs.nixpkgs.follows = "nixpkgs";
1717

18-
home-manager.url = "github:nix-community/home-manager/release-22.05";
18+
home-manager.url = "github:nix-community/home-manager/release-22.11";
1919
home-manager.inputs.nixpkgs.follows = "nixlib";
20+
home-manager.inputs.utils.follows = "flake-utils";
2021

2122
darwin.url = "github:LnL7/nix-darwin";
2223
darwin.inputs.nixpkgs.follows = "nixpkgs";

src/mkFlake/outputs-builder.nix

+19-12
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,27 @@
2727
homeDirectory = "${homeDirectoryPrefix}/${username}";
2828
in
2929
home-manager.lib.homeManagerConfiguration {
30-
inherit username homeDirectory pkgs system;
30+
inherit pkgs;
3131

32-
extraModules = config.home.modules ++ config.home.exportedModules;
33-
extraSpecialArgs = config.home.importables // {inherit self inputs;};
32+
modules =
33+
config.home.modules
34+
++ config.home.exportedModules
35+
++ [
36+
({
37+
imports = [configuration];
38+
39+
home = {
40+
inherit username homeDirectory;
41+
};
42+
}
43+
// (
44+
if (pkgs.stdenv.hostPlatform.isLinux && !pkgs.stdenv.buildPlatform.isDarwin)
45+
then {targets.genericLinux.enable = true;}
46+
else {}
47+
))
48+
];
3449

35-
configuration =
36-
{
37-
imports = [configuration];
38-
}
39-
// (
40-
if (pkgs.stdenv.hostPlatform.isLinux && !pkgs.stdenv.buildPlatform.isDarwin)
41-
then {targets.genericLinux.enable = true;}
42-
else {}
43-
);
50+
extraSpecialArgs = config.home.importables // {inherit self inputs;};
4451
};
4552

4653
homeConfigurationsPortable =

0 commit comments

Comments
 (0)