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
|
@ -1,5 +1,5 @@
|
|||
# This file configures camden.tazj.in, my homeserver.
|
||||
{ depot, lib, ... }:
|
||||
{ depot, pkgs, lib, ... }:
|
||||
|
||||
config: let
|
||||
nixpkgs = import depot.third_party.nixpkgsSrc {
|
||||
|
@ -100,6 +100,7 @@ in lib.fix(self: {
|
|||
environment.systemPackages =
|
||||
# programs from the depot
|
||||
(with depot; [
|
||||
fun.idual.setAlarm
|
||||
third_party.git
|
||||
third_party.honk
|
||||
third_party.pounce
|
||||
|
@ -347,5 +348,14 @@ in lib.fix(self: {
|
|||
};
|
||||
};
|
||||
|
||||
# Timer units that can be started with systemd-run to set my alarm.
|
||||
systemd.user.services.light-alarm = {
|
||||
script = "${depot.fun.idual.script}/bin/__init__.py";
|
||||
postStart = "${pkgs.systemd}/bin/systemctl --user stop light-alarm.timer";
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
};
|
||||
};
|
||||
|
||||
system.stateVersion = "19.09";
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue