Compare commits

16 Commits
Author SHA1 Message Date
poslop 5e0bcc53ff write test 2026-08-28 09:21:45 -05:00
poslop 15b0702eb4 flake update 2026-08-21 09:40:56 -05:00
poslop d54d954dff secrets: re-encrypt hermes-env.age 2026-08-19 16:59:16 -05:00
poslop 7ae32770d5 hermes: add serve and dashboard services, run as hermes user
- Add hermes-serve (port 9120) for desktop JSON-RPC backend
- Add hermes-dashboard (port 9121) for web UI
- Both docker exec with -u hermes to avoid root-owned files
- Add BW_SERVERURL env var
- Expose port 9120 in container extraOptions
2026-08-19 16:59:13 -05:00
poslop d0dc1743e1 core/network: enable netbird 2026-08-19 16:59:08 -05:00
poslop 96865caaeb hermes-vm: narrow module import to modules/core 2026-08-19 16:59:05 -05:00
poslop 590f4a70ac flake.lock: bump inputs (hyprland, flake-parts, hermes-agent) 2026-08-19 16:59:01 -05:00
poslop 434e6dfb97 k3s: allow traefik dashboard port 8969 2026-07-30 21:05:15 -05:00
poslop dac900756c k3s: bind-mount apps/ from separate poslop/k3s repo, add traefik firewall port 2026-07-30 20:09:40 -05:00
poslop 765be54fb5 Revert "netbird: fresh setup routed through built-in traefik, secrets via kubectl not git"
This reverts commit 8b65c53a11.
2026-07-30 18:29:00 -05:00
poslop 8b65c53a11 netbird: fresh setup routed through built-in traefik, secrets via kubectl not git 2026-07-30 18:27:55 -05:00
poslop eadba798ea k3s: wipe netbird/traefik manifests, back to bare k3s 2026-07-30 18:17:59 -05:00
poslop 942d9e2350 add yamlfmt to dev packages 2026-07-30 18:03:05 -05:00
poslop 10637d950f hermes-age changes 2026-07-28 21:47:06 -05:00
poslop f9289fa766 netbird: move authSecret out of git into k8s secret (netbird-relay-auth), render via init container 2026-07-23 13:45:04 -05:00
poslop 5b62e26752 rotate netbird authSecret 2026-07-23 13:33:51 -05:00
19 changed files with 174 additions and 414 deletions
+1
View File
@@ -0,0 +1 @@
test
Generated
+85 -85
View File
@@ -41,11 +41,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1784368054, "lastModified": 1786464219,
"narHash": "sha256-zF1iJkBQSDWmRO4/LEeHR1SpKY0lqZaxkoQJpPS9K9U=", "narHash": "sha256-WKqWL8r7CyTDYueTr2ffJ9ya50dellv6IR1JX5PghDY=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "aquamarine", "repo": "aquamarine",
"rev": "9b5f14d9483445e766294eb8fbe0b8f370269ed0", "rev": "f3d1804205e8158c15595cdda1b566f93349ffae",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -100,11 +100,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1772408722, "lastModified": 1782949081,
"narHash": "sha256-rHuJtdcOjK7rAHpHphUb1iCvgkU3GpfvicLMwwnfMT0=", "narHash": "sha256-vp6Y/Grm98ESt6ceOkWiHWyZRDV3J1RID4w+6NWK9yA=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "f20dc5d9b8027381c474144ecabc9034d6a839a3", "rev": "17c9d6cdfc60c64f4ee8d306f9bc0b4ccb51481e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -116,6 +116,7 @@
"hermes-agent": { "hermes-agent": {
"inputs": { "inputs": {
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"home-manager": "home-manager_2",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_2",
"npm-lockfile-fix": "npm-lockfile-fix", "npm-lockfile-fix": "npm-lockfile-fix",
"pyproject-build-systems": "pyproject-build-systems", "pyproject-build-systems": "pyproject-build-systems",
@@ -123,11 +124,11 @@
"uv2nix": "uv2nix" "uv2nix": "uv2nix"
}, },
"locked": { "locked": {
"lastModified": 1784644108, "lastModified": 1787314587,
"narHash": "sha256-WFwNw701EOVHRwEpgifbYQaT68LOxATKDTXaep82yN4=", "narHash": "sha256-oeFJlEoFybqKkbuWT4mW8PRauusjt3y44ZJXAcA7TPY=",
"owner": "NousResearch", "owner": "NousResearch",
"repo": "hermes-agent", "repo": "hermes-agent",
"rev": "d604141d097eec4a49493ad1eaceb9b2ca1e496d", "rev": "fcbd1076a93841fa88855acce810e342a5b78101",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -143,11 +144,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1784601896, "lastModified": 1787194407,
"narHash": "sha256-rkpUOBv9pVG+GxhK90ebCrFpvjnfP4u2y/iGrzA42K4=", "narHash": "sha256-hMgbN6InoW+S5G/cqGrVwHUmOJcGIT/yUg1Xe6y7t8Q=",
"owner": "feel-co", "owner": "feel-co",
"repo": "hjem", "repo": "hjem",
"rev": "35e95ebb9557ac41a72fe00dd55218d1a7f21679", "rev": "7cd7f1c567beaf5527781e0b51647a98acde54e6",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -161,17 +162,16 @@
"hjem": [ "hjem": [
"hjem" "hjem"
], ],
"nix-darwin": "nix-darwin",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
] ]
}, },
"locked": { "locked": {
"lastModified": 1784361899, "lastModified": 1787315974,
"narHash": "sha256-QIzbnJIwy5cMYvPmLYPA4ar0lhficYLKZ6ytcHK90Uo=", "narHash": "sha256-LLToYudTlFqNY0NsG//CnE2I/zF0cpktX44ZhFJ2alY=",
"owner": "snugnug", "owner": "snugnug",
"repo": "hjem-rum", "repo": "hjem-rum",
"rev": "73f6d1c01fe94e3de1cb3a84b9346da52f483c60", "rev": "217c6e1f445b3973ca8f988f070c9b84cceaa1ca",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -201,6 +201,27 @@
"type": "github" "type": "github"
} }
}, },
"home-manager_2": {
"inputs": {
"nixpkgs": [
"hermes-agent",
"nixpkgs"
]
},
"locked": {
"lastModified": 1786487128,
"narHash": "sha256-ad60hrRVhH/bo3Jl1YLzO+QcS3mUNZr9LNJdzhMO2P4=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "f404edbfa4117810c96b97048299242fc50e5362",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"hyprcursor": { "hyprcursor": {
"inputs": { "inputs": {
"hyprlang": [ "hyprlang": [
@@ -217,11 +238,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1776511930, "lastModified": 1786464181,
"narHash": "sha256-fCpwFiTW0rT7oKJqr3cqHMnkwypSwQKpbtUEtxdkgrM=", "narHash": "sha256-2alOMkLjXANh7unkZnYnCF2K2rApZaOLMoQ3o+VX2CY=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprcursor", "repo": "hyprcursor",
"rev": "39435900785d0c560c6ae8777d29f28617d031ef", "rev": "e4ed7c08123df5af460a0a70961380cbfb872f76",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -246,11 +267,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1782566056, "lastModified": 1786464367,
"narHash": "sha256-haEZcHzYrePnjFOYSWTbxm/Nrla0aPslJfmvdCvqtVc=", "narHash": "sha256-k58p4wbzIXWyRWrW84pP8tD+iaZSSYiiM+fr0Auk4oU=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprgraphics", "repo": "hyprgraphics",
"rev": "c6e7b9f673f4360bc813d3dc75028f75ee88d3f8", "rev": "7c895c44e3ca6d28ed68ddd80ec02b02b925e7fc",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -276,11 +297,11 @@
"xdph": "xdph" "xdph": "xdph"
}, },
"locked": { "locked": {
"lastModified": 1784641930, "lastModified": 1787311583,
"narHash": "sha256-j1c/65skFvp1WPbHBlAfVWaeCz0Bgwr/WPwIg0H+Ncg=", "narHash": "sha256-EXpfUX7oLzqwd+m/T1TvH/rHwnTNtZL+TZ5wiCwklMo=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "Hyprland", "repo": "Hyprland",
"rev": "1a3606234c59842340ad9a42baeeffe44a9d6cda", "rev": "0f97a22d1172d8fbd77834ec932383ed18110edb",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -322,11 +343,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1784196523, "lastModified": 1786464504,
"narHash": "sha256-ahtKMGXFJdlQNhatQm1+BBU/pGfGYnAqQt3vWvq4p8s=", "narHash": "sha256-7sHwM86KILQyHDHDuE2SDBlQ2jvZ0EW3hY7sW009/cg=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprland-guiutils", "repo": "hyprland-guiutils",
"rev": "a6ccb6cb112ed5a244c0191fb972347ecfa893e0", "rev": "4c30cf3097ea963c0e250749ee0c59f8b08816d6",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -376,11 +397,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1777320127, "lastModified": 1786464129,
"narHash": "sha256-Qu+Wf2Bp5qUjyn2YpZNq8a7JyzTGowhT1knrwE38a9U=", "narHash": "sha256-339AkTlpMYSIvFuG0rnR+8Yg4/AZKeJalshJavlnKfg=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprlang", "repo": "hyprlang",
"rev": "090117506ddc3d7f26e650ff344d378c2ec329cc", "rev": "9508458be316a0d70d37ebed1ab725ccd10411ff",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -428,11 +449,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1782554491, "lastModified": 1785930473,
"narHash": "sha256-+p3MlyN/nqRefcf2IckPlGRUn9+hielqpS9XClbLleM=", "narHash": "sha256-DitTu625BhEYpZjtjxtGpjrEJwPwW+X/+jJvhSZNSJM=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprtoolkit", "repo": "hyprtoolkit",
"rev": "bdba25ced39ea39ab004a8f31593ba0b0ff1ca35", "rev": "af515b69dfbe366dc7873aa1475cb2f4db3ebad7",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -453,11 +474,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1784323413, "lastModified": 1786464080,
"narHash": "sha256-XnAVV+H4f8Xdv0yZcSwJ5kCjLyE8fHxPeLX6a3HSrAU=", "narHash": "sha256-W1hxvumEM57yV+QwsZ4QdAHEqOkr7e4S8VAkLX60qDE=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprutils", "repo": "hyprutils",
"rev": "5f03477ab3a005ff27c527486f551883535aea2f", "rev": "c157fe1e3092b980cc69315a6631f89aff09dcce",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -478,11 +499,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1777159683, "lastModified": 1786464033,
"narHash": "sha256-Jxixw6wZphUp+nHYxOKUYSckL17QMBx2d5Zp0rJHr1g=", "narHash": "sha256-QM8Qe4/L8lpdVN4bgwahmi+jyyc4fisseDMe4afcDxA=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprwayland-scanner", "repo": "hyprwayland-scanner",
"rev": "b8632713a6beaf28b56f2a7b0ab2fb7088dbb404", "rev": "62e62c1ca23da17612c6890d4ad2064f575643db",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -507,11 +528,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1778410714, "lastModified": 1786464294,
"narHash": "sha256-o6RzFj4nJXaPRY7EM01siuCQeT41RfwwmcmFQqwFJJg=", "narHash": "sha256-ZQsZ2WvBdkboCIyh8LStDPdAIARmxzn0XMNxxoOhjPE=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprwire", "repo": "hyprwire",
"rev": "85148a8e612808cf5ddb25d0b3c5840f3498a7dc", "rev": "4ce7cd6b6128c1ac41caf23c58a30a26b327f9dd",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -520,27 +541,6 @@
"type": "github" "type": "github"
} }
}, },
"nix-darwin": {
"inputs": {
"nixpkgs": [
"hjem-rum",
"nixpkgs"
]
},
"locked": {
"lastModified": 1779036909,
"narHash": "sha256-zXcwYQGCT6pzinK+1dBB2ekTVtfxGZAapb3Evdcu4fY=",
"owner": "nix-darwin",
"repo": "nix-darwin",
"rev": "56c666e108467d87d13508936aade6d567f2a501",
"type": "github"
},
"original": {
"owner": "nix-darwin",
"repo": "nix-darwin",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1754028485, "lastModified": 1754028485,
@@ -559,11 +559,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1775036866, "lastModified": 1785318670,
"narHash": "sha256-ZojAnPuCdy657PbTq5V0Y+AHKhZAIwSIT2cb8UgAz/U=", "narHash": "sha256-dN6Ou5x/+23FZLEpYP3IffO+NyJFzUlGumt1uu3MMaY=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "6201e203d09599479a3b3450ed24fa81537ebc4e", "rev": "0954f7ee2f6bb3dc7d4e3d0d8bcb8fd4bde4cfc5",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -575,11 +575,11 @@
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1784356753, "lastModified": 1786247143,
"narHash": "sha256-12KrbMiWLcf8m7pCvAtZh1ZrgF85ZXDXvfR/fWTKy84=", "narHash": "sha256-8S3Kcxs7D4UtxJxSJZz0m14CGhuW0MxfrIwJxeGWGnQ=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "61b7c44c4073f0b827768aff0049561b5110ea5a", "rev": "279b4a8275f032c566576b3f181fa0f27197f588",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -591,11 +591,11 @@
}, },
"nixpkgs_4": { "nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1784497964, "lastModified": 1787135253,
"narHash": "sha256-vlHUuqAcbcH2RKmHbPiuQzbv1pnzzavXnI62RD0bqCU=", "narHash": "sha256-RD2kNWCG+Bjo6h+JVjWVNntZs2GtRoeY2xHjts/FNkA=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "241313f4e8e508cb9b13278c2b0fa25b9ca27163", "rev": "ffb3c9b700e759be2ef13237c9d8f953b32a1e46",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -664,11 +664,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1772555609, "lastModified": 1785115949,
"narHash": "sha256-3BA3HnUvJSbHJAlJj6XSy0Jmu7RyP2gyB/0fL7XuEDo=", "narHash": "sha256-8AM37BfyGaL2v/SZyg4PupRxJ01Y4htvM+WrTjWrPpo=",
"owner": "pyproject-nix", "owner": "pyproject-nix",
"repo": "build-system-pkgs", "repo": "build-system-pkgs",
"rev": "c37f66a953535c394244888598947679af231863", "rev": "62c0d86027edb1c4f39a5facc09876348144f7c9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -685,11 +685,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1772865871, "lastModified": 1784591072,
"narHash": "sha256-/ZTSg97aouL0SlPHaokA4r3iuH9QzHVuWPACD2CUCFY=", "narHash": "sha256-zP/WaDxrRu8GANZM61+V2LT/7ycEEdoyLWn7M6WzU7M=",
"owner": "pyproject-nix", "owner": "pyproject-nix",
"repo": "pyproject.nix", "repo": "pyproject.nix",
"rev": "e537db02e72d553cea470976b9733581bcf5b3ed", "rev": "e3b599ca2e7fcf93d4edf65d7f19bbf6491724f3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -750,11 +750,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1773039484, "lastModified": 1785277507,
"narHash": "sha256-+boo33KYkJDw9KItpeEXXv8+65f7hHv/earxpcyzQ0I=", "narHash": "sha256-9Tq3UDX2hD/aveW/HvkBlAmEwJTOlY5HQXJM+L5BGmE=",
"owner": "pyproject-nix", "owner": "pyproject-nix",
"repo": "uv2nix", "repo": "uv2nix",
"rev": "b68be7cfeacbed9a3fa38a2b5adc0cfb81d9bb1f", "rev": "5a836d395cbf5fc22670eb98dd4aa4fc4d406977",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -791,11 +791,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1784371182, "lastModified": 1786464334,
"narHash": "sha256-S8A1lezEalltWcCp3gAic5lssS0xTSISK6fKODefhOk=", "narHash": "sha256-/TBQT5rhBB2Dm4HoZzhGDaCwYmRTs3W3DPhMXFWc/BU=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland", "repo": "xdg-desktop-portal-hyprland",
"rev": "08d99f727944dd15e4740090305e31c5fb92a50a", "rev": "9f0e9ff02739cd538d39bd706422dc50e9ca60dd",
"type": "github" "type": "github"
}, },
"original": { "original": {
+1 -1
View File
@@ -3,7 +3,7 @@
{ {
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
../../modules ../../modules/core
../../modules/hermes ../../modules/hermes
]; ];
+2
View File
@@ -3,4 +3,6 @@
{ {
networking.hostName = host; networking.hostName = host;
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
services.netbird.enable = true;
} }
+1
View File
@@ -5,6 +5,7 @@
neovim neovim
git git
tree-sitter tree-sitter
yamlfmt
gcc gcc
# lua # lua
+1 -1
View File
@@ -17,7 +17,7 @@ alias gs='git status'
alias hermes='docker exec -it -u hermes hermes-agent /data/current-package/bin/hermes' alias hermes='docker exec -it -u hermes hermes-agent /data/current-package/bin/hermes'
alias hermes-age='cd /etc/rice-flakes/modules/hermes/secrets && sudo EDITOR=nvim agenix -e ./hermes-env.age -i /etc/ssh/ssh_host_ed25519_key' alias hermes-age='cd /etc/rice-flakes/modules/hermes/secrets && sudo EDITOR=nvim agenix -e hermes-env.age -i /etc/ssh/ssh_host_ed25519_key'
ga() { ga() {
if [[ -z "$1" ]]; then if [[ -z "$1" ]]; then
+67 -2
View File
@@ -1,6 +1,8 @@
{ {
inputs, inputs,
config, config,
lib,
pkgs,
... ...
}: }:
@@ -14,6 +16,10 @@
config.age.secrets.hermes-env.path config.age.secrets.hermes-env.path
]; ];
environment = {
BW_SERVERURL = "https://vault.archfox.org";
};
container = { container = {
image = "debian:bookworm"; image = "debian:bookworm";
backend = "docker"; backend = "docker";
@@ -24,6 +30,8 @@
"9119:9119" "9119:9119"
"-p" "-p"
"8642:8642" "8642:8642"
"-p"
"9120:9120"
]; ];
}; };
@@ -44,8 +52,8 @@
}; };
delegation = { delegation = {
model = "openai/gpt-5.6-luna"; model = "us.anthropic.claude-sonnet-5";
provider = "nous"; provider = "bedrock";
}; };
discord = { discord = {
@@ -55,9 +63,66 @@
}; };
}; };
# Hermes serve (desktop app JSON-RPC backend, headless)
# Port 9120 avoids conflict with the gateway's API server on 9119.
systemd.services.hermes-serve = {
description = "Hermes Agent Serve (desktop remote backend)";
wantedBy = [ "multi-user.target" ];
after = [ "hermes-agent.service" "network-online.target" ];
wants = [ "network-online.target" ];
requires = [ "hermes-agent.service" ];
serviceConfig = {
Type = "simple";
Restart = "always";
RestartSec = 5;
TimeoutStopSec = 15;
};
script = ''
exec ${pkgs.docker}/bin/docker exec -i -u hermes \
-e HERMES_HOME=/data/.hermes \
-e HOME=/home/hermes \
hermes-agent \
/data/current-package/bin/hermes serve \
--host 0.0.0.0 \
--port 9120
'';
};
# Hermes dashboard (web UI for browser access)
# Port 9121, full web dashboard with login page.
systemd.services.hermes-dashboard = {
description = "Hermes Agent Dashboard (web UI)";
wantedBy = [ "multi-user.target" ];
after = [ "hermes-agent.service" "network-online.target" ];
wants = [ "network-online.target" ];
requires = [ "hermes-agent.service" ];
serviceConfig = {
Type = "simple";
Restart = "always";
RestartSec = 5;
TimeoutStopSec = 15;
};
script = ''
exec ${pkgs.docker}/bin/docker exec -i -u hermes \
-e HERMES_HOME=/data/.hermes \
-e HOME=/home/hermes \
hermes-agent \
/data/current-package/bin/hermes dashboard \
--host 0.0.0.0 \
--port 9121 \
--no-open
'';
};
networking.firewall.allowedTCPPorts = [ networking.firewall.allowedTCPPorts = [
8080 8080
9119 9119
9120
9121
8642 8642
]; ];
} }
Binary file not shown.
+15 -12
View File
@@ -1,22 +1,25 @@
{ {
networking.firewall.allowedTCPPorts = [ 6443 80 443 33073 ]; networking.firewall.allowedTCPPorts = [
6443
80
443
8969
33073
];
networking.firewall.allowedUDPPorts = [ 3479 ]; networking.firewall.allowedUDPPorts = [ 3479 ];
services.k3s = { services.k3s = {
enable = true; enable = true;
role = "server"; role = "server";
extraFlags = "--write-kubeconfig-mode 644"; extraFlags = "--write-kubeconfig-mode 644";
manifests = {
traefik-namespace = { source = ./traefik/namespace.yaml; };
traefik-rbac = { source = ./traefik/rbac.yaml; };
traefik-pvc = { source = ./traefik/pvc.yaml; };
traefik-deployment = { source = ./traefik/deployment.yaml; };
traefik-service = { source = ./traefik/service.yaml; };
netbird-namespace = { source = ./netbird/namespace.yaml; };
netbird-config = { source = ./netbird/config.yaml; };
netbird-server = { source = ./netbird/server.yaml; };
netbird-dashboard = { source = ./netbird/dashboard.yaml; };
netbird-ingress = { source = ./netbird/ingress.yaml; };
}; };
fileSystems."/var/lib/rancher/k3s/server/manifests/apps" = {
device = "/home/poslop/k3s/apps";
fsType = "none";
options = [
"bind"
"ro"
];
}; };
} }
-45
View File
@@ -1,45 +0,0 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: netbird-server-config
namespace: netbird
data:
config.yaml: |
server:
listenAddress: ":80"
exposedAddress: "https://netbird.archfox.org:443"
metricsPort: 9090
healthcheckAddress: ":9000"
logLevel: "info"
logFile: "console"
stunPorts:
- 3479
tls:
certFile: ""
keyFile: ""
letsencrypt:
enabled: false
dataDir: ""
domains: []
email: ""
awsRoute53: false
authSecret: "182c13eec94ba6ef89ce8f3e33b4694b051fe4b0bf6d2c9188f738d1c000b6d7"
dataDir: "/var/lib/netbird/"
disableAnonymousMetrics: false
disableGeoliteUpdate: false
auth:
issuer: "https://netbird.archfox.org/oauth2"
localAuthDisabled: false
signKeyRefreshEnabled: true
dashboardRedirectURIs:
- "https://netbird.archfox.org/nb-auth"
- "https://netbird.archfox.org/nb-silent-auth"
cliRedirectURIs:
- "http://localhost:53000/"
store:
engine: "sqlite"
dsn: ""
encryptionKey: ""
reverseProxy:
trustedHTTPProxies:
- "10.0.1.45/32"
-56
View File
@@ -1,56 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: dashboard
namespace: netbird
spec:
replicas: 1
selector:
matchLabels:
app: dashboard
template:
metadata:
labels:
app: dashboard
spec:
containers:
- name: dashboard
image: netbirdio/dashboard:latest
ports:
- containerPort: 80
env:
- name: NETBIRD_MGMT_API_ENDPOINT
value: "https://netbird.archfox.org"
- name: NETBIRD_MGMT_GRPC_API_ENDPOINT
value: "https://netbird.archfox.org"
- name: AUTH_AUDIENCE
value: "netbird-dashboard"
- name: AUTH_CLIENT_ID
value: "netbird-dashboard"
- name: AUTH_CLIENT_SECRET
value: ""
- name: AUTH_AUTHORITY
value: "https://netbird.archfox.org/oauth2"
- name: USE_AUTH0
value: "false"
- name: AUTH_SUPPORTED_SCOPES
value: "openid profile email groups"
- name: AUTH_REDIRECT_URI
value: "/nb-auth"
- name: AUTH_SILENT_REDIRECT_URI
value: "/nb-silent-auth"
- name: LETSENCRYPT_DOMAIN
value: "none"
---
apiVersion: v1
kind: Service
metadata:
name: dashboard
namespace: netbird
spec:
selector:
app: dashboard
ports:
- name: http
port: 80
targetPort: 80
-26
View File
@@ -1,26 +0,0 @@
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: netbird
namespace: netbird
spec:
entryPoints:
- web
routes:
- match: Host(`netbird.archfox.org`) && (PathPrefix(`/management.ManagementService/`) || PathPrefix(`/signalexchange.SignalExchange/`) || PathPrefix(`/management.ProxyService/`))
kind: Rule
services:
- name: netbird-server
port: 80
scheme: h2c
- match: Host(`netbird.archfox.org`) && (PathPrefix(`/relay`) || PathPrefix(`/ws-proxy/`) || PathPrefix(`/api`) || PathPrefix(`/oauth2`))
kind: Rule
services:
- name: netbird-server
port: 80
- match: Host(`netbird.archfox.org`)
kind: Rule
priority: 1
services:
- name: dashboard
port: 80
-4
View File
@@ -1,4 +0,0 @@
apiVersion: v1
kind: Namespace
metadata:
name: netbird
-74
View File
@@ -1,74 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: netbird-server
namespace: netbird
spec:
replicas: 1
selector:
matchLabels:
app: netbird-server
template:
metadata:
labels:
app: netbird-server
spec:
containers:
- name: netbird-server
image: netbirdio/netbird-server:latest
args: ["--config", "/etc/netbird/config.yaml"]
ports:
- containerPort: 80
- containerPort: 3479
protocol: UDP
- containerPort: 33073
env:
- name: NETBIRD_STORE_ENCRYPTION_KEY
valueFrom:
secretKeyRef:
name: netbird-encryption
key: encryptionKey
volumeMounts:
- name: config
mountPath: /etc/netbird
- name: data
mountPath: /var/lib/netbird
volumes:
- name: config
configMap:
name: netbird-server-config
- name: data
persistentVolumeClaim:
claimName: netbird-data
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: netbird-data
namespace: netbird
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 2Gi
---
apiVersion: v1
kind: Service
metadata:
name: netbird-server
namespace: netbird
spec:
selector:
app: netbird-server
ports:
- name: http
port: 80
targetPort: 80
- name: grpc-compat
port: 33073
targetPort: 33073
- name: stun
port: 3479
targetPort: 3479
protocol: UDP
-35
View File
@@ -1,35 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: traefik
namespace: traefik
spec:
replicas: 1
selector:
matchLabels:
app: traefik
template:
metadata:
labels:
app: traefik
spec:
serviceAccountName: traefik
containers:
- name: traefik
image: traefik:v3.4
args:
- --log.level=INFO
- --api.dashboard=true
- --entrypoints.web.address=:80
- --providers.kubernetescrd=true
- --providers.kubernetesingress=true
ports:
- name: web
containerPort: 80
volumeMounts:
- name: acme-storage
mountPath: /data
volumes:
- name: acme-storage
persistentVolumeClaim:
claimName: traefik-acme
-4
View File
@@ -1,4 +0,0 @@
apiVersion: v1
kind: Namespace
metadata:
name: traefik
-11
View File
@@ -1,11 +0,0 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: traefik-acme
namespace: traefik
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 128Mi
-41
View File
@@ -1,41 +0,0 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: traefik
namespace: traefik
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: traefik
rules:
- apiGroups: [""]
resources: ["services", "endpoints", "secrets", "configmaps", "nodes", "namespaces", "pods"]
verbs: ["get", "list", "watch"]
- apiGroups: ["discovery.k8s.io"]
resources: ["endpointslices"]
verbs: ["get", "list", "watch"]
- apiGroups: ["extensions", "networking.k8s.io"]
resources: ["ingresses", "ingressclasses"]
verbs: ["get", "list", "watch"]
- apiGroups: ["extensions", "networking.k8s.io"]
resources: ["ingresses/status"]
verbs: ["update"]
- apiGroups: ["traefik.io"]
resources: ["ingressroutes", "ingressroutetcps", "ingressrouteudps", "middlewares",
"middlewaretcps", "tlsoptions", "tlsstores", "traefikservices",
"serverstransports", "serverstransporttcps"]
verbs: ["get", "list", "watch"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: traefik
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: traefik
subjects:
- kind: ServiceAccount
name: traefik
namespace: traefik
-16
View File
@@ -1,16 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: traefik
namespace: traefik
spec:
type: LoadBalancer
selector:
app: traefik
ports:
- name: web
port: 80
targetPort: 80
- name: websecure
port: 443
targetPort: 443