summaryrefslogtreecommitdiffstats
path: root/system/services/nix
diff options
context:
space:
mode:
authorsils <sils@sils.li>2023-10-14 15:28:05 +0200
committersils <sils@sils.li>2023-10-14 15:28:05 +0200
commit04e4866a17853d583c943b52ec2b9c5e7518e4ae (patch)
treebd079002dbebd4fffc533596c3f4e5a99a6b3a56 /system/services/nix
parentFix(system/services/etebase): Add proxy parameters (diff)
parentfix(system/services/mastodon): Correctly avoid string casts (diff)
downloadnixos-server-04e4866a17853d583c943b52ec2b9c5e7518e4ae.zip
Merge branch 'main' into etebase
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"
+ ];
};
};
}