diff options
author | Kjetil Orbekk <kjetil.orbekk@gmail.com> | 2017-06-12 07:25:53 -0400 |
---|---|---|
committer | Kjetil Orbekk <kjetil.orbekk@gmail.com> | 2017-06-12 07:30:01 -0400 |
commit | 68302c04165eaeea2a4188e60932d01bc7b9f351 (patch) | |
tree | ecd453377bb36c7f147ad7c312af700f9966773e /config/auto-upgrade.nix | |
parent | 288ca1c5cb1ea6d13260207245d2ca591ea57dfb (diff) |
Add auto upgrade services.
Diffstat (limited to 'config/auto-upgrade.nix')
-rw-r--r-- | config/auto-upgrade.nix | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/config/auto-upgrade.nix b/config/auto-upgrade.nix new file mode 100644 index 0000000..a034a55 --- /dev/null +++ b/config/auto-upgrade.nix @@ -0,0 +1,23 @@ +{ config, lib, pkgs, ... }: +{ + systemd.services = { + nixos-config-pull = { + description = "Pull nixos config from git."; + path = [ pkgs.git ]; + wantedBy = [ "nixos-upgrade.service" ]; + before = [ "nixos-upgrade.service" ]; + serviceConfig = { + Type = "oneshot"; + User = "orbekk"; + }; + script = '' + cd /opt/site/nixos-config + git pull + ''; + }; + }; + + system.autoUpgrade = { + enable = true; + }; +} |