Compare commits
No commits in common. "c8d994814fb0d040be8e16cbc3c40ffbfb5a87e9" and "d2be5c7e2459355fbed24c74918b5793dcbffae0" have entirely different histories.
c8d994814f
...
d2be5c7e24
6 changed files with 32 additions and 100 deletions
|
|
@ -69,10 +69,5 @@ nix multi user, multi system, configuration with `sops` secret management, `home
|
|||
- ISO target that contains authorized keys for nixos-anywhere https://github.com/diegofariasm/yggdrasil/blob/4acc43ebc7bcbf2e41376d14268e382007e94d78/hosts/bootstrap/default.nix
|
||||
- panoramax instance
|
||||
- mastodon instance
|
||||
- update proxy.nix files to contain the subdomain configs
|
||||
- rework the reverse_proxy.nix file so that it is a normally named service. Then also change it so that we can hook into it with both a base domain and a subdomain to make migrating to vpn accessible services easier
|
||||
- move searx, home-assistant, actual, jellyfin, paperless, and immich to only be accessible via vpn
|
||||
- make radarr, sonarr, and bazarr accessible over vpn
|
||||
- create some sort of service that allows uploading files to jellyfin
|
||||
- auto sort files into where they should go with some combination of filebot cli and picard cli
|
||||
- graphana accessible though tailscale
|
||||
|
|
@ -287,6 +287,21 @@
|
|||
subdomain = "budget";
|
||||
};
|
||||
|
||||
sonarr = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
|
||||
radarr = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
|
||||
bazarr = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
|
||||
home-assistant = {
|
||||
enable = true;
|
||||
subdomain = "home";
|
||||
|
|
@ -317,11 +332,6 @@
|
|||
openFirewall = true;
|
||||
webuiPort = 8084;
|
||||
};
|
||||
|
||||
filebot-cleanup = {
|
||||
enable = true;
|
||||
licenseFile = "/srv/jellyfin/filebot_license.psm";
|
||||
};
|
||||
};
|
||||
|
||||
# disable computer sleeping
|
||||
|
|
|
|||
|
|
@ -4,6 +4,5 @@
|
|||
./hardware-configuration.nix
|
||||
./configuration.nix
|
||||
./packages.nix
|
||||
./filebot.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,82 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.services.filebot-cleanup;
|
||||
in {
|
||||
options.services.filebot-cleanup = {
|
||||
enable = mkEnableOption "Filebot cleanup service";
|
||||
|
||||
licenseFile = mkOption {
|
||||
type = types.nullOr types.path;
|
||||
default = null;
|
||||
description = "Path to the Filebot license file";
|
||||
};
|
||||
|
||||
cleanupDirectory = mkOption {
|
||||
type = types.str;
|
||||
default = "/srv/jellyfin/filebot_cleanup";
|
||||
description = "Directory where cleaned up media files are stored";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
users.groups.filebot_cleanup = {};
|
||||
users.users.filebot_cleanup = {
|
||||
isSystemUser = true;
|
||||
group = "filebot_cleanup";
|
||||
extraGroups = ["jellyfin_media"];
|
||||
home = cfg.cleanupDirectory;
|
||||
createHome = true;
|
||||
};
|
||||
|
||||
nixpkgs.config.allowUnfreePredicate = pkg:
|
||||
builtins.elem (lib.getName pkg) [
|
||||
"filebot"
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
filebot
|
||||
];
|
||||
|
||||
systemd.services.filebot-cleanup = {
|
||||
description = "Filebot media cleanup service";
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
User = "filebot_cleanup";
|
||||
Group = "filebot_cleanup";
|
||||
ExecStart = pkgs.writeShellScript "filebot-cleanup" ''
|
||||
${optionalString (cfg.licenseFile != null) ''
|
||||
${pkgs.filebot}/bin/filebot --license "${cfg.licenseFile}"
|
||||
''}
|
||||
${pkgs.filebot}/bin/filebot -rename -r "/srv/jellyfin/media/Movies/" --output "${cfg.cleanupDirectory}/" --format "{jellyfin}" -non-strict --action move
|
||||
${pkgs.filebot}/bin/filebot -rename -r "/srv/jellyfin/media/Shows/" --output "${cfg.cleanupDirectory}/" --format "{jellyfin}" -non-strict --action move
|
||||
'';
|
||||
StandardOutput = "journal";
|
||||
StandardError = "journal";
|
||||
};
|
||||
wantedBy = ["multi-user.target"];
|
||||
};
|
||||
|
||||
environment.persistence = lib.mkIf config.host.impermanence.enable {
|
||||
"/persist/system/filebot_cleanup" = {
|
||||
enable = true;
|
||||
hideMounts = true;
|
||||
files = [
|
||||
cfg.licenseFile
|
||||
];
|
||||
directories = [
|
||||
{
|
||||
directory = cfg.cleanupDirectory;
|
||||
user = "filebot_cleanup";
|
||||
group = "filebot_cleanup";
|
||||
mode = "1770";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,9 +1,19 @@
|
|||
{pkgs, ...}: {
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
nixpkgs.config.allowUnfreePredicate = pkg:
|
||||
builtins.elem (lib.getName pkg) [
|
||||
"filebot"
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
ffsubsync
|
||||
sox
|
||||
yt-dlp
|
||||
ffmpeg
|
||||
imagemagick
|
||||
filebot
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,9 +25,9 @@
|
|||
qbittorrent = 2011;
|
||||
paperless = 2012;
|
||||
actual = 2013;
|
||||
radarr = 2014;
|
||||
sonarr = 2015;
|
||||
bazarr = 2016;
|
||||
radarr = 275;
|
||||
sonarr = 274;
|
||||
bazarr = 985;
|
||||
};
|
||||
|
||||
gids = {
|
||||
|
|
@ -45,9 +45,9 @@
|
|||
qbittorrent = 2011;
|
||||
paperless = 2012;
|
||||
actual = 2013;
|
||||
radarr = 2014;
|
||||
sonarr = 2015;
|
||||
bazarr = 2016;
|
||||
radarr = 275;
|
||||
sonarr = 274;
|
||||
bazarr = 981;
|
||||
};
|
||||
|
||||
users = config.users.users;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue