Merge branch 'master' of https://code.steph.tools/steph/os
This commit is contained in:
commit
7b9c264ec8
@ -133,6 +133,7 @@
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
set-backlight-script
|
||||
neovim
|
||||
git
|
||||
wget
|
||||
@ -266,7 +267,7 @@ $NEW_PROMPT_COMMAND"
|
||||
toupper = "tr [:lower:] [:upper:]";
|
||||
tolower = "tr [:upper:] [:lower:]";
|
||||
rebuild = ''
|
||||
sudo sh -c "cd $HOME/.local/os && nixos-rebuild switch --flake .# --use-remote-sudo"
|
||||
nixos-rebuild switch --flake "$HOME/.local/os#" --use-remote-sudo
|
||||
'';
|
||||
};
|
||||
programs.bash.sessionVariables = {
|
||||
@ -339,4 +340,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