summaryrefslogtreecommitdiff
path: root/modules/auto-update.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/auto-update.nix')
-rw-r--r--modules/auto-update.nix26
1 files changed, 0 insertions, 26 deletions
diff --git a/modules/auto-update.nix b/modules/auto-update.nix
deleted file mode 100644
index b370390..0000000
--- a/modules/auto-update.nix
+++ /dev/null
@@ -1,26 +0,0 @@
-{ pkgs, ... }:
-
-{
- system.autoUpgrade = {
- enable = true;
- dates = "minutely";
- allowReboot = true;
- upgrade = false;
- };
-
- systemd.services.nixos-upgrade = {
- path = [ pkgs.git ];
- serviceConfig = {
- WorkingDirectory = "/etc/nixos";
- StateDirectory = "nixos-repo-update";
- ExecCondition = pkgs.writeShellScript "check-nixos-repo" ''
- set -euo pipefail
- git fetch || exit 255
- test "$(cat "$STATE_DIRECTORY/applied" 2>/dev/null || true)" != "$(git rev-parse '@{upstream}')"
- '';
- };
-
- preStart = "git pull --ff-only";
- postStart = ''git rev-parse HEAD > "$STATE_DIRECTORY/applied"'';
- };
-}