From b7fb67f939039396c3543a303e16f16489739b77 Mon Sep 17 00:00:00 2001 From: blake Date: Wed, 22 Oct 2025 21:50:35 -0500 Subject: [PATCH] add ffmpeg to sonarr and radarr --- flake.nix | 5 +-- modules/holocron/zfs/default.nix | 48 +++++++++++++++----------- modules/homelab/arr/radarr/default.nix | 3 ++ modules/homelab/arr/sonarr/default.nix | 3 ++ users/blake/home.nix | 4 +-- 5 files changed, 38 insertions(+), 25 deletions(-) diff --git a/flake.nix b/flake.nix index bbccbdb..c36651e 100644 --- a/flake.nix +++ b/flake.nix @@ -51,11 +51,12 @@ }; stable_pkgs = builtins.mapAttrs (k: v: import nixpkgs {system = v;}) systems; unstable_pkgs = builtins.mapAttrs (k: v: import nixpkgs-unstable {system = v;}) systems; + current_system = builtins.currentSystem; in { nixosConfigurations = { snowbelle = nixpkgs.lib.nixosSystem { system = systems.x86_64; - specialArgs = {inherit inputs stable_pkgs unstable_pkgs;}; + specialArgs = {inherit inputs stable_pkgs unstable_pkgs current_system;}; modules = [ ./hosts/nixos/snowbelle/configuration.nix inputs.home-manager.nixosModules.default @@ -73,7 +74,7 @@ darwinConfigurations = { CEN-IT-07 = nix-darwin.lib.darwinSystem { system = systems.darwin; - specialArgs = {inherit inputs stable_pkgs unstable_pkgs nix-homebrew;}; + specialArgs = {inherit inputs stable_pkgs unstable_pkgs nix-homebrew current_system;}; modules = [ ./hosts/darwin/cen-it-07/configuration.nix inputs.home-manager.darwinModules.default diff --git a/modules/holocron/zfs/default.nix b/modules/holocron/zfs/default.nix index 37ea92f..8819ea2 100644 --- a/modules/holocron/zfs/default.nix +++ b/modules/holocron/zfs/default.nix @@ -18,12 +18,18 @@ in { boot.kernelModules = ["zfs"]; boot.supportedFilesystems = ["zfs"]; + # arc cache size + boot.kernelParams = [ "zfs.zfs_arc_max=12884901888" ]; + + # pools to import + #boot.zfs.extraPools = [ "holocron" "holocron/archives" "/holocron/media" "/holocron/users" ]; + boot.zfs.extraPools = [ "holocron" ]; + # enable smart monitoring services.smartd = { enable = true; autodetect = true; defaults.monitored = "-a -o on -s (S/../.././05|L/../01/./05)"; - notifications.test = true; notifications.mail = { enable = true; sender = "zfs@snowbelle.lan"; @@ -48,25 +54,25 @@ in { # install userspace tools for acl's environment.systemPackages = with pkgs; [smartmontools]; - fileSystems."/holocron" = { - device = "holocron"; - fsType = "zfs"; - options = ["nofail"]; - }; - fileSystems."/holocron/archives" = { - device = "holocron/archives"; - fsType = "zfs"; - options = ["nofail"]; - }; - fileSystems."/holocron/users" = { - device = "holocron/users"; - fsType = "zfs"; - options = ["nofail"]; - }; - fileSystems."/holocron/media" = { - device = "holocron/media"; - fsType = "zfs"; - options = ["nofail"]; - }; + # fileSystems."/holocron" = { + # device = "holocron"; + # fsType = "zfs"; + # options = ["nofail"]; + # }; + # fileSystems."/holocron/archives" = { + # device = "holocron/archives"; + # fsType = "zfs"; + # options = ["nofail"]; + # }; + # fileSystems."/holocron/users" = { + # device = "holocron/users"; + # fsType = "zfs"; + # options = ["nofail"]; + # }; + # fileSystems."/holocron/media" = { + # device = "holocron/media"; + # fsType = "zfs"; + # options = ["nofail"]; + # }; }; } diff --git a/modules/homelab/arr/radarr/default.nix b/modules/homelab/arr/radarr/default.nix index 65884c5..d137a6a 100644 --- a/modules/homelab/arr/radarr/default.nix +++ b/modules/homelab/arr/radarr/default.nix @@ -43,6 +43,9 @@ in }; config = lib.mkIf cfg.enable { + + # required + environment.systemPackages = with pkgs; [ffmpeg_6-headless]; # declare ${service} group users.groups.${service} = { gid = lib.mkForce cfg.ids; }; diff --git a/modules/homelab/arr/sonarr/default.nix b/modules/homelab/arr/sonarr/default.nix index f9fed00..a92d822 100644 --- a/modules/homelab/arr/sonarr/default.nix +++ b/modules/homelab/arr/sonarr/default.nix @@ -44,6 +44,9 @@ in config = lib.mkIf cfg.enable { + # required + environment.systemPackages = with pkgs; [ffmpeg_6-headless]; + # declare ${service} group users.groups.${service} = { gid = lib.mkForce cfg.ids; }; diff --git a/users/blake/home.nix b/users/blake/home.nix index b5b70e3..14d6e37 100644 --- a/users/blake/home.nix +++ b/users/blake/home.nix @@ -4,11 +4,12 @@ pkgs, inputs, system, + current_system, ... }: let - #platform = if pkgs.stdenv.hostPlatform.system == "x86_64-darwin" then "darwin" else "nixos"; platform = if builtins.pathExists "/System/Library/CoreServices" then "darwin" else "nixos"; + #platform = if current_system "x86_64-darwin" then "darwin" else "nixos"; # general config home_linux = { @@ -24,7 +25,6 @@ in imports = [ inputs.sops-nix.homeManagerModules.sops ./os/${platform}.nix - #./os/nixos.nix ./dots/neovim ./dots/lf ./dots/zsh