121 lines
3.2 KiB
Nix
121 lines
3.2 KiB
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
modulesPath,
|
|
...
|
|
}: let
|
|
user = config.user;
|
|
in {
|
|
imports = [
|
|
(modulesPath + "/installer/scan/not-detected.nix")
|
|
];
|
|
|
|
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "sd_mod"];
|
|
boot.initrd.kernelModules = [];
|
|
boot.kernelModules = ["kvm-amd"];
|
|
boot.extraModulePackages = [];
|
|
|
|
fileSystems."/" = {
|
|
device = "/dev/disk/by-uuid/979fe496-10e8-41be-97d1-3d000cd2b384";
|
|
fsType = "ext4";
|
|
};
|
|
|
|
fileSystems."/boot" = {
|
|
device = "/dev/disk/by-uuid/72d527de-fead-43d5-8f29-e06d2c584a18";
|
|
fsType = "ext4";
|
|
};
|
|
|
|
fileSystems."/mnt/disk1" = {
|
|
device = "/dev/disk/by-uuid/caba0b6c-00d2-495a-8c04-67ea584f1a63";
|
|
fsType = "ext4";
|
|
};
|
|
|
|
fileSystems."/mnt/disk2" = {
|
|
device = "/dev/disk/by-uuid/e3828580-625e-4f93-974f-9c7fed99dee2";
|
|
fsType = "ext4";
|
|
};
|
|
|
|
fileSystems."/mnt/disk3" = {
|
|
device = "/dev/disk/by-uuid/28f15a05-d550-4a41-a951-244af6140831";
|
|
fsType = "ext4";
|
|
};
|
|
|
|
fileSystems."/mnt/parity1" = {
|
|
device = "/dev/disk/by-uuid/09fc062c-1a61-4e1b-802c-60f7178bc713";
|
|
fsType = "ext4";
|
|
};
|
|
|
|
# /etc/fstab
|
|
|
|
# /mnt/disk1:/mnt/disk2:/mnt/disk3 /mnt/storage mergerfs direct_io,use_ino,allow_other,minfreespace=50G,fsname=mergerfs,category.create=mfs,func.mkdir=epall 0 0
|
|
|
|
fileSystems."/mnt/storage" = {
|
|
device = "/mnt/disk1:/mnt/disk2:/mnt/disk3";
|
|
fsType = "mergerfs";
|
|
depends = ["/mnt/disk1" "/mnt/disk2" "/mnt/disk3"];
|
|
options = [
|
|
"direct_io"
|
|
"use_ino"
|
|
"allow_other"
|
|
"minfreespace=50G"
|
|
"fsname=mergerfs"
|
|
"category.create=mfs"
|
|
"func.mkdir=epall"
|
|
];
|
|
};
|
|
|
|
# auto-generated-config: looks sus
|
|
|
|
# fileSystems."/mnt/storage" =
|
|
# { device = "mergerfs";
|
|
# fsType = "fuse.mergerfs";
|
|
# };
|
|
#
|
|
# fileSystems."/srv/nfs/Media" =
|
|
# { device = "/mnt/storage/media";
|
|
# fsType = "none";
|
|
# options = [ "bind" ];
|
|
# };
|
|
|
|
swapDevices = [
|
|
{device = "/dev/disk/by-uuid/27ad4809-211f-4ae9-90da-d17d9c1df271";}
|
|
];
|
|
|
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
|
# still possible to use this option, but it's recommended to use it in conjunction
|
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
|
networking.useDHCP = lib.mkDefault true;
|
|
# networking.interfaces.eth0.useDHCP = lib.mkDefault true;
|
|
# networking.interfaces.tailscale0.useDHCP = lib.mkDefault true;
|
|
|
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
|
|
system.stateVersion = "24.05"; # don't change.
|
|
home-manager.users.${user}.imports = [
|
|
{
|
|
home.stateVersion = "24.05";
|
|
}
|
|
];
|
|
|
|
services.snapraid = {
|
|
enable = true;
|
|
contentFiles = [
|
|
"/mnt/disk1/SnapRAID.content"
|
|
"/mnt/disk2/SnapRAID.content"
|
|
"/mnt/disk3/SnapRAID.content"
|
|
"/var/snapraid/SnapRAID.content"
|
|
];
|
|
dataDisks = {
|
|
d1 = "/mnt/disk1";
|
|
d2 = "/mnt/disk2";
|
|
d3 = "/mnt/disk3";
|
|
};
|
|
exclude = ["/lost+found"];
|
|
parityFiles = [
|
|
"/mnt/parity1/SnapRAID.parity"
|
|
];
|
|
};
|
|
}
|