diff options
| author | Mike Vink <ivi@vinkies.net> | 2024-01-11 20:40:41 +0100 |
|---|---|---|
| committer | Mike Vink <ivi@vinkies.net> | 2024-01-11 20:40:41 +0100 |
| commit | fa98e0837317a73d7027986fd45e19cbd6c01f23 (patch) | |
| tree | 64f08021f94c9d951ab16b614c3870229bc86e34 /profiles | |
| parent | 858861f83888801b4637e63c8ee3f0b52ab47ace (diff) | |
rrr
Diffstat (limited to 'profiles')
| -rw-r--r-- | profiles/core/home.nix | 1 | ||||
| -rw-r--r-- | profiles/core/neovim.nix | 4 | ||||
| -rw-r--r-- | profiles/homeserver/transmission.nix | 92 | ||||
| -rw-r--r-- | profiles/station/nonfree.nix | 6 |
4 files changed, 99 insertions, 4 deletions
diff --git a/profiles/core/home.nix b/profiles/core/home.nix index 726a041..3e27540 100644 --- a/profiles/core/home.nix +++ b/profiles/core/home.nix @@ -1,5 +1,4 @@ { - inputs, config, pkgs, ... diff --git a/profiles/core/neovim.nix b/profiles/core/neovim.nix index b760226..b54f400 100644 --- a/profiles/core/neovim.nix +++ b/profiles/core/neovim.nix @@ -21,6 +21,10 @@ indent_style = "space"; indent_size = 2; }; + "*.nix" = { + indent_style = "space"; + indent_size = 2; + }; }; }; diff --git a/profiles/homeserver/transmission.nix b/profiles/homeserver/transmission.nix new file mode 100644 index 0000000..43e3781 --- /dev/null +++ b/profiles/homeserver/transmission.nix @@ -0,0 +1,92 @@ +{ config, lib, ... }: with lib; { + virtualisation.docker.rootless = { + enable = true; + setSocketVariable = true; + }; + + users.groups.multimedia = { }; + users.users.${ivi.username}.extraGroups = [ "multimedia" ]; + + systemd.tmpfiles.rules = [ + "d /data 0770 - multimedia - -" + ]; + + nixpkgs.config.allowUnfreePredicate = pkg: + builtins.elem (lib.getName pkg) [ + "plexmediaserver" + ]; + + services.nginx = { + virtualHosts = { + "sonarr.${ivi.domain}" = { locations."/" = { proxyPass = "http://127.0.0.1:8989"; }; }; + "radarr.${ivi.domain}" = { locations."/" = { proxyPass = "http://127.0.0.1:7878"; }; }; + "bazarr.${ivi.domain}" = { locations."/" = { proxyPass = "http://127.0.0.1:${toString config.services.bazarr.listenPort}"; }; }; + "readarr.${ivi.domain}" = { locations."/" = { proxyPass = "http://127.0.0.1:8787"; }; }; + "prowlarr.${ivi.domain}" = { locations."/" = { proxyPass = "http://127.0.0.1:9696"; }; }; + "transmission.${ivi.domain}" = { locations."/" = { proxyPass = "http://127.0.0.1:9091"; }; }; + "sabnzb.${ivi.domain}" = { locations."/" = { proxyPass = "http://127.0.0.1:8080"; }; }; + "lazylibrarian.${ivi.domain}" = { locations."/" = { proxyPass = "http://127.0.0.1:5299"; }; }; + "plex.${ivi.domain}" = { locations."/" = { proxyPass = "http://127.0.0.1:32400"; }; }; + }; + }; + services = { + plex = { enable = true; group = "multimedia"; }; + sonarr = { enable = true; group = "multimedia"; }; + radarr = { enable = true; group = "multimedia"; }; + bazarr = { enable = true; group = "multimedia"; }; + readarr = { enable = true; group = "multimedia"; }; + prowlarr = { enable = true; }; + }; + virtualisation.oci-containers = { + backend = "docker"; + containers = { + transmission = { + image = "haugene/transmission-openvpn"; + extraOptions = ["--cap-add=NET_ADMIN"]; + volumes = [ + "/config/ovpn:/etc/openvpn/custom" + "/config/transmission:/config" + "/data/torrents:/data/torrents" + ]; + ports = [ + "9091:9091" + "5299:5299" + ]; + environmentFiles = [ + config.secrets.transmission.path + ]; + }; + lazylibrarian = { + image = "linuxserver/lazylibrarian"; + extraOptions = ["--network=container:transmission"]; + volumes = [ + "/config/lazylibrarian:/config" + "/data:/data" + ]; + environment = { + PUID="1000"; + PGID="1000"; + TZ="Etc/UTC"; + DOCKER_MODS="linuxserver/mods:lazylibrarian-ffmpeg"; + }; + }; + # sabnzbdvpn = { + # image = "linuxserver/sabnzbd"; + # extraOptions = ["--network=container:transmission"]; + # volumes = [ + # "/sabnzb/data:/data" + # "/sabnzb/config:/config" + # "/etc/localtime:/etc/localtime:ro" + # ]; + # ports = [ + # "8080:8080" + # "8090:8090" + # "8118:8118" + # ]; + # environmentFiles = [ + # config.secrets.sabnzb.path + # ]; + # }; + }; + }; +} diff --git a/profiles/station/nonfree.nix b/profiles/station/nonfree.nix index 0623765..cd6f5fc 100644 --- a/profiles/station/nonfree.nix +++ b/profiles/station/nonfree.nix @@ -16,9 +16,9 @@ "discord-canary" "slack" "citrix-workspace" - "steam" - "steam-original" - "steam-run" + "steam" + "steam-original" + "steam-run" ]; programs.steam = { |
