Let's use the standard auto-update instead
This commit is contained in:
parent
1878f7b449
commit
3bfa44bdea
|
@ -98,20 +98,11 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
# Create an auto-update systemd service that runs every day
|
# Create an auto-update systemd service that runs every day
|
||||||
systemd.services = {
|
system.autoUpgrade = {
|
||||||
updater = {
|
flake = "git+https://git.lillianviolet.dev/Lillian-Violet/NixOS-Config.git";
|
||||||
path = [
|
dates = "daily";
|
||||||
pkgs.rebuild
|
enable = true;
|
||||||
pkgs.nix
|
system.autoUpgrade.dates = "Sat *-*-1..7,15..21 01:00:00";
|
||||||
pkgs.bash
|
|
||||||
pkgs.git
|
|
||||||
pkgs.gnutar
|
|
||||||
pkgs.xz.bin
|
|
||||||
config.nix.package.out
|
|
||||||
];
|
|
||||||
script = "bash /run/current-system/sw/bin/systemd-rebuild";
|
|
||||||
startAt = "daily";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Enable networking
|
# Enable networking
|
||||||
|
|
|
@ -5,6 +5,5 @@ pkgs: {
|
||||||
dvt = pkgs.callPackage ./dvt {};
|
dvt = pkgs.callPackage ./dvt {};
|
||||||
servo = pkgs.callPackage ./servo {};
|
servo = pkgs.callPackage ./servo {};
|
||||||
rebuild = pkgs.callPackage ./rebuild {};
|
rebuild = pkgs.callPackage ./rebuild {};
|
||||||
systemd-rebuild = pkgs.callPackage ./systemd-rebuild {};
|
|
||||||
install-nix = pkgs.callPackage ./install-nix {};
|
install-nix = pkgs.callPackage ./install-nix {};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,22 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
stdenv,
|
|
||||||
writeShellApplication,
|
|
||||||
}:
|
|
||||||
writeShellApplication
|
|
||||||
{
|
|
||||||
name = "systemd-rebuild";
|
|
||||||
|
|
||||||
runtimeInputs = [];
|
|
||||||
|
|
||||||
text = ''
|
|
||||||
# A rebuild script for NixOS for use of the systemd service
|
|
||||||
systemd-inhibit rm -rf /tmp/rebuild
|
|
||||||
systemd-inhibit git clone https://git.lillianviolet.dev/Lillian-Violet/NixOS-Config.git /tmp/rebuild
|
|
||||||
systemd-inhibit echo "NixOS Rebuilding..."
|
|
||||||
systemd-inhibit nixos-rebuild switch --flake /tmp/rebuild/#
|
|
||||||
systemd-inhibit echo "Cleaning up repository in '/tmp/rebuild'..."
|
|
||||||
systemd-inhibit rm -rf /tmp/rebuild
|
|
||||||
systemd-inhibit echo "NixOS Rebuilt OK!"
|
|
||||||
'';
|
|
||||||
}
|
|
Loading…
Reference in a new issue