The sudo user was stupid. Provide a password protected key for the root user, have colmena go through that. As intended.

This commit is contained in:
Bun 2025-06-01 16:39:21 -04:00
parent e5abaafa8d
commit 90976edeec
4 changed files with 4 additions and 25 deletions

View file

@ -1,4 +0,0 @@
{ ... }:
{
deployment.targetUser = "sudo";
}

View file

@ -1,7 +1,6 @@
{ ... }: { ... }:
{ {
imports = [ imports = [
./colmena
./desktops ./desktops
./gaming ./gaming
./git ./git

View file

@ -5,7 +5,6 @@
services.openssh = { services.openssh = {
enable = true; enable = true;
settings = { settings = {
AllowGroups = [ "users" ];
AuthenticationMethods = "publickey"; AuthenticationMethods = "publickey";
PermitEmptyPasswords = true; PermitEmptyPasswords = true;
PrintLastLog = "no"; PrintLastLog = "no";

View file

@ -3,25 +3,10 @@
security.sudo-rs = { security.sudo-rs = {
enable = true; enable = true;
execWheelOnly = true; execWheelOnly = true;
extraRules = [
{
users = [ "sudo" ];
commands = [
{
command = "ALL";
options = [ "NOPASSWD" ];
}
];
}
];
}; };
# Create a user that has admin non-interactively # Allow root to be accessed via ssh
users.users.sudo = { users.users.root.openssh.authorizedKeys.keys = [
isNormalUser = true; "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIN3B9Uf3h5JiD2HjF/vQ5Zx9pibMgRrlf7ZoBktev9eB Warden"
extraGroups = [ "wheel" ]; ];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIN3B9Uf3h5JiD2HjF/vQ5Zx9pibMgRrlf7ZoBktev9eB Warden"
];
};
} }