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";
mountpoint = "/opt";
};
# media = {
# type = "zfs_fs";
# mountpoint = "/media";
# };
media = {
type = "zfs_fs";
mountpoint = "/media";
};
};
};
};

View file

@ -18,7 +18,6 @@
vpn-endpoint = "193.32.248.70";
enable-services = true;
wg-config = "/mnt/wg.conf";
jellyfin-gid = 989;
ports-list = pkgs.lib.attrsets.mapAttrsToList (name: value: value.port) ports;
in {
@ -31,7 +30,9 @@ in {
system.activationScripts."make-${vm-name}-data-dir" = lib.stringAfter ["var"] ''
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} = {
@ -66,7 +67,7 @@ in {
}
{
tag = "media-dir";
source = "/var/lib/media";
source = "/media";
mountPoint = "/media";
inherit proto;
}
@ -130,18 +131,6 @@ in {
programs.nano.enable = lib.mkForce false;
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.sonarr = pkgs.lib.mkIf enable-services {
enable = true;

View file

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