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
|
||||
systemd.services = {
|
||||
updater = {
|
||||
path = [
|
||||
pkgs.rebuild
|
||||
pkgs.nix
|
||||
pkgs.bash
|
||||
pkgs.git
|
||||
pkgs.gnutar
|
||||
pkgs.xz.bin
|
||||
config.nix.package.out
|
||||
];
|
||||
script = "bash /run/current-system/sw/bin/systemd-rebuild";
|
||||
startAt = "daily";
|
||||
};
|
||||
system.autoUpgrade = {
|
||||
flake = "git+https://git.lillianviolet.dev/Lillian-Violet/NixOS-Config.git";
|
||||
dates = "daily";
|
||||
enable = true;
|
||||
system.autoUpgrade.dates = "Sat *-*-1..7,15..21 01:00:00";
|
||||
};
|
||||
|
||||
# Enable networking
|
||||
|
|
|
@ -5,6 +5,5 @@ pkgs: {
|
|||
dvt = pkgs.callPackage ./dvt {};
|
||||
servo = pkgs.callPackage ./servo {};
|
||||
rebuild = pkgs.callPackage ./rebuild {};
|
||||
systemd-rebuild = pkgs.callPackage ./systemd-rebuild {};
|
||||
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