mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-22 07:13:55 -05:00
mauville/home: implify systemd units
This commit is contained in:
parent
0f523dd24c
commit
4d817c1f72
|
@ -18,11 +18,9 @@
|
|||
systemd.user = {
|
||||
services = {
|
||||
backblaze-sync = {
|
||||
Unit = {
|
||||
Description = "Backup to Backblaze.";
|
||||
};
|
||||
Service = {
|
||||
ExecStart = "${pkgs.writeShellScript "backblaze-sync" ''
|
||||
Unit.Description = "Backup to Backblaze.";
|
||||
|
||||
Service.ExecStart = "${pkgs.writeShellScript "backblaze-sync" ''
|
||||
declare -A backups
|
||||
backups=(
|
||||
['/home/aly/pics/camera']="b2://aly-camera"
|
||||
|
@ -42,14 +40,11 @@
|
|||
done
|
||||
''}";
|
||||
};
|
||||
};
|
||||
|
||||
build-hosts = {
|
||||
Unit = {
|
||||
Description = "Build nixosConfiguration for each host.";
|
||||
};
|
||||
Service = {
|
||||
ExecStart = "${pkgs.writeShellScript "build-hosts" ''
|
||||
Unit.Description = "Build nixosConfiguration for each host.";
|
||||
|
||||
Service.ExecStart = "${pkgs.writeShellScript "build-hosts" ''
|
||||
hosts=(
|
||||
fallarbor
|
||||
lavaridge
|
||||
|
@ -63,30 +58,17 @@
|
|||
''}";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
timers = {
|
||||
backblaze-sync = {
|
||||
Unit = {
|
||||
Description = "Daily backups to Backblaze.";
|
||||
};
|
||||
Install = {
|
||||
WantedBy = ["timers.target"];
|
||||
};
|
||||
Timer = {
|
||||
OnCalendar = "*-*-* 03:00:00";
|
||||
};
|
||||
Install.WantedBy = ["timers.target"];
|
||||
Timer.OnCalendar = "*-*-* 03:00:00";
|
||||
Unit.Description = "Daily backups to Backblaze.";
|
||||
};
|
||||
build-hosts = {
|
||||
Unit = {
|
||||
Description = "Build hosts daily.";
|
||||
};
|
||||
Install = {
|
||||
WantedBy = ["timers.target"];
|
||||
};
|
||||
Timer = {
|
||||
OnCalendar = "*-*-* 06:00:00";
|
||||
};
|
||||
Install.WantedBy = ["timers.target"];
|
||||
Timer.OnCalendar = "*-*-* 06:00:00";
|
||||
Unit.Description = "Build hosts daily.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue