mirror of
https://github.com/Ahwxorg/nixos-config.git
synced 2026-07-16 22:21:55 +08:00
feat: write fw13 module for if i ever somehow obtain a fw13 again
This commit is contained in:
parent
009a606c91
commit
8ff8765eb6
1 changed files with 51 additions and 0 deletions
51
roles/fw13.nix
Normal file
51
roles/fw13.nix
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.liv.gui;
|
||||
in
|
||||
{
|
||||
options.liv.fw13 = {
|
||||
enable = mkEnableOption "Enable FW13 specific options";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
imports = [ inputs.nixos-hardware.nixosModules.framework-13-intel ];
|
||||
|
||||
# Disable light sensors and accelerometers as they are not used and consume extra battery
|
||||
hardware.sensor.iio.enable = lib.mkForce false;
|
||||
|
||||
hardware.framework = {
|
||||
amd-7040.preventWakeOnAC = true;
|
||||
# laptop13.audioEnhancement.enable = true;
|
||||
};
|
||||
|
||||
boot.kernelParams = [
|
||||
"acpi_osi=\"!Windows 2020\"" # otherwise GPU does weird shit that makes the computer look like the RAM is broken
|
||||
];
|
||||
|
||||
# change battery led to blue on suspend to indicate device is in suspend mode
|
||||
systemd.services."suspend-led-set" = {
|
||||
description = "blue led for sleep";
|
||||
wantedBy = [ "suspend.target" ];
|
||||
before = [ "systemd-suspend.service" ];
|
||||
serviceConfig.type = "simple";
|
||||
script = ''
|
||||
${pkgs.fw-ectool}/bin/ectool led battery blue
|
||||
'';
|
||||
};
|
||||
systemd.services."suspend-led-unset" = {
|
||||
description = "auto led after sleep";
|
||||
wantedBy = [ "suspend.target" ];
|
||||
after = [ "systemd-suspend.service" ];
|
||||
serviceConfig.type = "simple";
|
||||
script = ''
|
||||
${pkgs.fw-ectool}/bin/ectool led battery auto
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue