fix(backlight): prevent systemd from restoring state
This commit is contained in:
parent
9c26a4f0bb
commit
60ccc6622c
1 changed files with 9 additions and 6 deletions
|
@ -12,12 +12,15 @@ in
|
||||||
initialCommand = mkOpt str "${getMainProgram pkgs.brightnessctl} set ${cfg.initialValue} --class=backlight";
|
initialCommand = mkOpt str "${getMainProgram pkgs.brightnessctl} set ${cfg.initialValue} --class=backlight";
|
||||||
};
|
};
|
||||||
|
|
||||||
config.systemd.services = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
"set-initial-backlight" = {
|
systemd.services = {
|
||||||
description = "Sets the initial backlight status on startup";
|
"set-initial-backlight" = {
|
||||||
wantedBy = [ "multi-user.target" ];
|
description = "Sets the initial backlight status on startup";
|
||||||
serviceConfig.Type = "oneshot";
|
wantedBy = [ "multi-user.target" ];
|
||||||
script = cfg.initialCommand;
|
serviceConfig.Type = "oneshot";
|
||||||
|
script = cfg.initialCommand;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
boot.kernelParams = [ "systemd.restore_state=0" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue