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:
parent
e5abaafa8d
commit
90976edeec
4 changed files with 4 additions and 25 deletions
|
@ -1,4 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
deployment.targetUser = "sudo";
|
||||
}
|
|
@ -1,7 +1,6 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./colmena
|
||||
./desktops
|
||||
./gaming
|
||||
./git
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
AllowGroups = [ "users" ];
|
||||
AuthenticationMethods = "publickey";
|
||||
PermitEmptyPasswords = true;
|
||||
PrintLastLog = "no";
|
||||
|
|
|
@ -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 = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIN3B9Uf3h5JiD2HjF/vQ5Zx9pibMgRrlf7ZoBktev9eB Warden"
|
||||
];
|
||||
};
|
||||
# Allow root to be accessed via ssh
|
||||
users.users.root.openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIN3B9Uf3h5JiD2HjF/vQ5Zx9pibMgRrlf7ZoBktev9eB Warden"
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue