From 1b02f9ea95ec7e81a45ec40159991065856482b7 Mon Sep 17 00:00:00 2001 From: "RingOfStorms (Joshua Bell)" Date: Fri, 20 Jun 2025 17:43:15 -0500 Subject: [PATCH] add nixarr to h001 --- hosts/h001/containers/default.nix | 5 ++- hosts/h001/flake.lock | 8 ++-- hosts/h001/flake.nix | 8 +++- hosts/h001/mods/default.nix | 1 + hosts/h001/mods/nixarr.nix | 22 ++++++++++ hosts/lio/containers.nix | 73 ------------------------------- hosts/lio/flake.nix | 47 -------------------- 7 files changed, 37 insertions(+), 127 deletions(-) create mode 100644 hosts/h001/mods/nixarr.nix diff --git a/hosts/h001/containers/default.nix b/hosts/h001/containers/default.nix index c18778a..7f188a9 100644 --- a/hosts/h001/containers/default.nix +++ b/hosts/h001/containers/default.nix @@ -1,4 +1,7 @@ -{ common }: +{ inputs }: +let + common = inputs.common; +in { ... }: diff --git a/hosts/h001/flake.lock b/hosts/h001/flake.lock index 4f34705..8c56ac2 100644 --- a/hosts/h001/flake.lock +++ b/hosts/h001/flake.lock @@ -194,16 +194,16 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1745868005, - "narHash": "sha256-hZScOyQphT4RUmSEJX+2OxjIlGgLwSd8iW1LNtAWIOs=", + "lastModified": 1750259320, + "narHash": "sha256-H8J4H2XCIMEJ5g6fZ179QfQvsc2dUqhqfBjC8RAHNRY=", "owner": "nixos", "repo": "nixpkgs", - "rev": "330d0a4167924b43f31cc9406df363f71b768a02", + "rev": "9ba04bda9249d5d5e5238303c9755de5a49a79c5", "type": "github" }, "original": { "owner": "nixos", - "ref": "nixos-24.11", + "ref": "nixos-25.05", "repo": "nixpkgs", "type": "github" } diff --git a/hosts/h001/flake.nix b/hosts/h001/flake.nix index 45af014..e064c42 100644 --- a/hosts/h001/flake.nix +++ b/hosts/h001/flake.nix @@ -8,6 +8,8 @@ common.url = "git+https://git.joshuabell.xyz/ringofstorms/dotfiles"; ros_neovim.url = "git+https://git.joshuabell.xyz/ringofstorms/nvim"; + + nixarr.url = "github:rasmus-kirk/nixarr"; }; outputs = @@ -15,8 +17,9 @@ nixpkgs, common, ros_neovim, + nixarr, ... - }: + }@inputs: let configuration_name = "h001"; lib = nixpkgs.lib; @@ -28,10 +31,11 @@ modules = [ common.nixosModules.default ros_neovim.nixosModules.default + nixarr.nixosModules.default ./configuration.nix ./hardware-configuration.nix ./mods - (import ./containers { inherit common; }) + (import ./containers { inherit inputs; }) ( { config, pkgs, ... }: { diff --git a/hosts/h001/mods/default.nix b/hosts/h001/mods/default.nix index f4a4450..873e964 100644 --- a/hosts/h001/mods/default.nix +++ b/hosts/h001/mods/default.nix @@ -4,5 +4,6 @@ { imports = [ ./adguardhome.nix + ./nixarr.nix ]; } diff --git a/hosts/h001/mods/nixarr.nix b/hosts/h001/mods/nixarr.nix new file mode 100644 index 0000000..352f549 --- /dev/null +++ b/hosts/h001/mods/nixarr.nix @@ -0,0 +1,22 @@ +{ + ... +}: +{ + config = { + nixarr = { + enable = true; + mediaDir = "/var/lib/nixarr/media"; + stateDir = "/var/lib/nixarr/state"; + + jellyfin.enable = true; # jellyfinnnnnn! + sabnzbd.enable = true; # Usenet downloader + prowlarr.enable = true; # Index manager + sonarr.enable = true; # TV + radarr.enable = true; # Movies + bazarr.enable = true; # subtitles for sonarr and radarr + lidarr.enable = true; # music + readarr.enable = true; # books + jellyseerr.enable = true; # request manager for media + }; + }; +} diff --git a/hosts/lio/containers.nix b/hosts/lio/containers.nix index 240ea85..5c3961d 100644 --- a/hosts/lio/containers.nix +++ b/hosts/lio/containers.nix @@ -1,7 +1,6 @@ { inputs }: let common = inputs.common; - nixarr = inputs.nixarr; in { config, @@ -36,78 +35,6 @@ in firewall.trustedInterfaces = [ "ve-*" ]; }; - # containers.nixarr = - # let - # name = "nixarr"; - # # hostDataDir = "/var/lib/${name}"; - # hostAddress = "10.0.0.1"; - # containerAddress = "10.0.0.3"; - # hostAddress6 = "fc00::1"; - # containerAddress6 = "fc00::3"; - # in - # { - # ephemeral = true; - # autoStart = true; - # privateNetwork = true; - # hostAddress = hostAddress; - # localAddress = containerAddress; - # hostAddress6 = hostAddress6; - # localAddress6 = containerAddress6; - # config = - # { config, pkgs, ... }: - # { - # imports = [ - # nixarr.nixosModules.default - # ]; - # system.stateVersion = "25.05"; - # nixpkgs.config.allowUnfree = true; - # - # nixarr = { - # enable = true; - # # These two values are also the default, but you can set them to whatever - # # else you want - # # WARNING: Do _not_ set them to `/home/user/whatever`, it will not work! - # mediaDir = "/var/lib/nixarr_test/media"; - # stateDir = "/var/lib/nixarr_test/state"; - # - # # vpn = { - # # enable = true; - # # # WARNING: This file must _not_ be in the config git directory - # # # You can usually get this wireguard file from your VPN provider - # # wgConf = "/data/.secret/wg.conf"; - # # }; - # - # jellyfin = { - # enable = true; - # # These options set up a nginx HTTPS reverse proxy, so you can access - # # Jellyfin on your domain with HTTPS - # # expose.https = { - # # enable = true; - # # domainName = "your.domain.com"; - # # acmeMail = "your@email.com"; # Required for ACME-bot - # # }; - # }; - # - # # transmission = { - # # enable = true; - # # vpn.enable = true; - # # peerPort = 50000; # Set this to the port forwarded by your VPN - # # }; - # - # # It is possible for this module to run the *Arrs through a VPN, but it - # # is generally not recommended, as it can cause rate-limiting issues. - # sabnzbd.enable = true; # Usenet downloader - # prowlarr.enable = true; # Index manager - # sonarr.enable = true; # TV - # radarr.enable = true; # Movies - # bazarr.enable = true; # subtitles for sonarr and radarr - # lidarr.enable = true; # music - # readarr.enable = true; # books - # jellyseerr.enable = true; # request manager for media - # }; - # }; - # }; - # containers.wasabi = { # ephemeral = true; # autoStart = true; diff --git a/hosts/lio/flake.nix b/hosts/lio/flake.nix index db51cd8..1082387 100644 --- a/hosts/lio/flake.nix +++ b/hosts/lio/flake.nix @@ -8,8 +8,6 @@ common.url = "git+https://git.joshuabell.xyz/ringofstorms/dotfiles"; ros_neovim.url = "git+https://git.joshuabell.xyz/ringofstorms/nvim"; - - nixarr.url = "github:rasmus-kirk/nixarr"; }; outputs = @@ -32,57 +30,12 @@ modules = [ common.nixosModules.default ros_neovim.nixosModules.default - nixarr.nixosModules.default ./configuration.nix ./hardware-configuration.nix (import ./containers.nix { inherit inputs; }) ( { config, pkgs, ... }: { - # nixarr = { - # enable = true; - # # These two values are also the default, but you can set them to whatever - # # else you want - # # WARNING: Do _not_ set them to `/home/user/whatever`, it will not work! - # mediaDir = "/var/lib/nixarr_test/media"; - # stateDir = "/var/lib/nixarr_test/state"; - # - # # vpn = { - # # enable = true; - # # # WARNING: This file must _not_ be in the config git directory - # # # You can usually get this wireguard file from your VPN provider - # # wgConf = "/data/.secret/wg.conf"; - # # }; - # - # jellyfin = { - # enable = true; - # # These options set up a nginx HTTPS reverse proxy, so you can access - # # Jellyfin on your domain with HTTPS - # expose.https = { - # enable = true; - # domainName = "your.domain.com"; - # acmeMail = "your@email.com"; # Required for ACME-bot - # }; - # }; - # - # # transmission = { - # # enable = true; - # # vpn.enable = true; - # # peerPort = 50000; # Set this to the port forwarded by your VPN - # # }; - # - # # It is possible for this module to run the *Arrs through a VPN, but it - # # is generally not recommended, as it can cause rate-limiting issues. - # sabnzbd.enable = true; # Usenet downloader - # prowlarr.enable = true; # Index manager - # sonarr.enable = true; # TV - # radarr.enable = true; # Movies - # bazarr.enable = true; # subtitles for sonarr and radarr - # lidarr.enable = true; # music - # readarr.enable = true; # books - # jellyseerr.enable = true; # request manager for media - # }; - programs = { steam.enable = true; };