mirror of
https://github.com/nickolaj-jepsen/nixos.git
synced 2026-01-22 16:16:50 +01:00
refactor: move homelab config to module
This commit is contained in:
parent
742a55e5a0
commit
e03f3af01d
19 changed files with 123 additions and 62 deletions
37
modules/homelab/flame.nix
Normal file
37
modules/homelab/flame.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
lib.mkIf config.fireproof.homelab.enable (let
|
||||
dataDir = "/var/lib/flame";
|
||||
domain = "flame.nickolaj.com";
|
||||
in {
|
||||
services.restic.backups.homelab = {
|
||||
paths = [dataDir];
|
||||
exclude = ["/var/lib/flame/db_backups"];
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."${domain}" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:5005";
|
||||
};
|
||||
};
|
||||
|
||||
virtualisation.oci-containers = {
|
||||
containers = {
|
||||
flame = {
|
||||
autoStart = true;
|
||||
image = "pawelmalak/flame:2.3.1";
|
||||
volumes = [
|
||||
"${dataDir}:/app/data"
|
||||
];
|
||||
ports = [
|
||||
"127.0.0.1:5005:5005"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue