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