diff --git a/devices/nos/modules/subtitles/syncing.nix b/devices/nos/modules/subtitles/syncing.nix index d4ca4bb..7d9d8fb 100644 --- a/devices/nos/modules/subtitles/syncing.nix +++ b/devices/nos/modules/subtitles/syncing.nix @@ -1,5 +1,7 @@ { + bazarr-bulk, config, + lib, pkgs, subsync, ... @@ -7,12 +9,30 @@ inherit (config.vars) mainUser; subsyncPkg = subsync.packages.${pkgs.system}.default; + bbPkg = bazarr-bulk.packages.${pkgs.system}.default; node-syncsub = pkgs.callPackage ./node-syncsub { subsync = subsyncPkg; }; in { - environment.systemPackages = [subsyncPkg node-syncsub]; + environment.systemPackages = [ + subsyncPkg + node-syncsub + + (pkgs.writeShellApplication { + name = "bb"; + text = '' + exec ${lib.getExe bbPkg} --config ${config.sops.secrets.bazarr-bulk.path} "$@" + ''; + }) + + (pkgs.writeShellApplication { + name = "bb-fr"; + text = '' + exec ${lib.getExe bbPkg} --config ${config.sops.secrets.bazarr-bulk-fr.path} "$@" + ''; + }) + ]; systemd = { services.subsync-job = { diff --git a/flake.lock b/flake.lock index 387c1d9..f360102 100644 --- a/flake.lock +++ b/flake.lock @@ -115,6 +115,27 @@ "type": "github" } }, + "bazarr-bulk": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1715912570, + "narHash": "sha256-Fyxsn7OLo8dHtKGKc1PcirQBBbQTD6tzHDDedEYlXnQ=", + "owner": "matt1432", + "repo": "bazarr-bulk", + "rev": "81be58cff86f0ef525735dfe9cdf7f899ae75899", + "type": "github" + }, + "original": { + "owner": "matt1432", + "ref": "nix", + "repo": "bazarr-bulk", + "type": "github" + } + }, "caddy-plugins": { "inputs": { "nixpkgs": [ @@ -1903,6 +1924,7 @@ "astal": "astal", "basedpyright": "basedpyright", "bat-theme-src": "bat-theme-src", + "bazarr-bulk": "bazarr-bulk", "caddy-plugins": "caddy-plugins", "curseforge-server-downloader-src": "curseforge-server-downloader-src", "eisa-scripts-src": "eisa-scripts-src", @@ -1981,11 +2003,11 @@ ] }, "locked": { - "lastModified": 1712775289, - "narHash": "sha256-jSY9GD1NCMqHrYjka0aI5mV8bAxykXDWsO2F9QctRD8=", + "lastModified": 1715913475, + "narHash": "sha256-omx63Z5ZnK/tWz5Uz7/XWGzKpDKWgpVZa5paYB2iFao=", "ref": "refs/heads/main", - "rev": "d8dfe460c665cdcc497328fda79603b114bc5cc1", - "revCount": 55, + "rev": "015f7916d2f8bbb461850ee765933e4ca66f8a23", + "revCount": 62, "type": "git", "url": "ssh://git@git.nelim.org/matt1432/nixos-secrets" }, diff --git a/flake.nix b/flake.nix index 07b6086..bf1e5c3 100644 --- a/flake.nix +++ b/flake.nix @@ -241,6 +241,15 @@ inputs.nixpkgs.follows = "nixpkgs"; }; + bazarr-bulk = { + type = "github"; + owner = "matt1432"; + repo = "bazarr-bulk"; + ref = "nix"; + + inputs.nixpkgs.follows = "nixpkgs"; + }; + subsync = { type = "github"; owner = "matt1432";