dotfiles/nixos/hosts/valere.nix
2024-11-07 16:25:41 -07:00

109 lines
2.8 KiB
Nix

#
# Per-system configuration for Valere.
#
# vim: et:ts=2:sw=2:
#
{
config,
lib,
deprekages,
modulesPath,
...
}:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# Networking.
networking.hostName = "valere";
networking.networkmanager.enable = true;
networking.firewall.enable = false;
# This is a local machine, rather than our typical network-accesed ones.
# Run an ssh-agent locally.
programs.ssh.startAgent = true;
# Provide support for our RGB controller.
# Note on valere in particular this requires our overlay.
environment.systemPackages = [
deprekages.humanfx
deprekages.dell.fan
deprekages.dell.bios-fan-control
];
#
# Niri configuration for our monitors.
#
home-manager.users.deprekated.programs.niri.settings = {
outputs."eDP-1".scale = 1.5;
};
# Override stylix font sizes.
stylix.fonts.sizes.desktop = lib.mkForce 18;
# Save power!
services.udev.extraRules = ''
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030000", ATTR{power/control}="auto"
'';
#
# Hardware config.
#
boot.initrd.availableKernelModules = [
"xhci_pci"
"thunderbolt"
"vmd"
"nvme"
"usbhid"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [ ];
# Disallow nouveau so the NVIDIA device is available for VFIO.
boot.blacklistedKernelModules = [ "nouveau" ];
boot.extraModprobeConfig = ''
options nouveau modeset=0
'';
# Support virtualization, thunderbolt, and poking the APCI directly. >.>
boot.kernelModules = [
"kvm-intel"
"thunderbolt"
"acpi_call"
];
boot.extraModulePackages = [ config.boot.kernelPackages.acpi_call ];
# Support thunderbolt.
services.hardware.bolt.enable = true;
fileSystems."/" = {
device = "/dev/disk/by-uuid/bb880b80-992f-4e56-bb80-c5c4df0ddd72";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/5B37-C691";
fsType = "vfat";
options = [
"fmask=0022"
"dmask=0022"
];
};
swapDevices = [ { device = "/dev/disk/by-uuid/50f20263-9632-439d-b57d-b9ee8f13d62b"; } ];
# 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;
}