servo: migrate /var/media to be 100% on zfs pool
This commit is contained in:
@@ -51,7 +51,7 @@
|
|||||||
fileSystems."/mnt/pool" = {
|
fileSystems."/mnt/pool" = {
|
||||||
device = "pool";
|
device = "pool";
|
||||||
fsType = "zfs";
|
fsType = "zfs";
|
||||||
# options = [ "acl" ];
|
options = [ "acl" ]; #< not sure if this `acl` flag is actually necessary. it mounts without it.
|
||||||
};
|
};
|
||||||
# services.zfs.zed = ... # TODO: zfs can send me emails when disks fail
|
# services.zfs.zed = ... # TODO: zfs can send me emails when disks fail
|
||||||
sane.programs.sysadminUtils.suggestedPrograms = [ "zfs" ];
|
sane.programs.sysadminUtils.suggestedPrograms = [ "zfs" ];
|
||||||
@@ -97,12 +97,11 @@
|
|||||||
# - ensure everything under /var/media is mounted with `-o acl`, to support acls
|
# - ensure everything under /var/media is mounted with `-o acl`, to support acls
|
||||||
# - ensure all files are rwx by group: `setfacl --recursive --modify d:g::rwx /var/media`
|
# - ensure all files are rwx by group: `setfacl --recursive --modify d:g::rwx /var/media`
|
||||||
# - alternatively, `d:g:media:rwx` to grant `media` group even when file has a different owner, but that's a bit complex
|
# - alternatively, `d:g:media:rwx` to grant `media` group even when file has a different owner, but that's a bit complex
|
||||||
sane.persist.sys.byStore.plaintext = [{
|
sane.persist.sys.byStore.ext = [{
|
||||||
path = "/var/media";
|
path = "/var/media";
|
||||||
method = "bind"; #< this HAS to be `bind` if we're going to persist the whole thing but create subdirs, as below.
|
|
||||||
user = "colin";
|
user = "colin";
|
||||||
group = "media";
|
group = "media";
|
||||||
mode = "0755";
|
mode = "0775";
|
||||||
}];
|
}];
|
||||||
sane.fs."/var/media/archive".dir = {};
|
sane.fs."/var/media/archive".dir = {};
|
||||||
# this is file.text instead of symlink.text so that it may be read over a remote mount (where consumers might not have any /nix/store/.../README.md path)
|
# this is file.text instead of symlink.text so that it may be read over a remote mount (where consumers might not have any /nix/store/.../README.md path)
|
||||||
@@ -116,7 +115,7 @@
|
|||||||
sane.fs."/var/media/Books/Books".dir = {};
|
sane.fs."/var/media/Books/Books".dir = {};
|
||||||
sane.fs."/var/media/Books/Visual".dir = {};
|
sane.fs."/var/media/Books/Visual".dir = {};
|
||||||
sane.fs."/var/media/collections".dir = {};
|
sane.fs."/var/media/collections".dir = {};
|
||||||
sane.fs."/var/media/datasets".dir = {};
|
# sane.fs."/var/media/datasets".dir = {};
|
||||||
sane.fs."/var/media/freeleech".dir = {};
|
sane.fs."/var/media/freeleech".dir = {};
|
||||||
sane.fs."/var/media/Music".dir = {};
|
sane.fs."/var/media/Music".dir = {};
|
||||||
sane.fs."/var/media/Pictures".dir = {};
|
sane.fs."/var/media/Pictures".dir = {};
|
||||||
@@ -131,27 +130,6 @@
|
|||||||
this directory exists on SSD, allowing for speedy access to specific datasets when necessary.
|
this directory exists on SSD, allowing for speedy access to specific datasets when necessary.
|
||||||
the contents should be a subset of what's in ../media/datasets.
|
the contents should be a subset of what's in ../media/datasets.
|
||||||
'';
|
'';
|
||||||
# make sure large media is stored to the HDD
|
|
||||||
sane.persist.sys.byStore.ext = [
|
|
||||||
{
|
|
||||||
user = "colin";
|
|
||||||
group = "users";
|
|
||||||
mode = "0777";
|
|
||||||
path = "/var/media/Videos";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
user = "colin";
|
|
||||||
group = "users";
|
|
||||||
mode = "0777";
|
|
||||||
path = "/var/media/freeleech";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
user = "colin";
|
|
||||||
group = "users";
|
|
||||||
mode = "0775";
|
|
||||||
path = "/var/lib/uninsane/datasets";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
# btrfs doesn't easily support swapfiles
|
# btrfs doesn't easily support swapfiles
|
||||||
# swapDevices = [
|
# swapDevices = [
|
||||||
|
@@ -63,10 +63,6 @@ in
|
|||||||
# TODO: mode? we need this specifically for the stats tracking in .config/
|
# TODO: mode? we need this specifically for the stats tracking in .config/
|
||||||
{ user = "transmission"; group = config.users.users.transmission.group; path = "/var/lib/transmission"; method = "bind"; }
|
{ user = "transmission"; group = config.users.users.transmission.group; path = "/var/lib/transmission"; method = "bind"; }
|
||||||
];
|
];
|
||||||
sane.persist.sys.byStore.ext = [
|
|
||||||
# TODO: move ALL /var/media to the same zfs pool; remove this
|
|
||||||
{ user = "transmission"; group = "media"; path = download-dir; method = "bind"; }
|
|
||||||
];
|
|
||||||
users.users.transmission.extraGroups = [ "media" ];
|
users.users.transmission.extraGroups = [ "media" ];
|
||||||
|
|
||||||
services.transmission.enable = true;
|
services.transmission.enable = true;
|
||||||
|
Reference in New Issue
Block a user