homepage: audiobookshelf init

This commit is contained in:
2024-07-05 20:46:50 -06:00
parent 96e5a4b8ca
commit 8d70d160cf
5 changed files with 72 additions and 11 deletions

View File

@@ -3,11 +3,46 @@ let port = 8082;
in {
options.my.servers.homepage.enable = lib.mkEnableOption "enable";
config = lib.mkIf config.my.servers.homepage.enable {
# sops.secrets.homepage.sopsFile = ../../secrets/env.yaml;
sops.secrets.homepage.sopsFile = ../../secrets/env.yaml;
services = {
homepage-dashboard = {
enable = true;
listenPort = port;
environmentFile = config.sops.secrets.homepage.path;
settings = {
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" = [{
Audiobookshelf = lib.mkIf config.my.servers.audiobookshelf.enable {
href = config.my.servers.audiobookshelf.url;
widget = {
type = "audiobookshelf";
url = config.my.servers.audiobookshelf.local;
key = "{{HOMEPAGE_VAR_AUDIOBOOKSHELF}}";
};
};
}];
}];
};
nginx = {
enable = true;