From c0b7edb6b2af64566ebf5a151ae21395f702280e Mon Sep 17 00:00:00 2001 From: Thomas BESSOU Date: Sun, 20 Oct 2024 12:41:34 +0200 Subject: [PATCH] Account for changed user name --- modules/vscode-server/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/vscode-server/default.nix b/modules/vscode-server/default.nix index 1ba80f3..ae52f7b 100644 --- a/modules/vscode-server/default.nix +++ b/modules/vscode-server/default.nix @@ -17,11 +17,11 @@ import ./module.nix ( let forEachUser = ({ path, file }: builtins.listToAttrs (builtins.map - (username: { + (username: let user = config.users.users.${username}; in { # Create the directory so that it has the appropriate permissions if it doesn't already exist # Otherwise the directive below creating the symlink would have that owned by root - name = "${config.users.users.${username}.home}/${path}"; - value = file username; + name = "${user.home}/${path}"; + value = file (user.name or username); }) cfg.enableForUsers.users)); homeDirectory = (path: forEachUser {