1
0
Fork 0
nix-configuration/hosts/Dimaga/hardware-configuration.nix

63 lines
1.6 KiB
Nix
Raw Normal View History

# Surface Laptop Go 1st gen
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
2024-02-29 14:53:34 +00:00
boot = {
initrd = {
availableKernelModules = [
"xhci_pci"
"nvme"
"usb_storage"
"usbhid"
"sd_mod"
];
kernelModules = [ ];
luks.devices."luks-5a91100b-8ed9-4090-b1d8-d8291000fe38".device = "/dev/disk/by-uuid/5a91100b-8ed9-4090-b1d8-d8291000fe38";
};
2024-02-29 14:53:34 +00:00
kernelModules = [ "kvm-intel" ];
extraModulePackages = [ ];
};
2024-02-29 14:53:34 +00:00
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/76d67291-5aed-4f2a-b71f-1c2871cefe24";
fsType = "btrfs";
2024-06-09 18:36:40 +00:00
options = [ "subvol=@,compress=zstd,discard" ];
};
"/boot" = {
device = "/dev/disk/by-uuid/0C53-A645";
fsType = "vfat";
};
};
2024-02-29 14:53:34 +00:00
swapDevices = [
{
device = "/swapfile";
size = 4096;
}
];
2024-02-29 14:53:34 +00:00
networking = {
# 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`.
useDHCP = lib.mkDefault true;
# networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true;
2024-02-29 14:53:34 +00:00
# Set the hostname.
hostName = "Dimaga";
};
2024-02-29 14:53:34 +00:00
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
2024-02-29 14:53:34 +00:00
}