fix(backlight): prevent systemd from restoring state

This commit is contained in:
Infinidoge 2022-04-18 09:47:14 -04:00
parent 9c26a4f0bb
commit 60ccc6622c

View file

@ -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" ];
}; };
} }