nixnew/systems/msi/hardware-configuration.nix

56 lines
1.9 KiB
Nix

# zfs:
# sudo zfs create -o mountpoint=legacy -o canmount=off -o atime=off -o compression=zstd -o sync=disabled -o casesensitivity=sensitive -o exec=on -o setuid=off -o xattr=sa -o devices=off pool/games
# sudo zfs create -o mountpoint=legacy -o canmount=off -o atime=off -o compression=zstd -o sync=disabled -o casesensitivity=sensitive -o exec=on -o setuid=off -o xattr=sa -o devices=off pool/torrents
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
boot.supportedFilesystems = [ "zfs" ];
networking.hostId = "fd4421b3";
systemd.services.zfs-mount.enable = false;
services.zfs.autoScrub.enable = true;
fileSystems."/" =
{ device = "/dev/disk/by-uuid/c9cb1730-c0d1-4a2e-a092-12dfa7098476";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/9BF9-E3ED";
fsType = "vfat";
};
fileSystems."/pool/games" = {
fsType = "zfs";
device = "pool/games";
};
fileSystems."/pool/torrents" = {
fsType = "zfs";
device = "pool/torrents";
};
fileSystems."/pool/music" = {
fsType = "zfs";
device = "pool/music";
};
swapDevices = [ ];
# 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.wlp4s0.useDHCP = lib.mkDefault true;
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}