feat(fun/idual && nixos/camden): Add light alarm systemd units
Adds a systemd unit to run the idual light alarm using a transient timer created by systemd-run.
This commit is contained in:
parent
28bf77a1f1
commit
6644d0031d
3 changed files with 21 additions and 4 deletions
|
|
@ -12,8 +12,13 @@ let
|
|||
python.broadlink
|
||||
];
|
||||
};
|
||||
in lib.fix (self: {
|
||||
package = python3Packages.buildPythonPackage opts;
|
||||
script = python3Packages.buildPythonApplication opts;
|
||||
python = python3.withPackages (_: [ self.package ]);
|
||||
})
|
||||
in {
|
||||
inherit script;
|
||||
python = python3.withPackages (_: [ package ]);
|
||||
setAlarm = pkgs.writeShellScriptBin "set-alarm" ''
|
||||
echo "setting an alarm for ''${1}"
|
||||
${pkgs.systemd}/bin/systemd-run --user --on-calendar="''${1} Europe/London" --unit=light-alarm.service
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue