migrated location of /media folder
This commit is contained in:
parent
e6ce4b32c7
commit
6ac9ddb8f9
|
@ -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";
|
||||||
};
|
# };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
BIN
services/.auto-torrent.nix.swp
Normal file
BIN
services/.auto-torrent.nix.swp
Normal file
Binary file not shown.
|
@ -18,6 +18,7 @@
|
||||||
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 {
|
||||||
|
@ -30,9 +31,7 @@ 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}
|
||||||
chmod -R 777 /var/lib/${vm-name}
|
# chown -R microvm:jellyfin /var/lib/${vm-name}
|
||||||
chown -R microvm /var/lib/${vm-name}
|
|
||||||
chmod -R 777 /media
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
microvm.vms.${vm-name} = {
|
microvm.vms.${vm-name} = {
|
||||||
|
@ -67,7 +66,7 @@ in {
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
tag = "media-dir";
|
tag = "media-dir";
|
||||||
source = "/media";
|
source = "/var/lib/media";
|
||||||
mountPoint = "/media";
|
mountPoint = "/media";
|
||||||
inherit proto;
|
inherit proto;
|
||||||
}
|
}
|
||||||
|
@ -131,6 +130,18 @@ 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;
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
}: 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
|
||||||
|
@ -23,11 +24,14 @@ 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 /media
|
mkdir -p /var/lib/media
|
||||||
chmod -R 775 /media
|
chmod -R 775 /var/lib/media
|
||||||
chown -R jellyfin:jellyfin /media
|
chown -R jellyfin:jellyfin /var/lib/media
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Enable Jellyfin
|
# Enable Jellyfin
|
||||||
|
|
Loading…
Reference in a new issue