os/hosts/stroopwafel/hardware-configuration.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

70 lines
2.2 KiB
Nix
Raw Normal View History

2024-01-27 22:53:36 +00: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.
{
2024-08-18 22:22:59 +00:00
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
2024-01-27 22:53:36 +00:00
2024-08-18 22:22:59 +00:00
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "usbhid" "usb_storage" "sd_mod"];
boot.initrd.kernelModules = ["dm-snapshot"];
boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [];
2024-01-27 22:53:36 +00:00
boot.initrd.luks.devices."cryptroot" = {
device = "/dev/disk/by-id/md-name-nixos:root";
allowDiscards = true;
};
2024-01-29 22:02:05 +00:00
2024-08-18 22:22:59 +00:00
fileSystems."/" = {
device = "none";
fsType = "tmpfs";
};
2024-01-27 22:53:36 +00:00
2024-08-18 22:22:59 +00:00
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/EC82-67F4";
fsType = "vfat";
};
2024-01-27 22:53:36 +00:00
2024-08-18 22:22:59 +00:00
fileSystems."/home" = {
device = "/dev/disk/by-uuid/0cc568f0-402d-4535-980a-ed3a1dc697b9";
fsType = "ext4";
# https://github.com/ryantm/agenix/issues/45#issuecomment-957865406
neededForBoot = true;
};
2024-01-27 22:53:36 +00:00
2024-08-18 22:22:59 +00:00
fileSystems."/nix" = {
device = "/dev/disk/by-uuid/e203d629-4d34-4147-bee6-919f0bfa25de";
fsType = "ext4";
};
2024-01-27 22:53:36 +00:00
2024-08-18 22:22:59 +00:00
fileSystems."/persist" = {
device = "/dev/disk/by-uuid/a0855aaa-76bf-445e-b0d1-ab1552e5496f";
fsType = "ext4";
# https://github.com/ryantm/agenix/issues/45#issuecomment-957865406
neededForBoot = true;
};
2024-01-27 22:53:36 +00:00
2024-08-18 22:22:59 +00:00
swapDevices = [
{device = "/dev/disk/by-uuid/761507ab-479d-414b-ac3e-2149564ca470";}
];
2024-01-27 22:53:36 +00: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`.
2024-01-29 22:02:05 +00:00
# networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp6s0f4u1u4.useDHCP = lib.mkDefault true;
networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true;
2024-01-27 22:53:36 +00:00
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
2024-01-27 22:53:36 +00:00
}