From 71dfd0410856129307cb7dfdca7ada47641bf23a Mon Sep 17 00:00:00 2001 From: Thierry Pouplier Date: Thu, 1 Jan 2026 02:25:34 -0500 Subject: [PATCH] chore: add n8n-worker user and update authentication configuration --- lib/keys.nix | 4 ++++ secrets/secrets.nix | 7 ++++++- users/gortium.nix | 5 +++-- users/n8n-worker.nix | 1 + 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/lib/keys.nix b/lib/keys.nix index 205df0a..49027d6 100644 --- a/lib/keys.nix +++ b/lib/keys.nix @@ -5,6 +5,10 @@ github = ""; gitea = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIN9tKezYidZglWBRI9/2I/cBGUUHj2dHY8rHXppYmf7F"; }; + + n8n-worker = { + main = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAXeGtPPcsP2IYRQNvII41NVWhJsarEk8c4qxs/a5sXf"; + }; }; hosts = { diff --git a/secrets/secrets.nix b/secrets/secrets.nix index e3a853f..51ea713 100644 --- a/secrets/secrets.nix +++ b/secrets/secrets.nix @@ -1,8 +1,13 @@ let 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 { "containers.env.age".publicKeys = authorizedKeys; "lazyworkhorse_host_ssh_key.age".publicKeys = authorizedKeys; + "n8n_ssh_key.age".publicKeys = authorizedKeys; } diff --git a/users/gortium.nix b/users/gortium.nix index 2c5a300..20df0ea 100644 --- a/users/gortium.nix +++ b/users/gortium.nix @@ -1,17 +1,18 @@ { pkgs, inputs, config, keys, ... }: { users.users.gortium = { isNormalUser = true; - extraGroups = [ "wheel" "docker" ]; # Enable ‘sudo’ for the user. + extraGroups = [ "wheel" "docker" "video" "render"]; + packages = with pkgs; [ tree btop + nh ]; shell = pkgs.zsh; openssh.authorizedKeys.keys = [ keys.users.gortium.main ]; }; - programs.zsh.enable = true; security.sudo.extraRules = [ { users = [ "gortium" ]; diff --git a/users/n8n-worker.nix b/users/n8n-worker.nix index fff14f1..bbecd68 100644 --- a/users/n8n-worker.nix +++ b/users/n8n-worker.nix @@ -9,3 +9,4 @@ ]; }; users.groups.n8n-worker = {}; +}