diff --git a/flake.nix b/flake.nix index 1bf6c8b..d1134f8 100644 --- a/flake.nix +++ b/flake.nix @@ -67,6 +67,7 @@ ./modules/paperless.nix ./modules/kavita.nix ./modules/netdata.nix + ./modules/invidious.nix ./modules/tmpfs.nix ### Hardware ### ./modules/hardware/ssd.nix diff --git a/modules/graphical/shared.nix b/modules/graphical/shared.nix index f5a1375..48fdd60 100644 --- a/modules/graphical/shared.nix +++ b/modules/graphical/shared.nix @@ -1,11 +1,6 @@ { config, pkgs, inputs, ... }: let - keepassWithPlugins = pkgs.keepass.override { - plugins = [ - pkgs.keepass-keepassrpc - ]; - }; screenshot = pkgs.writeShellScriptBin "screenshot.sh" '' ${pkgs.scrot}/bin/scrot -fs - | ${pkgs.xclip}/bin/xclip -selection clipboard -t image/png -i ''; @@ -21,6 +16,7 @@ in fonts.fontDir.enable = true; fonts.packages = with pkgs; [ + noto-fonts-cjk nerdfonts ]; @@ -43,7 +39,7 @@ in wget nixos-option kate - keepassWithPlugins + keepassxc jetbrains.idea-ultimate jetbrains.rider neovim @@ -78,6 +74,13 @@ in obs-studio mpv ffmpeg + p7zip + qbittorrent + (wrapOBS { + plugins = with obs-studio-plugins; [ + obs-pipewire-audio-capture + ]; + }) ]; #environment.sessionVariables = { diff --git a/modules/invidious.nix b/modules/invidious.nix new file mode 100644 index 0000000..a3c5db2 --- /dev/null +++ b/modules/invidious.nix @@ -0,0 +1,52 @@ +{ config, vars, ...} : +let + fqdn = "yt.local"; +in +{ + services.invidious = { + enable = true; + + domain = fqdn; + port = 8007; + + database = { + createLocally = true; + }; + + settings = { + db = { + user = "invidious"; + dbname = "invidious"; + }; + + host_binding = "127.0.0.1"; + external_port = 80; + https_only = false; + + use_quic = false; + + statistics_enabled = false; + + registration_enabled = false; + login_enabled = true; + captcha_enabled = false; + admins = [ ]; + + use_pubsub_feeds = false; + channel_refresh_interval = "15m"; + }; + + extraSettingsFile = config.age.secrets.invidious-extra-settings.path; + + nginx.enable = false; + }; + + services.nginx.virtualHosts."${fqdn}" = { + listenAddresses = [ vars.ipv4 vars.wireguardIp ]; + + locations."/" = { + recommendedProxySettings = true; + proxyPass = "http://127.0.0.1:8007"; + }; + }; +} diff --git a/secrets/invidious-extra-settings.age b/secrets/invidious-extra-settings.age new file mode 100644 index 0000000..68d5c32 --- /dev/null +++ b/secrets/invidious-extra-settings.age @@ -0,0 +1,13 @@ +age-encryption.org/v1 +-> ssh-ed25519 yfCCMw 6jWruJCLoMEEAnn6XAttdgTKL82rnBk7s024ywWHU0Y ++CHitjm4MWlB5WE1KFNu9YBOz4VO/WV0m+gkO7As5NM +-> ssh-ed25519 IV3DkQ OYSZKTxTGJq/EfW/vroDuAGjNZUCqHT0LmLUxNlUmxI +4jB7RYoAV0H4byySaNCCVDTU7ifimCBNsG8Dn7mJc8A +-> ssh-ed25519 DCzi1A vTbfcAE/SG3j/+X3LJKiR8t0FGS0FTwGCNJeL59NwDU +a45ktRFtTi9ozSos/RnfN+JigWKtCaT9Jxyh2eVZ0oA +-> tJ=h;wiS-grease kW mrVTJ h>*9"` 2Ml~- +UImFDxcOzCk5f0OTR4pftMOSNMb5Nj0Q3iyyfOm8WMPBz1NJiiACopTbDa/63vEy +q4JvHRf4 +--- zpsUuZO8S/MbFO+dvOzzl1bZaf3sB4WV0IAMyE/tXlc +ԣf/PD~Ӈ4ѹOhu