2023-10-15 17:40:57 -04:00
|
|
|
{ config, modulesPath, pkgs, ... }: {
|
2023-10-15 17:27:57 -04:00
|
|
|
nixpkgs.hostPlatform = "x86_64-linux";
|
2023-09-29 23:46:34 -04:00
|
|
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
2023-06-13 23:34:03 -04:00
|
|
|
|
2023-10-15 17:27:57 -04:00
|
|
|
boot = {
|
2023-10-15 17:40:57 -04:00
|
|
|
kernelPackages = pkgs.linuxPackages_latest;
|
2023-10-17 18:45:08 -04:00
|
|
|
kernelModules = [ "kvm-amd" ];
|
|
|
|
extraModulePackages = with config.boot.kernelPackages; [
|
|
|
|
v4l2loopback
|
|
|
|
];
|
|
|
|
|
|
|
|
kernelParams = [
|
|
|
|
"cryptdevice=UUID=ab82b477-2477-453f-b95f-28e5553ad10d:root"
|
|
|
|
"root=/dev/mapper/root"
|
|
|
|
];
|
|
|
|
|
2023-10-15 17:40:57 -04:00
|
|
|
consoleLogLevel = 0;
|
|
|
|
|
2023-10-15 17:27:57 -04:00
|
|
|
initrd = {
|
2023-10-15 17:40:57 -04:00
|
|
|
verbose = false;
|
|
|
|
systemd.enable = true;
|
2023-10-15 17:27:57 -04:00
|
|
|
availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "sd_mod" ];
|
2023-10-15 17:40:57 -04:00
|
|
|
|
|
|
|
luks.devices."root" = {
|
|
|
|
device = "/dev/disk/by-uuid/ab82b477-2477-453f-b95f-28e5553ad10d";
|
|
|
|
};
|
2023-10-15 17:27:57 -04:00
|
|
|
};
|
2023-10-15 17:40:57 -04:00
|
|
|
|
|
|
|
loader = {
|
|
|
|
efi.canTouchEfiVariables = true;
|
|
|
|
timeout = 2;
|
2023-10-17 18:45:08 -04:00
|
|
|
|
2023-10-15 17:40:57 -04:00
|
|
|
grub = {
|
|
|
|
enable = true;
|
|
|
|
device = "nodev";
|
|
|
|
efiSupport = true;
|
|
|
|
extraConfig = ''
|
|
|
|
set timeout_style=hidden
|
|
|
|
'';
|
|
|
|
# Because it still draws that image otherwise
|
|
|
|
splashImage = null;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
# https://github.com/NixOS/nixpkgs/issues/254807#issuecomment-1722351771
|
|
|
|
swraid.enable = false;
|
2023-09-29 23:46:34 -04:00
|
|
|
};
|
2023-06-13 23:34:03 -04:00
|
|
|
|
2023-10-15 17:27:57 -04:00
|
|
|
fileSystems = {
|
|
|
|
"/" = {
|
|
|
|
device = "/dev/disk/by-uuid/6ae4d722-dacf-485a-8d29-b276f540dc91";
|
|
|
|
fsType = "btrfs";
|
|
|
|
};
|
2023-06-13 23:34:03 -04:00
|
|
|
|
2023-10-15 17:27:57 -04:00
|
|
|
"/boot" = {
|
|
|
|
device = "/dev/disk/by-label/NIXBOOT";
|
|
|
|
fsType = "vfat";
|
|
|
|
};
|
2023-09-29 23:46:34 -04:00
|
|
|
};
|
2023-06-13 23:34:03 -04:00
|
|
|
|
2023-10-15 15:14:42 -04:00
|
|
|
zramSwap.enable = true;
|
2023-10-15 17:27:57 -04:00
|
|
|
hardware = {
|
|
|
|
cpu.amd.updateMicrocode = config.hardware.enableRedistributableFirmware;
|
|
|
|
|
|
|
|
sensor.iio.enable = true;
|
|
|
|
opengl.enable = true;
|
|
|
|
opengl.driSupport32Bit = true;
|
|
|
|
uinput.enable = true;
|
|
|
|
|
|
|
|
bluetooth = {
|
|
|
|
enable = true;
|
|
|
|
powerOnBoot = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
virtualisation = {
|
|
|
|
libvirtd.enable = true;
|
|
|
|
waydroid.enable = true;
|
|
|
|
};
|
|
|
|
|
2023-11-10 23:51:50 -05:00
|
|
|
# enable brightness control
|
2023-10-15 17:27:57 -04:00
|
|
|
programs.light.enable = true;
|
2023-10-15 15:14:42 -04:00
|
|
|
|
2023-10-15 17:27:57 -04:00
|
|
|
services.udev.extraRules = ''
|
|
|
|
# give permanent path to keyboard XF86* binds
|
|
|
|
SUBSYSTEMS=="input", ATTRS{id/product}=="0006", ATTRS{id/vendor}=="0000", SYMLINK += "video-bus"
|
2023-06-13 23:34:03 -04:00
|
|
|
|
2023-10-15 17:27:57 -04:00
|
|
|
# give permanent path to touchpad
|
2023-11-04 00:49:34 -04:00
|
|
|
SUBSYSTEMS=="input", ATTRS{id/product}=="01e0", ATTRS{id/vendor}=="27c6", ATTRS{name}=="*Touchpad", SYMLINK += "touchpad"
|
2023-10-15 17:27:57 -04:00
|
|
|
'';
|
2023-06-13 23:34:03 -04:00
|
|
|
}
|