feat: move to nixvim

This commit is contained in:
Kat Inskip 2025-11-19 04:39:35 -08:00
parent ca97476a47
commit 779c3c4098
Signed by: kat
GPG key ID: 465E64DECEA8CF0F
22 changed files with 772 additions and 57 deletions

View file

@ -0,0 +1,24 @@
{config, ...}: let
cfg = config.services.navidrome;
domain = "music.kittywit.ch";
in {
services = {
navidrome = {
enable = true;
openFirewall = true;
};
nginx.virtualHosts.${domain} = {
enableACME = true;
forceSSL = true;
extraConfig = ''
client_max_body_size 512M;
'';
locations = {
"/" = {
proxyPass = "http://${cfg.settings.Address}:${toString cfg.settings.Port}";
proxyWebsockets = true;
};
};
};
};
}

44
nixos/servers/stream.nix Normal file
View file

@ -0,0 +1,44 @@
_: {
networking.firewall.allowedTCPPorts = [
1935
];
systemd.services.nginx.serviceConfig.BindPaths = [
"/var/www/streamy"
];
services.nginx = let
streamyHome = "/var/www/streamy";
in {
virtualHosts."stream.kittywit.ch" = {
enableACME = true;
forceSSL = true;
acmeRoot = null;
locations = {
"/" = {
root = streamyHome;
};
};
};
appendConfig = ''
rtmp {
server {
listen 1935;
chunk_size 4096;
application animu {
allow publish 100.64.0.0/10;
deny publish all;
live on;
record off;
hls on;
hls_path ${streamyHome}/hls;
hls_fragment 3;
hls_playlist_length 60;
dash on;
dash_path ${streamyHome}/dash;
}
}
}
'';
};
}