Files
nixos-configv3/machines/latitude/hardware-configuration.nix
2026-04-11 19:32:45 -04:00

85 lines
1.9 KiB
Nix
Executable File
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"
"usb_storage"
"sd_mod"
"sdhci_pci"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-label/NIXROOT";
fsType = "ext4";
};
boot.resumeDevice = "/dev/disk/by-label/NIXSWAP";
fileSystems."/boot" = {
device = "/dev/disk/by-label/NIXBOOT";
fsType = "vfat";
options = [
"fmask=0022"
"dmask=0022"
];
};
swapDevices = [
{
device = "/dev/disk/by-label/NIXSWAP";
}
];
services.power-profiles-daemon.enable = true;
# Suspend first then hibernate when closing the lid
services.logind.settings.Login.LidSwitch = "suspend-then-hibernate";
# Hibernate on power button pressed
services.logind.settings.Login.PowerKey = "hibernate";
services.logind.settings.Login.PowerKeyLongPress = "poweroff";
# Suspend first
boot.kernelParams = [
"mem_sleep_default=deep"
];
# Define time delay for hibernation
systemd.sleep.settings.Sleep = {
HibernateDelaySec = 900;
};
# facial recognition
security.pam.howdy.enable = true;
services.howdy.enable = true;
services.linux-enable-ir-emitter.enable = true; # lmao
# by default face is good enough
security.pam.howdy.control = "sufficient";
services.howdy.settings = {
core = {
workaround = "native";
};
video = {
timeout = "20";
};
};
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}