Skip to content

Commit f19e034

Browse files
committed
Structure home-manager imports
1 parent c5968ac commit f19e034

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

lib/hosts.nix

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,13 @@
3535
in {
3636
home-manager.useGlobalPkgs = true;
3737
home-manager.useUserPackages = true;
38-
home-manager.users.${username} =
39-
if hostHomeConfig != null
40-
then
41-
{...}: {
42-
imports = [
43-
(import ./../home)
44-
hostHomeConfig
45-
];
46-
}
47-
else import ./../home;
38+
home-manager.users.${username} = {...}: {
39+
imports =
40+
[
41+
./../home
42+
]
43+
++ nixpkgs.lib.optionals (hostHomeConfig != null) [hostHomeConfig];
44+
};
4845
home-manager.extraSpecialArgs = {
4946
inherit pkgs-stable enableGuiPackages showBatteryStatus;
5047
};

0 commit comments

Comments
 (0)