mirror of
https://github.com/anotherhadi/nixy.git
synced 2026-04-02 11:12:09 +02:00
61 lines
1.4 KiB
Nix
61 lines
1.4 KiB
Nix
# Glance is a self-hosted homepage/dashboard service.
|
|
{
|
|
config,
|
|
lib,
|
|
...
|
|
}: {
|
|
imports = [./home.nix ./server.nix];
|
|
|
|
services = {
|
|
glance = {
|
|
enable = true;
|
|
settings = {
|
|
# theme.contrast-multiplier = lib.mkForce 1.4;
|
|
server.port = 5678;
|
|
};
|
|
};
|
|
cloudflared.tunnels."a1dfa315-7fc3-4a65-8c02-8387932c35c3".ingress = {
|
|
"start.hadi.icu" = "http://localhost:8755";
|
|
"home.hadi.icu" = "http://localhost:8755";
|
|
"glance.hadi.icu" = "http://localhost:8755";
|
|
};
|
|
|
|
nginx.virtualHosts."glance.local" = {
|
|
listen = [
|
|
{
|
|
addr = "127.0.0.1";
|
|
port = 8755;
|
|
}
|
|
];
|
|
locations."/" = {
|
|
proxyPass = "http://127.0.0.1:${toString config.services.glance.settings.server.port}";
|
|
extraConfig = ''
|
|
proxy_cache_valid 200 30m;
|
|
proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;
|
|
add_header X-Cache-Status $upstream_cache_status;
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
|
|
systemd.services.glance.serviceConfig = {
|
|
DynamicUser = lib.mkForce false;
|
|
User = "glance";
|
|
Group = "glance";
|
|
};
|
|
|
|
users = {
|
|
groups.glance = {};
|
|
users.glance = {
|
|
isSystemUser = true;
|
|
description = "Glance user";
|
|
group = "glance";
|
|
};
|
|
};
|
|
|
|
sops.secrets.adguard-pwd = {
|
|
owner = "glance";
|
|
mode = "0600";
|
|
};
|
|
}
|