35 lines
972 B
Nix
35 lines
972 B
Nix
# Extra local disks. Declared here, not in hardware.nix (hardware.nix is generated).
|
|
{ config, lib, ... }:
|
|
let
|
|
# Stable UID so NTFS `uid=` matches `users.users.olivier` (override if your account is not 1000).
|
|
olivierUid = config.users.users.olivier.uid or 1000;
|
|
in
|
|
{
|
|
users.users.olivier.uid = lib.mkDefault 1000;
|
|
|
|
fileSystems."/mnt/media" = {
|
|
device = "/dev/disk/by-uuid/17d8a981-db3b-415e-a0f7-7dbc519e04ab";
|
|
fsType = "btrfs";
|
|
options = [
|
|
"subvol=@"
|
|
"compress=zstd"
|
|
"noatime"
|
|
];
|
|
};
|
|
|
|
# LABEL="Deep Storage Unit". Owner olivier, group nfsmedia (990) so:
|
|
# - local logins write as user 1000 (owner rwx);
|
|
# - NFS (all_squash → uid/gid 990) matches group 990 → rwx (see jellyfin-nfs-export).
|
|
fileSystems."/mnt/test" = {
|
|
device = "/dev/disk/by-uuid/BC12E55E12E51DE0";
|
|
fsType = "ntfs-3g";
|
|
options = [
|
|
"rw"
|
|
"force"
|
|
"uid=${toString olivierUid}"
|
|
"gid=990"
|
|
"umask=0002"
|
|
];
|
|
};
|
|
}
|