mirror of
https://github.com/Stunkymonkey/nixos.git
synced 2025-07-05 09:19:28 +02:00
55 lines
950 B
Nix
55 lines
950 B
Nix
# Dashboard site
|
|
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
let
|
|
cfg = config.my.services.homer;
|
|
inherit (config.networking) domain;
|
|
|
|
homeConfig = {
|
|
header = false;
|
|
footer = false;
|
|
columns = "auto";
|
|
services = config.lib.webapps.homerServices;
|
|
};
|
|
in
|
|
{
|
|
imports = [ ./config.nix ];
|
|
|
|
options.my.services.homer = with lib; {
|
|
enable = mkEnableOption "Homer Dashboard";
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
services.homer = {
|
|
enable = true;
|
|
virtualHost.caddy.enable = true;
|
|
virtualHost.domain = domain;
|
|
settings = homeConfig;
|
|
};
|
|
|
|
webapps = {
|
|
dashboardCategories = [
|
|
{
|
|
name = "Applications";
|
|
tag = "app";
|
|
}
|
|
{
|
|
name = "Media";
|
|
tag = "media";
|
|
}
|
|
{
|
|
name = "Infrastructure";
|
|
tag = "infra";
|
|
}
|
|
{
|
|
name = "Others";
|
|
tag = "other";
|
|
}
|
|
];
|
|
};
|
|
};
|
|
}
|