Optimize fw16 conf
- power mgmt/sleep/energy usage - usbc dock eth - wheelNeedsPassword=true due to fprint
This commit is contained in:
parent
b7354c7d36
commit
f8ff3b90b8
3 changed files with 39 additions and 7 deletions
|
@ -56,7 +56,7 @@
|
||||||
sudo.enable = false;
|
sudo.enable = false;
|
||||||
sudo-rs = {
|
sudo-rs = {
|
||||||
enable = true;
|
enable = true;
|
||||||
wheelNeedsPassword = false;
|
wheelNeedsPassword = lib.mkDefault false;
|
||||||
execWheelOnly = true;
|
execWheelOnly = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -25,6 +25,12 @@
|
||||||
./disks.nix
|
./disks.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
security.sudo-rs.wheelNeedsPassword = lib.mkForce true;
|
||||||
|
|
||||||
|
services.power-profiles-daemon.enable = true;
|
||||||
|
|
||||||
|
powerManagement.powertop.enable = true;
|
||||||
|
|
||||||
programs.corectrl.gpuOverclock.enable = lib.mkForce false; # TODO Check if needed
|
programs.corectrl.gpuOverclock.enable = lib.mkForce false; # TODO Check if needed
|
||||||
|
|
||||||
# nix.settings.system-features = [
|
# nix.settings.system-features = [
|
||||||
|
@ -44,10 +50,10 @@
|
||||||
# "systemd.unit=emergency.target"
|
# "systemd.unit=emergency.target"
|
||||||
"systemd.setenv=SYSTEMD_SULOGIN_FORCE=1"
|
"systemd.setenv=SYSTEMD_SULOGIN_FORCE=1"
|
||||||
# "rescue"
|
# "rescue"
|
||||||
# "pcie_aspm=force"
|
"pcie_aspm=force"
|
||||||
# "pcie_aspm.policy=powersupersave"
|
# "pcie_aspm.policy=powersupersave"
|
||||||
# "rtc_cmos.use_acpi_alarm=1" # reduce S0 sleep wakeups
|
"rtc_cmos.use_acpi_alarm=1" # reduce S0 sleep wakeups
|
||||||
# "gpiolib_acpi.ignore_interrupt=AMDI0030:00@9" # mask IRQ 9 ?
|
"gpiolib_acpi.ignore_interrupt=AMDI0009:00@9" # mask IRQ 9 ?
|
||||||
];
|
];
|
||||||
loader = {
|
loader = {
|
||||||
systemd-boot = {
|
systemd-boot = {
|
||||||
|
@ -123,6 +129,15 @@
|
||||||
|
|
||||||
systemd = {
|
systemd = {
|
||||||
services = {
|
services = {
|
||||||
|
# Do not manage HID devices with powertop to prevent annoying keyboard/mouse sleeps
|
||||||
|
powertop.postStart = ''
|
||||||
|
HIDDEVICES=$(ls /sys/bus/usb/drivers/usbhid | grep -oE '^[0-9]+-[0-9\.]+' | sort -u)
|
||||||
|
for i in $HIDDEVICES; do
|
||||||
|
echo -n "Enabling " | cat - /sys/bus/usb/devices/$i/product
|
||||||
|
echo 'on' > /sys/bus/usb/devices/$i/power/control
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
|
||||||
# This manually configures the automatically created network-adresses service to be more flexible
|
# This manually configures the automatically created network-adresses service to be more flexible
|
||||||
# regarding booting without the the device being available on boot
|
# regarding booting without the the device being available on boot
|
||||||
# It prevents slow timeouts & errors on boot while preserving Plug & Play ability
|
# It prevents slow timeouts & errors on boot while preserving Plug & Play ability
|
||||||
|
@ -133,16 +148,32 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
services.udev.extraRules = ''
|
services.udev.extraRules = ''
|
||||||
|
# Framework Laptop 16 - LED Matrix
|
||||||
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="32ac", ATTRS{idProduct}=="0020", MODE="0660", TAG+="uaccess"
|
||||||
|
|
||||||
|
# B1 Display (Experimental prototype, not a product)
|
||||||
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="32ac", ATTRS{idProduct}=="0021", MODE="0660", TAG+="uaccess"
|
||||||
|
|
||||||
|
# C1 Minimal Microcontroller Module (Template for DIY Module)
|
||||||
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="32ac", ATTRS{idProduct}=="0022", MODE="0660", TAG+="uaccess"
|
||||||
|
|
||||||
|
# USB-C dock ethernet
|
||||||
ACTION=="add", KERNEL=="eth0", TAG+="systemd", ENV{SYSTEMD_WANTS}="network-addresses-eth0.service"
|
ACTION=="add", KERNEL=="eth0", TAG+="systemd", ENV{SYSTEMD_WANTS}="network-addresses-eth0.service"
|
||||||
ACTION=="remove", KERNEL=="eth0", RUN+="${pkgs.systemd}/bin/systemctl stop network-addresses-eth0.service"
|
ACTION=="remove", KERNEL=="eth0", RUN+="${pkgs.systemd}/bin/systemctl stop network-addresses-eth0.service"
|
||||||
|
|
||||||
|
# TODO check needed?
|
||||||
SUBSYSTEM=="pci", ATTR{power/control}="auto"
|
SUBSYSTEM=="pci", ATTR{power/control}="auto"
|
||||||
ACTION=="add", SUBSYSTEM=="serio", DRIVERS=="atkbd", ATTR{power/wakeup}="disabled"
|
# ACTION=="add", SUBSYSTEM=="serio", DRIVERS=="atkbd", ATTR{power/wakeup}="disabled"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
lm_sensors
|
||||||
|
coreutils-full
|
||||||
|
cpu-x
|
||||||
|
fw-ectool
|
||||||
|
];
|
||||||
# android-tools
|
# android-tools
|
||||||
# android-udev-rules
|
# android-udev-rules
|
||||||
# ];
|
|
||||||
|
|
||||||
hardware = {
|
hardware = {
|
||||||
enableRedistributableFirmware = true;
|
enableRedistributableFirmware = true;
|
||||||
|
|
|
@ -55,6 +55,7 @@
|
||||||
{
|
{
|
||||||
"/" = {
|
"/" = {
|
||||||
device = "/dev/mapper/crypt_ssd_4t_data";
|
device = "/dev/mapper/crypt_ssd_4t_data";
|
||||||
|
# device = "UUID=f89215ba-3313-42d3-8f68-051ad2453870";
|
||||||
fsType = "bcachefs";
|
fsType = "bcachefs";
|
||||||
options = [ "relatime" ];
|
options = [ "relatime" ];
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue