70 lines
1.9 KiB
Nix
70 lines
1.9 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) JellyfinPlaying; }
|
|
{ inherit (services) Kavita; }
|
|
];
|
|
}
|
|
{
|
|
"Piracy" = [
|
|
{ inherit (services) Sonarr; }
|
|
{ inherit (services) Radarr; }
|
|
{ inherit (services) Lidarr; }
|
|
{ inherit (services) Bazarr; }
|
|
{ inherit (services) Prowlarr; }
|
|
];
|
|
}
|
|
];
|
|
};
|
|
nginx.virtualHosts."home.${config.my.domain}" = proxyReverse port // { };
|
|
};
|
|
};
|
|
}
|