chore: add n8n-worker user and update authentication configuration

This commit is contained in:
2026-01-01 02:25:34 -05:00
parent d92e1426ba
commit 71dfd04108
4 changed files with 14 additions and 3 deletions

View File

@@ -5,6 +5,10 @@
github = ""; github = "";
gitea = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIN9tKezYidZglWBRI9/2I/cBGUUHj2dHY8rHXppYmf7F"; gitea = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIN9tKezYidZglWBRI9/2I/cBGUUHj2dHY8rHXppYmf7F";
}; };
n8n-worker = {
main = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAXeGtPPcsP2IYRQNvII41NVWhJsarEk8c4qxs/a5sXf";
};
}; };
hosts = { hosts = {

View File

@@ -1,8 +1,13 @@
let let
keys = import ../lib/keys.nix; keys = import ../lib/keys.nix;
authorizedKeys = [ keys.users.gortium.main keys.hosts.lazyworkhorse.main keys.hosts.lazyworkhorse.bootstrap ]; authorizedKeys = [
keys.users.gortium.main
keys.hosts.lazyworkhorse.main
keys.hosts.lazyworkhorse.bootstrap
];
in in
{ {
"containers.env.age".publicKeys = authorizedKeys; "containers.env.age".publicKeys = authorizedKeys;
"lazyworkhorse_host_ssh_key.age".publicKeys = authorizedKeys; "lazyworkhorse_host_ssh_key.age".publicKeys = authorizedKeys;
"n8n_ssh_key.age".publicKeys = authorizedKeys;
} }

View File

@@ -1,17 +1,18 @@
{ pkgs, inputs, config, keys, ... }: { { pkgs, inputs, config, keys, ... }: {
users.users.gortium = { users.users.gortium = {
isNormalUser = true; isNormalUser = true;
extraGroups = [ "wheel" "docker" ]; # Enable sudo for the user. extraGroups = [ "wheel" "docker" "video" "render"];
packages = with pkgs; [ packages = with pkgs; [
tree tree
btop btop
nh
]; ];
shell = pkgs.zsh; shell = pkgs.zsh;
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [
keys.users.gortium.main keys.users.gortium.main
]; ];
}; };
programs.zsh.enable = true;
security.sudo.extraRules = [ security.sudo.extraRules = [
{ {
users = [ "gortium" ]; users = [ "gortium" ];

View File

@@ -9,3 +9,4 @@
]; ];
}; };
users.groups.n8n-worker = {}; users.groups.n8n-worker = {};
}