Archived
hosts/server/host.nix and hosts/nix-cache/host.nix each hand-rolled the
same sops secret/template/environmentFile wiring for the beszel agent
token, differing only in the sops file path and template name. Factor
it into modules/beszel/host-token.nix ({ name, sopsFile }) so a third
host can adopt it without copy-pasting the boilerplate again. Also
drops two dead, stale commented-out HUB_URL lines left over from
before variables.nix grew a homeDomain var.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01La55Nsss8jZ7ZuzUV9mfot
25 lines
683 B
Nix
25 lines
683 B
Nix
{ vars, ... }:
|
|
|
|
{
|
|
imports = [
|
|
(import ../../modules/beszel/host-token.nix {
|
|
name = "server";
|
|
sopsFile = ../../secrets/server.yaml;
|
|
})
|
|
];
|
|
|
|
networking.hostName = vars.nfsServerHost;
|
|
networking.hostId = "6689f93e";
|
|
|
|
services.beszel.agent.environment = {
|
|
#DOCKER_HOST = "tcp://docker-socket-proxy:2375";
|
|
KEY = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFPR9kwtC4TAeTRu46A7+opZsYpxqkRJ+x/ZyB2GWCeG";
|
|
EXTRA_FILESYSTEMS = "${vars.storageRoot}/docker/volumes";
|
|
LOG_LEVEL = "debug";
|
|
};
|
|
|
|
# Preserved from the pre-refactor `server` target — stateVersion must never
|
|
# be bumped on an already-installed machine.
|
|
system.stateVersion = "25.05";
|
|
}
|