mirror of
https://github.com/nix-community/home-manager
synced 2024-12-04 00:49:46 +01:00
nixos: use usercfg.home.username for username
Use `usercfg.home.username` for username instead of attribute name,
as this way we can change username regardless of the name of the attribute.
(cherry picked from commit 2e13c3cdfd
)
This commit is contained in:
parent
41d2a16f99
commit
3daa1da497
1 changed files with 23 additions and 20 deletions
|
@ -60,7 +60,10 @@ in
|
||||||
}) cfg.users
|
}) cfg.users
|
||||||
);
|
);
|
||||||
|
|
||||||
systemd.services = mapAttrs' (username: usercfg:
|
systemd.services = mapAttrs' (_: usercfg:
|
||||||
|
let
|
||||||
|
username = usercfg.home.username;
|
||||||
|
in
|
||||||
nameValuePair ("home-manager-${utils.escapeSystemdPath username}") {
|
nameValuePair ("home-manager-${utils.escapeSystemdPath username}") {
|
||||||
description = "Home Manager environment for ${username}";
|
description = "Home Manager environment for ${username}";
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
|
Loading…
Reference in a new issue