mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 09:07:21 +01:00
This commit completely restructures the flake. Hosts are now seperate from profile configuration files in hosts/[system]. Nixos and Darwin configurations will be built when present in the respective folders in hosts/
42 lines
896 B
Nix
42 lines
896 B
Nix
{ pkgs, lib, config, ... }:
|
|
{
|
|
config = lib.mkIf config.swarselsystems.server.kavita {
|
|
environment.systemPackages = with pkgs; [
|
|
calibre
|
|
];
|
|
|
|
|
|
users.users.jellyfin = {
|
|
extraGroups = [ "users" ];
|
|
};
|
|
|
|
sops.secrets.kavita = { owner = "kavita"; };
|
|
|
|
networking.firewall.allowedTCPPorts = [ 8080 ];
|
|
|
|
services.kavita = {
|
|
enable = true;
|
|
user = "kavita";
|
|
settings.Port = 8080;
|
|
tokenKeyFile = config.sops.secrets.kavita.path;
|
|
};
|
|
|
|
services.nginx = {
|
|
virtualHosts = {
|
|
"scroll.swarsel.win" = {
|
|
enableACME = true;
|
|
forceSSL = true;
|
|
acmeRoot = null;
|
|
locations = {
|
|
"/" = {
|
|
proxyPass = "http://localhost:8080";
|
|
extraConfig = ''
|
|
client_max_body_size 0;
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|