1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-23 03:29:45 +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.
This commit is contained in:
Jaka Hudoklin 2019-05-24 09:17:25 +02:00 committed by Robert Helgesson
parent d726afd9e4
commit 2e13c3cdfd
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -60,7 +60,10 @@ in
}) cfg.users
);
systemd.services = mapAttrs' (username: usercfg:
systemd.services = mapAttrs' (_: usercfg:
let
username = usercfg.home.username;
in
nameValuePair ("home-manager-${utils.escapeSystemdPath username}") {
description = "Home Manager environment for ${username}";
wantedBy = [ "multi-user.target" ];