Full Refactor and history reset
This commit is contained in:
142
hardware.specter.nix
Normal file
142
hardware.specter.nix
Normal file
@@ -0,0 +1,142 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
"nvme"
|
||||
"xhci_pci"
|
||||
"thunderbolt"
|
||||
"usbhid"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
# boot.extraModulePackages = [ config.boot.kernelPackages.exfat-nofuse ];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
networking.hostName = "specter";
|
||||
services.xserver.videoDrivers = [ "amdgpu" ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/ec9bc14c-0c84-417a-87cc-86b463542958";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/DBDB-72C3";
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
"fmask=0022"
|
||||
"dmask=0022"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/home/joe/projects" = {
|
||||
device = "/dev/disk/by-uuid/82f95a15-f3d0-4eb9-843d-9eab68491e7c";
|
||||
fsType = "btrfs";
|
||||
};
|
||||
|
||||
fileSystems."/home/joe/backup" = {
|
||||
device = "/dev/disk/by-uuid/83503573-ddc4-4291-a515-b877f1d85c39";
|
||||
fsType = "ext4";
|
||||
options = [
|
||||
"x-systemd.automount"
|
||||
"noauto"
|
||||
];
|
||||
};
|
||||
|
||||
# fileSystems."/home/joe/travel" = {
|
||||
# device = "/dev/disk/by-uuid/0D7A-0971";
|
||||
# fsType = "vfat";
|
||||
# options = [
|
||||
# "x-systemd.automount"
|
||||
# "noauto"
|
||||
# "nofail",
|
||||
# "uid=1000"
|
||||
# "gid=100"
|
||||
# "dmask=007"
|
||||
# "fmask=117"
|
||||
# ];
|
||||
# };
|
||||
|
||||
# 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.wlp5s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
|
||||
# Workaround for SuspendThenHibernate: https://lore.kernel.org/linux-kernel/20231106162310.85711-1-mario.limonciello@amd.com/
|
||||
boot.kernelParams =
|
||||
lib.optionals (lib.versionOlder config.boot.kernelPackages.kernel.version "6.8")
|
||||
[ "rtc_cmos.use_acpi_alarm=1" ];
|
||||
|
||||
# AMD has better battery life with PPD over TLP:
|
||||
# https://community.frame.work/t/responded-amd-7040-sleep-states/38101/13
|
||||
services.power-profiles-daemon.enable = lib.mkDefault true;
|
||||
services.upower.enable = true;
|
||||
|
||||
# Fix TRRS headphones missing a mic
|
||||
# https://community.frame.work/t/headset-microphone-on-linux/12387/3
|
||||
boot.extraModprobeConfig = lib.mkIf (lib.versionOlder pkgs.linux.version "6.6.8") ''
|
||||
options snd-hda-intel model=dell-headset-multi
|
||||
'';
|
||||
|
||||
# For fingerprint support
|
||||
services.fprintd.enable = lib.mkDefault true;
|
||||
# security.pam.services.login.fprintAuth = false;
|
||||
|
||||
# Custom udev rules
|
||||
services.udev.extraRules = ''
|
||||
# Ethernet expansion card support
|
||||
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0bda", ATTR{idProduct}=="8156", ATTR{power/autosuspend}="20"
|
||||
# LED MATRIX
|
||||
# SUBSYSTEMS=="usb", ATTRS{idVendor}=="32ac", ATTRS{idProduct}=="0020", MODE="0660", TAG+="uaccess"
|
||||
'';
|
||||
|
||||
services.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
# If you want to use JACK applications, uncomment this
|
||||
#jack.enable = true;
|
||||
|
||||
# use the example session manager (no others are packaged yet so this is enabled by default,
|
||||
# no need to redefine it in your config for now)
|
||||
#media-session.enable = true;
|
||||
};
|
||||
|
||||
# Needed for desktop environments to detect/manage display brightness
|
||||
hardware.sensor.iio.enable = lib.mkDefault true;
|
||||
hardware.keyboard.qmk.enable = lib.mkDefault true;
|
||||
|
||||
# Allow `services.libinput.touchpad.disableWhileTyping` to work correctly.
|
||||
# Set unconditionally because libinput can also be configured dynamically via
|
||||
# gsettings.
|
||||
services.libinput.touchpad.disableWhileTyping = true;
|
||||
environment.etc."libinput/local-overrides.quirks".text = ''
|
||||
[Framework Laptop 16 Keyboard Module]
|
||||
MatchName=Framework Laptop 16 Keyboard Module*
|
||||
MatchUdevType=keyboard
|
||||
MatchDMIModalias=dmi:*svnFramework:pnLaptop16*
|
||||
AttrKeyboardIntegration=internal
|
||||
'';
|
||||
|
||||
# Everything is updateable through fwupd
|
||||
services.fwupd.enable = true;
|
||||
}
|
||||
Reference in New Issue
Block a user