summaryrefslogtreecommitdiffstats
path: root/system/services/nix
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--system/services/nix-sync/default.nix7
-rw-r--r--system/services/nix/default.nix4
2 files changed, 8 insertions, 3 deletions
diff --git a/system/services/nix-sync/default.nix b/system/services/nix-sync/default.nix
index 44348c0..8c466b8 100644
--- a/system/services/nix-sync/default.nix
+++ b/system/services/nix-sync/default.nix
@@ -10,7 +10,7 @@
description = "Nix sync ${name} timer";
wantedBy = ["timers.target"];
timerConfig = {
- OnActiveSec = repo.interval;
+ OnUnitActiveSec = repo.interval;
};
after = ["network-online.target"];
};
@@ -37,7 +37,7 @@
branch="$(git rev-parse @)";
if ! [ "$origin" = "$branch" ]; then
- git pull;
+ git pull --rebase;
out_paths=$(mktemp);
nix build . --print-out-paths --experimental-features 'nix-command flakes' > "$out_paths";
@@ -66,7 +66,7 @@
if ! [ -L ${esa repo.path} ]; then
cd ${esa repoCachePath};
- git pull;
+ git pull --rebase;
out_paths=$(mktemp);
nix build . --print-out-paths --experimental-features 'nix-command flakes' > "$out_paths";
@@ -88,6 +88,7 @@
preStart = execStartPreScript;
serviceConfig = {
+ TimeoutSec = 0;
ExecStart = execStartScript;
Restart = "on-abort";
# User and group
diff --git a/system/services/nix/default.nix b/system/services/nix/default.nix
index bd562ec..ec5fe5d 100644
--- a/system/services/nix/default.nix
+++ b/system/services/nix/default.nix
@@ -13,6 +13,10 @@
settings = {
auto-optimise-store = true;
experimental-features = ["nix-command" "flakes"];
+ trusted-users = [
+ "root"
+ "@wheel"
+ ];
};
};
}