hardware/x86_64.nix: split these options into more relevant files

also makes it so we dont ship opengl on platforms where we dont need it (servo)
This commit is contained in:
Colin 2023-09-07 10:24:20 +00:00
parent ea26899735
commit d92b393f01
4 changed files with 9 additions and 7 deletions

View File

@ -136,6 +136,4 @@
# make Pinephone front LEDs writable by user.
SUBSYSTEM=="leds", DEVPATH=="*/*:indicator", RUN+="${chmod} g+w /sys%p/brightness", RUN+="${chown} :video /sys%p/brightness"
'';
hardware.opengl.driSupport = true;
}

View File

@ -26,6 +26,7 @@
# powertop will default to putting USB devices -- including HID -- to sleep after TWO SECONDS
powerManagement.powertop.enable = false;
powerManagement.cpuFreqGovernor = "powersave";
services.logind.extraConfig = ''
# dont shutdown when power button is short-pressed

View File

@ -132,4 +132,12 @@
"/var/lib/colord" # preserve color calibrations (?)
"/var/lib/systemd/backlight" # backlight brightness
];
hardware.opengl = lib.mkIf config.sane.programs.guiApps.enabled ({
driSupport = lib.mkDefault true;
} // (lib.optionalAttrs pkgs.stdenv.isx86_64 {
# for 32 bit applications
# upstream nixpkgs forbids setting driSupport32Bit unless specifically x86_64 (so aarch64 isn't allowed)
driSupport32Bit = lib.mkDefault true;
}));
}

View File

@ -9,12 +9,7 @@
# efi_pstore evivars
];
powerManagement.cpuFreqGovernor = "powersave";
hardware.cpu.amd.updateMicrocode = true; # desktop
hardware.cpu.intel.updateMicrocode = true; # laptop
hardware.opengl.driSupport = true;
# For 32 bit applications
hardware.opengl.driSupport32Bit = true;
};
}