Compare commits

..

No commits in common. "10141b93e70bc37b9b1dc94e8de496ca5fb58360" and "e6ce4b32c71258adf46b83bcdc0a6aef3a8f1c8a" have entirely different histories.

3 changed files with 11 additions and 26 deletions

View file

@ -112,10 +112,10 @@
type = "zfs_fs"; type = "zfs_fs";
mountpoint = "/opt"; mountpoint = "/opt";
}; };
# media = { media = {
# type = "zfs_fs"; type = "zfs_fs";
# mountpoint = "/media"; mountpoint = "/media";
# }; };
}; };
}; };
}; };

View file

@ -18,7 +18,6 @@
vpn-endpoint = "193.32.248.70"; vpn-endpoint = "193.32.248.70";
enable-services = true; enable-services = true;
wg-config = "/mnt/wg.conf"; wg-config = "/mnt/wg.conf";
jellyfin-gid = 989;
ports-list = pkgs.lib.attrsets.mapAttrsToList (name: value: value.port) ports; ports-list = pkgs.lib.attrsets.mapAttrsToList (name: value: value.port) ports;
in { in {
@ -31,7 +30,9 @@ in {
system.activationScripts."make-${vm-name}-data-dir" = lib.stringAfter ["var"] '' system.activationScripts."make-${vm-name}-data-dir" = lib.stringAfter ["var"] ''
mkdir -p /var/lib/${vm-name} mkdir -p /var/lib/${vm-name}
# chown -R microvm:jellyfin /var/lib/${vm-name} chmod -R 777 /var/lib/${vm-name}
chown -R microvm /var/lib/${vm-name}
chmod -R 777 /media
''; '';
microvm.vms.${vm-name} = { microvm.vms.${vm-name} = {
@ -66,7 +67,7 @@ in {
} }
{ {
tag = "media-dir"; tag = "media-dir";
source = "/var/lib/media"; source = "/media";
mountPoint = "/media"; mountPoint = "/media";
inherit proto; inherit proto;
} }
@ -130,18 +131,6 @@ in {
programs.nano.enable = lib.mkForce false; programs.nano.enable = lib.mkForce false;
programs.vim.enable = true; programs.vim.enable = true;
# Fix permissions with groups
users.users = {
sonarr.extraGroups = ["jellyfin"];
radarr.extraGroups = ["jellyfin"];
transmission.extraGroups = ["jellyfin"];
jackett.extraGroups = ["jellyfin"];
};
users.groups.jellyfin = {
gid = jellyfin-gid;
};
# Services # Services
services.sonarr = pkgs.lib.mkIf enable-services { services.sonarr = pkgs.lib.mkIf enable-services {
enable = true; enable = true;

View file

@ -6,7 +6,6 @@
}: let }: let
host = "127.0.0.1"; host = "127.0.0.1";
port = 8096; port = 8096;
gid = 989;
in { in {
imports = [./nginx.nix]; imports = [./nginx.nix];
# Enable VAAPI # Enable VAAPI
@ -24,14 +23,11 @@ in {
]; ];
}; };
# Set declarative gid
config.users.groups.jellyfin.gid = gid;
# Create folder for media # Create folder for media
config.system.activationScripts."jellyfinMediaFolder" = lib.stringAfter ["var"] '' config.system.activationScripts."jellyfinMediaFolder" = lib.stringAfter ["var"] ''
mkdir -p /var/lib/media mkdir -p /media
chmod -R 775 /var/lib/media chmod -R 775 /media
chown -R jellyfin:jellyfin /var/lib/media chown -R jellyfin:jellyfin /media
''; '';
# Enable Jellyfin # Enable Jellyfin