use execstart for update service

This commit is contained in:
Noa Aarts 2025-05-09 09:30:12 +02:00
parent 390cdd8fae
commit 40c48532b6
Signed by: noa
GPG key ID: 1850932741EFF672
2 changed files with 5 additions and 9 deletions

View file

@ -70,13 +70,12 @@
services."update-from-flake" = {
path = with pkgs; [
nixos-rebuild
git
];
script = ''nixos-rebuild switch --flake github:itepastra/nixconf'';
serviceConfig = {
Type = "oneshot";
Type = "exec";
User = "root";
ExecStart = "${pkgs.nixos-rebuild-ng}/bin/nixos-rebuild switch --flake github:itepastra/nixconf";
};
wants = [
"network-online.target"