From 7000c4862975ba4c5911ce8967fda22d8d43e34c Mon Sep 17 00:00:00 2001 From: Lilac Date: Sat, 26 Sep 2026 17:46:20 -0400 Subject: [PATCH] fix deploy-rs root access somehow --- flake.nix | 6 +++--- lilac.nix | 2 ++ modules/ssh.nix | 5 +---- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/flake.nix b/flake.nix index 9e8c7c9..d16cc28 100644 --- a/flake.nix +++ b/flake.nix @@ -60,7 +60,7 @@ deploy.nodes = { desktop = { hostname = "10.0.0.2"; - sshUser = "root"; + sshUser = "lilac"; magicRollbackTimeout = 120; profiles.system = { user = "root"; @@ -71,7 +71,7 @@ vps = { hostname = "10.0.0.3"; - sshUser = "root"; + sshUser = "lilac"; magicRollbackTimeout = 120; profiles.system = { user = "root"; @@ -82,7 +82,7 @@ backup = { hostname = "10.0.0.4"; - sshUser = "root"; + sshUser = "lilac"; magicRollbackTimeout = 120; profiles.system = { user = "root"; diff --git a/lilac.nix b/lilac.nix index dcfb509..c462538 100644 --- a/lilac.nix +++ b/lilac.nix @@ -8,6 +8,8 @@ }; users.groups.lilac = {}; + nix.settings.trusted-users = [ "root" "lilac" ]; + programs.zsh.enable = true; users.users.lilac.shell = pkgs.zsh; security.sudo.wheelNeedsPassword = false; diff --git a/modules/ssh.nix b/modules/ssh.nix index 84c5ab5..382adfc 100644 --- a/modules/ssh.nix +++ b/modules/ssh.nix @@ -9,7 +9,7 @@ services.openssh = { enable = true; settings = { - PermitRootLogin = "prohibit-password"; + PermitRootLogin = "no"; PasswordAuthentication = false; KbdInteractiveAuthentication = false; }; @@ -22,7 +22,4 @@ users.users.lilac.openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIE6kdpZqaqtyfGVNRxpA24sw37MGpXV/NUaALTEt98EK lilac@laptop" ]; - users.users.root.openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIE6kdpZqaqtyfGVNRxpA24sw37MGpXV/NUaALTEt98EK lilac@laptop" - ]; }