aa
This commit is contained in:
parent
5e6bf35747
commit
7406df9cf8
@ -130,6 +130,7 @@
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
set-backlight-script
|
||||
neovim
|
||||
git
|
||||
wget
|
||||
@ -335,4 +336,29 @@ $NEW_PROMPT_COMMAND"
|
||||
|
||||
};
|
||||
|
||||
|
||||
let set-backlight-script = (writeShellApplication {
|
||||
name = "set-backlight-script";
|
||||
text = ''
|
||||
#!/bin/sh
|
||||
|
||||
for d in /sys/class/backlight/*; do
|
||||
cd $d
|
||||
echo $(( $(cat max_brightness) / 2)) > brightness
|
||||
done
|
||||
'';
|
||||
});
|
||||
in
|
||||
systemd.services.99setbacklight = {
|
||||
enable = true;
|
||||
description = "bar";
|
||||
unitConfig = {
|
||||
Type = "simple";
|
||||
};
|
||||
serviceConfig = {
|
||||
ExecStart = "${set-backlight-script}";
|
||||
};
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
|
||||
}
|
||||
|
6
startup.sh
Executable file
6
startup.sh
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
for dev in /sys/class/backlight/* ; do
|
||||
cd $dev
|
||||
echo $(( $(cat max_brightness) / 2)) > brightness
|
||||
done
|
Loading…
Reference in New Issue
Block a user