82 lines
2.2 KiB
Nix
82 lines
2.2 KiB
Nix
{
|
|
lib,
|
|
config,
|
|
proxyReverse,
|
|
...
|
|
}:
|
|
let
|
|
port = 8082;
|
|
services = import ./homepage/services.nix { inherit config lib; };
|
|
in
|
|
{
|
|
options.my.servers.homepage.enable = lib.mkEnableOption "enable";
|
|
config = lib.mkIf config.my.servers.homepage.enable {
|
|
sops.secrets.homepage.sopsFile = ../../secrets/env.yaml;
|
|
services = {
|
|
homepage-dashboard = {
|
|
enable = true;
|
|
listenPort = port;
|
|
environmentFile = config.sops.secrets.homepage.path;
|
|
settings = {
|
|
layout = {
|
|
"Multimedia" = {
|
|
style = "row";
|
|
columns = 2;
|
|
};
|
|
"Piracy" = {
|
|
style = "row";
|
|
columns = 4;
|
|
};
|
|
};
|
|
background = "https://images.unsplash.com/photo-1502790671504-542ad42d5189?auto=format&fit=crop&w=2560&q=80";
|
|
};
|
|
widgets = [
|
|
{
|
|
resources = {
|
|
cpu = true;
|
|
cputemp = true;
|
|
units = "metric";
|
|
disk = "/";
|
|
memory = true;
|
|
};
|
|
}
|
|
{
|
|
search = {
|
|
provider = [
|
|
"brave"
|
|
"bing"
|
|
"google"
|
|
];
|
|
target = "_blank";
|
|
showSearchSuggestions = true;
|
|
};
|
|
}
|
|
];
|
|
services = [
|
|
{
|
|
"Multimedia" = [
|
|
{ inherit (services) jellyfin; }
|
|
{ inherit (services) audiobookshelf; }
|
|
{ inherit (services) "now playing"; }
|
|
{ inherit (services) kavita; }
|
|
];
|
|
}
|
|
{
|
|
"Piracy" = [
|
|
{ inherit (services) sonarr; }
|
|
{ inherit (services) radarr; }
|
|
{ inherit (services) lidarr; }
|
|
{ inherit (services) bazarr; }
|
|
{ inherit (services) prowlarr; }
|
|
# { inherit (services) sabnzbd; }
|
|
# { inherit (services) "qbittorrent server"; }
|
|
# { inherit (services) "qbittorrent miniserver"; }
|
|
];
|
|
}
|
|
];
|
|
};
|
|
nginx.virtualHosts."home.${config.my.domain}" = proxyReverse port // { };
|
|
};
|
|
};
|
|
}
|