Merge branch 'homelab'

This commit is contained in:
muon 2024-11-29 16:31:15 +00:00
commit 8bbe4f9a6c
26 changed files with 767 additions and 237 deletions

View file

@ -9,5 +9,6 @@
./wireguard.nix
./headscale.nix
./photoprism.nix
./search.nix
];
}

View file

@ -6,12 +6,20 @@
};
};
config = lib.mkIf config.mods.server.media.enable {
services.jellyfin = {
enable = true;
openFirewall = true;
user="${config.mods.user.name}";
user = "${config.mods.user.name}";
};
services.immich = {
enable = true;
openFirewall = true;
host = "0.0.0.0";
# user = "${config.mods.user.name}";
};
users.users.immich.extraGroups = [ "video" "render" ];
};
}

View file

@ -0,0 +1,48 @@
{ pkgs, lib, config, ... }:
let
inherit (lib) types mkOption mkEnableOption;
cfg = config.mods.server.search;
in {
options.mods.server.search = {
enable = mkEnableOption {
default = false;
description = "enables search engine server";
};
port = mkOption {
type = types.port;
default = 8081;
};
nginx = mkOption {
type = types.nullOr types.str;
default = "search";
};
};
config = {
services.searx = lib.mkIf cfg.enable {
enable = true;
runInUwsgi = true;
uwsgiConfig = {
disable-logging = true;
http = ":${toString cfg.port}";
};
settings = {
server.port = cfg.port;
server.bind_address = "0.0.0.0";
server.secret_key = "temporary-before-sops";
enabled_plugins = [ "Hostnames plugin" "Tracker URL remover" ];
hostnames.remove = [ "(.*.)?facebook.com$" ];
hostnames.replace = {
"(.*.)?reddit.com$" = "redlib.northboot.xyz";
"(.*.)?youtube.com$" = "invidious.example.com";
};
};
};
};
}