nixos-config/machines/AMD-Workstation/hardware-configuration.nix

81 lines
2.6 KiB
Nix
Raw Normal View History

2020-02-12 02:34:44 +04:00
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
2021-06-29 22:27:50 +03:00
{ config, lib, pkgs, modulesPath, ... }:
2020-02-12 02:34:44 +04:00
{
imports =
2021-06-29 22:27:50 +03:00
[ (modulesPath + "/installer/scan/not-detected.nix")
];
2020-02-12 02:34:44 +04:00
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
2022-10-08 04:32:18 +03:00
{ device = "rpool/nixos/root";
fsType = "zfs"; options = [ "zfsutil" "X-mount.mkdir" ];
2020-02-12 02:34:44 +04:00
};
2021-06-29 22:27:50 +03:00
fileSystems."/nix" =
2022-10-08 04:32:18 +03:00
{ device = "rpool/nixos/nix";
fsType = "zfs"; options = [ "zfsutil" "X-mount.mkdir" ];
2020-02-12 02:34:44 +04:00
};
fileSystems."/home" =
2022-10-08 04:32:18 +03:00
{ device = "rpool/user/home";
fsType = "zfs"; options = [ "zfsutil" "X-mount.mkdir" ];
2020-02-12 02:34:44 +04:00
};
2022-10-08 04:32:18 +03:00
fileSystems."/var/lib" =
{ device = "rpool/nixos/var/lib";
fsType = "zfs"; options = [ "zfsutil" "X-mount.mkdir" ];
};
fileSystems."/var/log" =
{ device = "rpool/nixos/var/log";
fsType = "zfs"; options = [ "zfsutil" "X-mount.mkdir" ];
2021-06-29 22:27:50 +03:00
};
fileSystems."/media/bittorrent" =
2022-10-08 04:32:18 +03:00
{ device = "rpool/nixos/bittorrent";
fsType = "zfs"; options = [ "zfsutil" "X-mount.mkdir" ];
2020-02-12 02:34:44 +04:00
};
2021-09-15 18:40:13 +03:00
fileSystems."/media/libvirt" =
2022-10-08 04:32:18 +03:00
{ device = "rpool/nixos/libvirt";
fsType = "zfs"; options = [ "zfsutil" "X-mount.mkdir" ];
2021-09-15 18:40:13 +03:00
};
2020-02-12 02:34:44 +04:00
fileSystems."/boot" =
2021-10-24 23:10:30 +03:00
{ device = "/dev/disk/by-uuid/948B-11EC";
2020-02-12 02:34:44 +04:00
fsType = "vfat";
};
2021-06-29 22:27:50 +03:00
swapDevices = [
{
2022-10-08 04:32:18 +03:00
device = "/dev/disk/by-partuuid/7ffa34d9-862b-42ff-a649-da54f7b8fbf0";
2022-10-21 14:00:16 +03:00
randomEncryption.enable = false;
2021-06-29 22:27:50 +03:00
}
];
2022-10-21 14:00:16 +03:00
2022-10-08 04:32:18 +03:00
# 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.enp9s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
2021-06-29 22:27:50 +03:00
# high-resolution display
hardware.video.hidpi.enable = lib.mkDefault true;
2022-10-08 04:32:18 +03:00
networking.hostId = "a32bd2dc";
boot.zfs.devNodes = "/dev/disk/by-partuuid/4c6b8cfb-9643-4ff7-961e-89b097328e0e";
boot.supportedFilesystems = [ "zfs" ];
2022-10-21 14:00:16 +03:00
boot.kernelParams = [ "zfs.zfs_arc_max=12884901888" ];
2020-02-12 02:34:44 +04:00
}