Skip to content

Commit

Permalink
Change remote user to non-personal
Browse files Browse the repository at this point in the history
  • Loading branch information
carlthome committed Jan 2, 2025
1 parent 3b1dd33 commit 39d7f97
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
2 changes: 1 addition & 1 deletion hosts/pi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ sudo mkdir -p /run/media/$USER/NIXOS_SD1/etc/
printf 'network={\n ssid="My Network"\n psk="My Password"\n}\n' | sudo tee /run/media/$USER/NIXOS_SD1/etc/wpa_supplicant.conf

# Update local SSH configuration.
printf '\nHost pi\n HostName pi.local\n ForwardAgent yes\n' | tee --append ~/.ssh/config
printf '\nHost pi\n HostName pi.local\n User pi\n ForwardAgent yes\n' | tee --append ~/.ssh/config

```

Expand Down
26 changes: 11 additions & 15 deletions hosts/pi/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,6 @@ let
};
in
{
nix.settings.trusted-users = [ "root" "carl" ];

users.users = {
carl = {
isNormalUser = true;
description = "Carl Thomé";
extraGroups = [ "wheel" ];
packages = with pkgs; [ ];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIF242vreA7b28tHGdr979yTEqyfIMStXn3Gqlr8OjKcS"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDJmEWvLXWvMV9S6XZApJUEaUPvTpEhPMiVWu7lZAEpQ"
];
};
};

hardware.enableRedistributableFirmware = true;

boot = {
Expand Down Expand Up @@ -108,6 +93,17 @@ in
};
};

users.users = {
pi = {
isNormalUser = true;
extraGroups = [ "wheel" ];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIF242vreA7b28tHGdr979yTEqyfIMStXn3Gqlr8OjKcS"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDJmEWvLXWvMV9S6XZApJUEaUPvTpEhPMiVWu7lZAEpQ"
];
};
};

services.avahi = {
enable = true;
nssmdns4 = true;
Expand Down

0 comments on commit 39d7f97

Please sign in to comment.