mirror of
https://github.com/RichieCahill/dotfiles.git
synced 2026-04-17 13:08:19 -04:00
fixed update.nix
This commit is contained in:
@@ -1,11 +1,24 @@
|
|||||||
{ lib, ... }:
|
{ lib, pkgs, ... }:
|
||||||
{
|
{
|
||||||
services.autopull = {
|
systemd = {
|
||||||
enable = lib.mkDefault true;
|
services."autopull@dotfiles" = {
|
||||||
repo.dotfiles = {
|
requires = [ "multi-user.target" ];
|
||||||
enable = lib.mkDefault true;
|
after = [ "multi-user.target" ];
|
||||||
ssh-key = lib.mkDefault "/root/.ssh/id_ed25519_ghdeploy";
|
description = "Pull the latest data for dotfiles";
|
||||||
path = lib.mkDefault /root/dotfiles;
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
User = "root";
|
||||||
|
WorkingDirectory = /root/dotfiles;
|
||||||
|
ExecStart = "${pkgs.git}/bin/git pull --all --prune";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
timers."autopull@dotfiles" = {
|
||||||
|
wantedBy = [ "timers.target" ];
|
||||||
|
timerConfig = {
|
||||||
|
OnBootSec = "1h";
|
||||||
|
OnUnitActiveSec = "1h";
|
||||||
|
Unit = "autopull@dotfiles.service";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user