Skip to content

Commit 1cbed6d

Browse files
committed
ssh: fix remote-user-id mapping for darwin
1 parent 150552d commit 1cbed6d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

modules/common/programs/terminal/tools/ssh/default.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ let
2222
let
2323
remote = other-hosts.${name};
2424
remote-user-name = remote.username;
25-
# Assume standard UID 1000 for primary users, or use a default
26-
remote-user-id = "1000";
25+
# Use system-specific default UIDs: macOS starts at 501, Linux at 1000
26+
remote-user-id = if remote.system == "darwin" then "501" else "1000";
2727

2828
forward-gpg =
2929
lib.optionalString (config.programs.gnupg.agent.enable && remote.gpgAgent)

0 commit comments

Comments
 (0)