Files
nixos-config/hosts/eva-01/hardware-configuration.nix
T
2026-06-01 23:39:02 -04:00

88 lines
3.0 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 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.
{
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = ["xhci_pci" "thunderbolt" "nvme" "uas" "sd_mod"];
boot.initrd.kernelModules = ["btrfs"];
boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = [];
# ── btrfs subvolumes ───────────────────────────────────────────────
# All share the same physical device. Each subvolume can be snapshotted
# and rolled back independently.
#
# IMPORTANT: These subvolumes must exist on disk before this config is
# applied. Create them from a live USB with:
#
# mount /dev/nvme0n1pX /mnt
# btrfs subvolume create /mnt/home
# btrfs subvolume create /mnt/nix
# btrfs subvolume create /mnt/var-log
# btrfs subvolume create /mnt/snapshots
#
fileSystems."/" = {
device = "/dev/disk/by-uuid/0ec1b4fd-ca0f-4938-a038-37a69ec00b21";
fsType = "btrfs";
options = ["subvol=root" "compress=zstd" "discard=async" "noatime"];
};
fileSystems."/home" = {
device = "/dev/disk/by-uuid/0ec1b4fd-ca0f-4938-a038-37a69ec00b21";
fsType = "btrfs";
options = ["subvol=home" "compress=zstd" "discard=async" "noatime"];
};
fileSystems."/nix" = {
device = "/dev/disk/by-uuid/0ec1b4fd-ca0f-4938-a038-37a69ec00b21";
fsType = "btrfs";
options = ["subvol=nix" "compress=zstd" "discard=async" "noatime"];
};
fileSystems."/var/log" = {
device = "/dev/disk/by-uuid/0ec1b4fd-ca0f-4938-a038-37a69ec00b21";
fsType = "btrfs";
options = ["subvol=var-log" "compress=zstd" "discard=async" "noatime"];
neededForBoot = false;
};
fileSystems."/.snapshots" = {
device = "/dev/disk/by-uuid/0ec1b4fd-ca0f-4938-a038-37a69ec00b21";
fsType = "btrfs";
options = ["subvol=snapshots" "compress=zstd" "discard=async" "noatime"];
neededForBoot = false;
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/2066-E44D";
fsType = "vfat";
options = ["fmask=0077" "dmask=0077"];
};
swapDevices = [
{
device = "/var/lib/swapfile";
size = 8 * 1024;
}
];
# 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.wlp0s20f3.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}