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 = [
./colmena
./desktops
./gaming
./git

View file

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

View file

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