refactor: reorganize server modules
- Moved each individual service definition into a dedicated `services/` directory under every server module (e.g. `modules/servers/bragi/services/`). - Updated the corresponding `default.nix` files to import the renamed service modules from the new location. - Applied the same changes across all server modules, ensuring the API and import paths remain consistent.
This commit is contained in:
parent
8a149c3533
commit
4e783c052b
45 changed files with 97 additions and 63 deletions
52
modules/servers/heimdall/services/beszel-hub.nix
Normal file
52
modules/servers/heimdall/services/beszel-hub.nix
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
{pkgs, ...}: {
|
||||
systemd.services.beszel-hub = {
|
||||
enable = true;
|
||||
description = "Beszel agent";
|
||||
after = ["network.target"];
|
||||
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
Restart = "always";
|
||||
RestartSec = 3;
|
||||
User = "beszel";
|
||||
Group = "beszel";
|
||||
WorkingDirectory = "/var/lib/beszel";
|
||||
};
|
||||
|
||||
script = "${pkgs.beszel}/bin/beszel-hub serve --http '127.0.0.1:6789'";
|
||||
|
||||
wantedBy = ["multi-user.target"];
|
||||
};
|
||||
|
||||
users = {
|
||||
users.beszel = {
|
||||
isSystemUser = true;
|
||||
home = "/var/lib/beszel";
|
||||
createHome = true;
|
||||
group = "beszel";
|
||||
};
|
||||
groups.beszel = {};
|
||||
};
|
||||
|
||||
services.traefik.dynamicConfigOptions.http = {
|
||||
services.beszel.loadBalancer.servers = [
|
||||
{
|
||||
url = "http://localhost:6789";
|
||||
}
|
||||
];
|
||||
|
||||
routers.beszel = {
|
||||
rule = "Host(`beszel.cronyakatsuki.xyz`)";
|
||||
tls = {
|
||||
certResolver = "porkbun";
|
||||
};
|
||||
service = "beszel";
|
||||
entrypoints = "websecure";
|
||||
};
|
||||
};
|
||||
|
||||
services.restic.backups = {
|
||||
local.paths = ["/var/lib/beszel"];
|
||||
server.paths = ["/var/lib/beszel"];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue