autoupgrade ok ?
This commit is contained in:
parent
cb54e1d487
commit
09ba8d459c
|
@ -13,25 +13,35 @@
|
||||||
|
|
||||||
systemd.services."nix-auto-upgrade" = {
|
systemd.services."nix-auto-upgrade" = {
|
||||||
enable = true;
|
enable = true;
|
||||||
unitConfig = {
|
|
||||||
After="network-online.target";
|
description = "NixOS Upgrade";
|
||||||
Description="NixOS Upgrade";
|
|
||||||
Wants="network-online.target";
|
restartIfChanged = false;
|
||||||
# X-StopOnRemoval=false; ?
|
unitConfig.X-StopOnRemoval = false;
|
||||||
};
|
|
||||||
|
after = ["network-online.target"];
|
||||||
|
wants = ["network-online.target"];
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
User = "root";
|
User = "root";
|
||||||
WorkingDirectory = /etc/nixos/nixos-config;
|
WorkingDirectory = /etc/nixos/nixos-config;
|
||||||
|
|
||||||
# X-RestartIfChanged=false; ?
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
path = with pkgs; [
|
||||||
|
coreutils
|
||||||
|
gnutar
|
||||||
|
xz.bin
|
||||||
|
gzip
|
||||||
|
gitMinimal
|
||||||
|
# curl
|
||||||
|
];
|
||||||
|
|
||||||
script = ''
|
script = ''
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
${pkgs.nixos-rebuild}/bin/nixos-rebuild switch -L --flake git+https://gitea.com/tasiaiso/nixos-config --upgrade
|
${pkgs.nixos-rebuild}/bin/nixos-rebuild switch -L --flake git+https://gitea.com/tasiaiso/nixos-config --upgrade
|
||||||
|
|
||||||
${pkgs.curl}/bin/curl \
|
${pkgs.curl}/bin/curl \
|
||||||
-H "Title: NixOS upgrade done" \
|
-H "Title: NixOS upgrade done" \
|
||||||
-H "Priority: low" \
|
-H "Priority: low" \
|
||||||
|
|
Loading…
Reference in a new issue