diff options
| author | quentin@aristote.fr <quentin@aristote.fr> | 2025-03-16 12:35:30 +0100 |
|---|---|---|
| committer | quentin@aristote.fr <quentin@aristote.fr> | 2025-03-16 14:57:24 +0100 |
| commit | 1210ffbc81b4245e47acc64ffa92db3cea522329 (patch) | |
| tree | eb6e955a9216380a67b341878319e48d3d384c83 /config/users.nix | |
| parent | 5e6725b72d276fb47f7e118e45e3dfd409c36320 (diff) | |
users: add hermes user
Diffstat (limited to 'config/users.nix')
| -rw-r--r-- | config/users.nix | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/config/users.nix b/config/users.nix index c6b2e7d..8dc27a3 100644 --- a/config/users.nix +++ b/config/users.nix @@ -1,16 +1,32 @@ {pkgs, ...}: { personal.user.enable = true; users = { - users."nixremote" = { - isSystemUser = true; - shell = pkgs.busybox-sandbox-shell; - group = "nixremote"; - openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEgohiYF2Dsaq6ImGaslnKJMwpiVtwAaM9cm1tpSRr7t root@kerberos" - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGstvYymapGvkjvKbFqkMZtE9ft9uEM13n8q798HtOT+ root@hermes" - ]; + users = { + nixremote = { + isSystemUser = true; + shell = pkgs.busybox-sandbox-shell; + group = "nixremote"; + openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEgohiYF2Dsaq6ImGaslnKJMwpiVtwAaM9cm1tpSRr7t root@kerberos" + ]; + }; + hermes = { + isNormalUser = true; + shell = pkgs.busybox-sandbox-shell; + openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGstvYymapGvkjvKbFqkMZtE9ft9uEM13n8q798HtOT+ root@hermes" + ]; + homeMode = "700"; + }; }; groups.nixremote = {}; }; - nix.settings.trusted-users = ["nixremote"]; + + system.userActivationScripts.hermesSetup = '' + if [ $(whoami) = hermes ] + then + mkdir --parents --mode=700 nixos-configuration + git init --bare nixos-configuration + fi + ''; } |
