refactor: restructure config files
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
{ config, ... }:
|
||||
let
|
||||
repo = config.repo;
|
||||
repoHelpers = repo.helpers;
|
||||
service = repo.services.actual;
|
||||
in
|
||||
{
|
||||
flake.modules.nixos.actual =
|
||||
{ lib, ... }:
|
||||
lib.mkMerge [
|
||||
{
|
||||
services.actual = {
|
||||
enable = true;
|
||||
openFirewall = false;
|
||||
settings = {
|
||||
inherit (service) port;
|
||||
hostname = service.host;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
(repoHelpers.mkCaddyReverseProxy {
|
||||
inherit (service)
|
||||
domain
|
||||
port
|
||||
;
|
||||
})
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user