mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
better shell script thing thanks to abby
This commit is contained in:
parent
6934230103
commit
8592cd4718
1 changed files with 6 additions and 12 deletions
|
|
@ -8,31 +8,25 @@
|
||||||
};
|
};
|
||||||
systemd = {
|
systemd = {
|
||||||
services = {
|
services = {
|
||||||
kaede-thermals = let
|
kaede-thermals = {
|
||||||
kaede-thermals-script =
|
|
||||||
pkgs.writeScriptBin "script" (builtins.readFile ./kaede-thermals.sh);
|
|
||||||
in {
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
path = [ pkgs.bash pkgs.coreutils-full ];
|
path = [ pkgs.bash pkgs.coreutils-full ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
RemainAfterExit = "no";
|
RemainAfterExit = "no";
|
||||||
Type = "simple";
|
Type = "simple";
|
||||||
ExecStart = "${kaede-thermals-script}/bin/script start";
|
ExecStart = "/usr/bin/env bash ${./kaede-thermals.sh} start";
|
||||||
ExecStop = "${kaede-thermals-script}/bin/script stop";
|
ExecStop = "/usr/bin/env bash ${./kaede-thermals.sh} stop";
|
||||||
User = "root";
|
User = "root";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
kaede-power = let
|
kaede-power = {
|
||||||
kaede-power-script =
|
|
||||||
pkgs.writeScriptBin "script" (builtins.readFile ./kaede-power.sh);
|
|
||||||
in {
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
path = [ pkgs.bash pkgs.linuxPackages.cpupower ];
|
path = [ pkgs.bash pkgs.linuxPackages.cpupower ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
RemainAfterExit = "yes";
|
RemainAfterExit = "yes";
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
ExecStart = "${kaede-power-script}/bin/script start";
|
ExecStart = "/usr/bin/env bash ${./kaede-power.sh} start";
|
||||||
ExecStop = "${kaede-power-script}/bin/script stop";
|
ExecStop = "/usr/bin/env bash ${./kaede-power.sh} stop";
|
||||||
User = "root";
|
User = "root";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue