dotfiles/nixos/machines/frumar/fractal.nix

97 lines
2.5 KiB
Nix
Raw Permalink Normal View History

2022-05-15 14:35:03 +02:00
{ config, lib, pkgs, inputs, ... }:
{
2022-10-04 10:39:49 +02:00
imports = [ inputs.nixos-hardware.nixosModules.common-cpu-intel ];
hardware.enableRedistributableFirmware = true;
2016-01-28 02:59:31 +01:00
2021-05-29 18:05:31 +02:00
boot.initrd.availableKernelModules =
2023-07-22 12:28:33 +02:00
[ "nvme" "xhci_pci" "ehci_pci" "ahci" "usb_storage" "sd_mod" ];
2016-01-28 02:59:31 +01:00
2020-05-21 17:39:38 +02:00
boot.loader.grub = {
enable = true;
2023-07-22 12:28:33 +02:00
efiSupport = true;
efiInstallAsRemovable = true;
mirroredBoots = [
{ path = "/boot1"; devices = [ "nodev" ]; }
{ path = "/boot2"; devices = [ "nodev" ]; }
];
2020-05-21 17:39:38 +02:00
};
2016-01-28 02:59:31 +01:00
2023-07-22 12:28:33 +02:00
# fileSystems."/" = {
# device = "/dev/disk/by-uuid/ba95c638-f243-48ee-ae81-0c70884e7e74";
# fsType = "ext4";
# options = [ "defaults" "relatime" "discard" ];
# };
swapDevices = [{ device = "/dev/disk/by-label/ssd-swap"; }];
2016-01-28 02:59:31 +01:00
2021-05-29 18:05:31 +02:00
fileSystems."/data" = {
device = "frumar-new";
fsType = "zfs";
};
2020-05-21 17:39:38 +02:00
2021-05-29 18:05:31 +02:00
fileSystems."/data/plexmedia" = {
device = "frumar-new/plexmedia";
fsType = "zfs";
};
2016-01-28 02:59:31 +01:00
2023-07-22 12:28:33 +02:00
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";
};
2023-08-04 10:39:22 +02:00
fileSystems."/torrent" = {
2023-07-22 12:28:33 +02:00
device = "ssdpool/torrent";
fsType = "zfs";
};
nix.settings.max-jobs = 4;
2023-06-04 16:48:03 +02:00
services.avahi.allowInterfaces = [ "enp2s0" ];
2023-11-01 10:39:24 +01:00
hardware.rasdaemon.enable = true;
2016-01-28 02:59:31 +01:00
}
2023-07-22 12:28:33 +02:00
## 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