feat(servers): add bragi the poet.
This commit is contained in:
parent
0135e2ad80
commit
1bc23db49c
12 changed files with 188 additions and 1 deletions
22
modules/servers/bragi/audiobookshelf.nix
Normal file
22
modules/servers/bragi/audiobookshelf.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{...}: {
|
||||
services.audiobookshelf = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
services.traefik.dynamicConfigOptions.http = {
|
||||
services.audiobookshelf.loadBalancer.servers = [
|
||||
{
|
||||
url = "http://localhost:8000";
|
||||
}
|
||||
];
|
||||
|
||||
routers.audiobookshelf = {
|
||||
rule = "Host(`abs.cronyakatsuki.xyz`)";
|
||||
tls = {
|
||||
certResolver = "porkbun";
|
||||
};
|
||||
service = "audiobookshelf";
|
||||
entrypoints = "websecure";
|
||||
};
|
||||
};
|
||||
}
|
7
modules/servers/bragi/default.nix
Normal file
7
modules/servers/bragi/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{...}: {
|
||||
imports = [
|
||||
./audiobookshelf.nix
|
||||
./storage-box.nix
|
||||
./secrets.nix
|
||||
];
|
||||
}
|
9
modules/servers/bragi/secrets.nix
Normal file
9
modules/servers/bragi/secrets.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
age = {
|
||||
secrets = {
|
||||
rclone = {
|
||||
file = ../../../secrets/rclone.age;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
19
modules/servers/bragi/storage-box.nix
Normal file
19
modules/servers/bragi/storage-box.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
environment.systemPackages = [pkgs.rclone];
|
||||
|
||||
fileSystems."/mnt" = {
|
||||
device = "storage:";
|
||||
fsType = "rclone";
|
||||
options = [
|
||||
"nodev"
|
||||
"nofail"
|
||||
"allow_other"
|
||||
"args2env"
|
||||
"config=${config.age.secrets.rclone.path}"
|
||||
];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue