feat: change harddisk nas
This commit is contained in:
@@ -50,13 +50,12 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Impermanence - persist important directories
|
# Impermanence - persist important directories
|
||||||
|
# Note: /var/lib/downloads and /var/lib/multimedia are mounted from LVM on RAID
|
||||||
environment.persistence."/nix/persist/system" = {
|
environment.persistence."/nix/persist/system" = {
|
||||||
hideMounts = true;
|
hideMounts = true;
|
||||||
directories = [
|
directories = [
|
||||||
"/var/lib/pyload"
|
"/var/lib/pyload"
|
||||||
"/var/lib/jellyfin"
|
"/var/lib/jellyfin"
|
||||||
"/var/lib/downloads"
|
|
||||||
"/var/lib/multimedia"
|
|
||||||
"/var/log"
|
"/var/log"
|
||||||
"/var/lib/nixos"
|
"/var/lib/nixos"
|
||||||
"/var/bento"
|
"/var/bento"
|
||||||
|
|||||||
@@ -12,10 +12,19 @@
|
|||||||
};
|
};
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" ];
|
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" ];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
# RAID 1 array for data storage
|
||||||
|
boot.swraid = {
|
||||||
|
enable = true;
|
||||||
|
mdadmConf = ''
|
||||||
|
DEVICE /dev/disk/by-id/ata-ST18000NM000J-2TV103_ZR52TBSB-part1
|
||||||
|
DEVICE /dev/disk/by-id/ata-ST18000NM000J-2TV103_ZR52V9QX-part1
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
# Tmpfs root filesystem (ephemeral - resets on reboot)
|
# Tmpfs root filesystem (ephemeral - resets on reboot)
|
||||||
fileSystems."/" = {
|
fileSystems."/" = {
|
||||||
device = "none";
|
device = "none";
|
||||||
@@ -65,6 +74,17 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# LVM volumes on RAID array
|
||||||
|
fileSystems."/var/lib/downloads" = {
|
||||||
|
device = "/dev/vg-data/lv-downloads";
|
||||||
|
fsType = "xfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/var/lib/multimedia" = {
|
||||||
|
device = "/dev/vg-data/lv-multimedia";
|
||||||
|
fsType = "xfs";
|
||||||
|
};
|
||||||
|
|
||||||
# DHCP networking
|
# DHCP networking
|
||||||
networking.useDHCP = lib.mkDefault true;
|
networking.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user