mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-22 08:33:55 -05:00
mauville/home: build select flake nixosConfigurations daily
This commit is contained in:
parent
ade653b20d
commit
69544be359
|
@ -66,7 +66,8 @@
|
|||
users.aly = {
|
||||
imports = [../../homes/aly.nix];
|
||||
systemd.user = {
|
||||
services.backblaze-sync = {
|
||||
services = {
|
||||
backblaze-sync = {
|
||||
Unit = {
|
||||
Description = "Backup to Backblaze.";
|
||||
};
|
||||
|
@ -92,7 +93,30 @@
|
|||
''}";
|
||||
};
|
||||
};
|
||||
timers.backblaze-sync = {
|
||||
|
||||
build-hosts = {
|
||||
Unit = {
|
||||
Description = "Build nixosConfiguration for each host.";
|
||||
};
|
||||
Service = {
|
||||
ExecStart = "${pkgs.writeShellScript "build-hosts" ''
|
||||
hosts=(
|
||||
fallarbor
|
||||
lavaridge
|
||||
petalburg
|
||||
rustboro
|
||||
)
|
||||
|
||||
for h in "''${hosts[@]}"; do
|
||||
nix build github:alyraffauf/nixcfg#nixosConfigurations.$h.config.system.build.toplevel
|
||||
done
|
||||
''}";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
timers = {
|
||||
backblaze-sync = {
|
||||
Unit = {
|
||||
Description = "Daily backups to Backblaze.";
|
||||
};
|
||||
|
@ -103,6 +127,18 @@
|
|||
OnCalendar = "*-*-* 03:00:00";
|
||||
};
|
||||
};
|
||||
build-hosts = {
|
||||
Unit = {
|
||||
Description = "Build hosts daily.";
|
||||
};
|
||||
Install = {
|
||||
WantedBy = ["timers.target"];
|
||||
};
|
||||
Timer = {
|
||||
OnCalendar = "*-*-* 06:00:00";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
users.dustin = import ../../homes/dustin.nix;
|
||||
|
|
Loading…
Reference in a new issue