Compare commits
1 commit
Author | SHA1 | Date | |
---|---|---|---|
dd11a30bf3 |
1 changed files with 27 additions and 0 deletions
|
@ -7,4 +7,31 @@
|
||||||
|
|
||||||
# Enable docker.
|
# Enable docker.
|
||||||
flock.docker.enable = true;
|
flock.docker.enable = true;
|
||||||
|
|
||||||
|
# Deploy NixOS updates once a week.
|
||||||
|
systemd.timers."deploy-rs" = {
|
||||||
|
wantedBy = ["timers.target"];
|
||||||
|
timerConfig = {
|
||||||
|
OnCalendar = "weekly";
|
||||||
|
Persistent = true;
|
||||||
|
Unit = "deploy-rs.service";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.services."deploy-rs" = {
|
||||||
|
path = with pkgs; [openssh git nix deploy-rs];
|
||||||
|
script = ''
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
cd /home/fern/Repositories/flock
|
||||||
|
git pull && nix flake update
|
||||||
|
|
||||||
|
deploy && git commit -m "[ornithologist] Update flake.lock" && git push
|
||||||
|
'';
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
User = "fern";
|
||||||
|
Group = "users";
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue