frumar: switch main disk to ssdpool
parent
dd3fcc85b2
commit
b19cf6f2f6
|
@ -242,7 +242,6 @@
|
||||||
};
|
};
|
||||||
systemd.services.grafana.serviceConfig.EnvironmentFile = config.age.secrets.grafana.path;
|
systemd.services.grafana.serviceConfig.EnvironmentFile = config.age.secrets.grafana.path;
|
||||||
services.zfs = {
|
services.zfs = {
|
||||||
trim.enable = false; # no ssd's
|
|
||||||
autoScrub = {
|
autoScrub = {
|
||||||
enable = true;
|
enable = true;
|
||||||
interval = "*-*-01 02:00:00"; # monthly + 2 hours
|
interval = "*-*-01 02:00:00"; # monthly + 2 hours
|
||||||
|
@ -292,6 +291,16 @@
|
||||||
"frumar-new/plexmedia" = {
|
"frumar-new/plexmedia" = {
|
||||||
plan = "1w=>6h,1m=>1w,1y=>1m,2y=>6m,50y=>1y";
|
plan = "1w=>6h,1m=>1w,1y=>1m,2y=>6m,50y=>1y";
|
||||||
};
|
};
|
||||||
|
"ssdpool/root" = {
|
||||||
|
plan = "2d=>1d";
|
||||||
|
};
|
||||||
|
"ssdpool/root/var" = {
|
||||||
|
plan = "1w=>1d";
|
||||||
|
destinations.frumar-new = {
|
||||||
|
dataset = "frumar-new/backup/ssdpool-root-var";
|
||||||
|
plan = "1w=>1d,1m=>1w,1y=>1m,10y=>6m,50y=>1y";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
users.users.plex.packages = with pkgs; [
|
users.users.plex.packages = with pkgs; [
|
||||||
|
|
|
@ -4,22 +4,26 @@
|
||||||
hardware.enableRedistributableFirmware = true;
|
hardware.enableRedistributableFirmware = true;
|
||||||
|
|
||||||
boot.initrd.availableKernelModules =
|
boot.initrd.availableKernelModules =
|
||||||
[ "xhci_pci" "ehci_pci" "ahci" "usb_storage" "sd_mod" ];
|
[ "nvme" "xhci_pci" "ehci_pci" "ahci" "usb_storage" "sd_mod" ];
|
||||||
|
|
||||||
# Use the GRUB 2 boot loader.
|
|
||||||
boot.loader.grub = {
|
boot.loader.grub = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# Define on which hard drive you want to install Grub.
|
efiSupport = true;
|
||||||
device = "/dev/disk/by-id/ata-Samsung_SSD_850_EVO_250GB_S21PNXAG441016B";
|
efiInstallAsRemovable = true;
|
||||||
|
mirroredBoots = [
|
||||||
|
{ path = "/boot1"; devices = [ "nodev" ]; }
|
||||||
|
{ path = "/boot2"; devices = [ "nodev" ]; }
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/" = {
|
# fileSystems."/" = {
|
||||||
device = "/dev/disk/by-uuid/ba95c638-f243-48ee-ae81-0c70884e7e74";
|
# device = "/dev/disk/by-uuid/ba95c638-f243-48ee-ae81-0c70884e7e74";
|
||||||
fsType = "ext4";
|
# fsType = "ext4";
|
||||||
options = [ "defaults" "relatime" "discard" ];
|
# options = [ "defaults" "relatime" "discard" ];
|
||||||
};
|
# };
|
||||||
|
|
||||||
|
swapDevices = [{ device = "/dev/disk/by-label/ssd-swap"; }];
|
||||||
|
|
||||||
swapDevices = [{ device = "/dev/disk/by-label/nixos-swap"; }];
|
|
||||||
fileSystems."/data" = {
|
fileSystems."/data" = {
|
||||||
device = "frumar-new";
|
device = "frumar-new";
|
||||||
fsType = "zfs";
|
fsType = "zfs";
|
||||||
|
@ -30,6 +34,62 @@
|
||||||
fsType = "zfs";
|
fsType = "zfs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot1" = {
|
||||||
|
device = "/dev/disk/by-label/EFI1";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot2" = {
|
||||||
|
device = "/dev/disk/by-label/EFI2";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/" = {
|
||||||
|
device = "ssdpool/root";
|
||||||
|
fsType = "zfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/var" = {
|
||||||
|
device = "ssdpool/root/var";
|
||||||
|
fsType = "zfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/home/yorick/rtorrent" = {
|
||||||
|
device = "ssdpool/torrent";
|
||||||
|
fsType = "zfs";
|
||||||
|
};
|
||||||
|
|
||||||
nix.settings.max-jobs = 4;
|
nix.settings.max-jobs = 4;
|
||||||
services.avahi.allowInterfaces = [ "enp2s0" ];
|
services.avahi.allowInterfaces = [ "enp2s0" ];
|
||||||
}
|
}
|
||||||
|
## disk layout
|
||||||
|
# 1x SATA Samsung 850 Evo, 250GB (old ssd)
|
||||||
|
# - 248GB root ext4
|
||||||
|
# - 1.9GB swap
|
||||||
|
# - 0.1GB bios_grub
|
||||||
|
# 3x SATA WDC WD100EMAZ-00WJTA0, 10.0TB
|
||||||
|
# - 9.1TiB zfs, frumar-new
|
||||||
|
# - 8MiB empty
|
||||||
|
# 1x nvme Corsair Force MP510, 960G
|
||||||
|
# - 2 GiB "EFI1" boot, ESP
|
||||||
|
# - 858GB "ssdpart1" zfs, ssdpool
|
||||||
|
# - 100GB "buf1" empty, future use (metadata device?)
|
||||||
|
# 1x nvme Samsung Evo 980, 1000G
|
||||||
|
# - 2GiB "EFI2" boot, ESP
|
||||||
|
# - 858GB "ssdpart2" zfs, ssdpool
|
||||||
|
# - 100GB "buf2" empty, future use (metadata device?)
|
||||||
|
# - 8GiB "swap" swap
|
||||||
|
# - 31.4GB "scratch" empty, future use
|
||||||
|
## zfs layout
|
||||||
|
### frumar-new
|
||||||
|
# frumar-new: 30T, 20T usable, mountpoint=/data, snapshotted
|
||||||
|
# frumar-new/backup, mount=none
|
||||||
|
# frumar-new/backup/blackadder, mount=none
|
||||||
|
# znapzends from blackadder:rpool/home-enc, encrypted and compressed at-rest there
|
||||||
|
# frumar-new/plexmedia, mountpoint=/data/plexmedia, snapshotted, different blocksize
|
||||||
|
### ssdpool
|
||||||
|
# ssdpool: 858G
|
||||||
|
# ssdpool/root: compressed
|
||||||
|
# ssdpool/root/var: compressed, snapshotted
|
||||||
|
# ssdpool/torrent: not compressed, not snapshottend
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue