mirror of
https://github.com/Stunkymonkey/nixos.git
synced 2025-07-06 01:29:28 +02:00
service/homer: simplify
This commit is contained in:
parent
efd88fb11b
commit
6d3a814015
2 changed files with 36 additions and 38 deletions
|
@ -10,10 +10,8 @@ let
|
|||
inherit (config.networking) domain;
|
||||
|
||||
homeConfig = {
|
||||
title = "Dashboard";
|
||||
header = false;
|
||||
footer = false;
|
||||
connectivityCheck = true;
|
||||
columns = "auto";
|
||||
services = config.lib.webapps.homerServices;
|
||||
};
|
||||
|
@ -26,18 +24,11 @@ in
|
|||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
# TODO: 25.05 use stable
|
||||
services.caddy.virtualHosts.${domain} = {
|
||||
extraConfig = ''
|
||||
import common
|
||||
root * ${pkgs.unstable.homer}
|
||||
file_server
|
||||
handle_path /assets/config.yml {
|
||||
root * ${pkgs.writeText "homerConfig.yml" (builtins.toJSON homeConfig)}
|
||||
file_server
|
||||
}
|
||||
'';
|
||||
useACMEHost = domain;
|
||||
services.homer = {
|
||||
enable = true;
|
||||
virtualHost.caddy.enable = true;
|
||||
virtualHost.domain = domain;
|
||||
settings = homeConfig;
|
||||
};
|
||||
|
||||
webapps = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue