Compare commits
No commits in common. "23d05a3e5d5aa04f0066da35549578c08e72faaa" and "343ce806613e75433a9f3858e74858185ee9dfc6" have entirely different histories.
23d05a3e5d
...
343ce80661
@ -112,7 +112,6 @@
|
|||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
inherit (pkgs)
|
inherit (pkgs)
|
||||||
clerie-system-upgrade
|
|
||||||
chromium-incognito
|
chromium-incognito
|
||||||
iot-data
|
iot-data
|
||||||
nix-remove-result-links
|
nix-remove-result-links
|
||||||
@ -120,6 +119,7 @@
|
|||||||
nixfiles-auto-install
|
nixfiles-auto-install
|
||||||
nixfiles-generate-backup-secrets
|
nixfiles-generate-backup-secrets
|
||||||
nixfiles-generate-config
|
nixfiles-generate-config
|
||||||
|
nixfiles-system-upgrade
|
||||||
nixfiles-updated-inputs
|
nixfiles-updated-inputs
|
||||||
nixfiles-update-ssh-host-keys
|
nixfiles-update-ssh-host-keys
|
||||||
update-from-hydra
|
update-from-hydra
|
||||||
|
@ -35,7 +35,7 @@ in
|
|||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
ExecStart = pkgs.clerie-system-upgrade + "/bin/clerie-system-upgrade --no-confirm${optionalString cfg.allowReboot " --allow-reboot"}${optionalString (config.clerie.monitoring.enable) " --node-exporter-metrics-path /var/lib/prometheus-node-exporter/textfiles/clerie-system-upgrade.prom"}";
|
ExecStart = pkgs.nixfiles-system-upgrade + "/bin/nixfiles-system-upgrade --no-confirm${optionalString cfg.allowReboot " --allow-reboot"}${optionalString (config.clerie.monitoring.enable) " --node-exporter-metrics-path /var/lib/prometheus-node-exporter/textfiles/nixfiles-system-upgrade.prom"}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
systemd.timers.clerie-system-auto-upgrade = mkIf cfg.autoUpgrade {
|
systemd.timers.clerie-system-auto-upgrade = mkIf cfg.autoUpgrade {
|
||||||
@ -47,7 +47,7 @@ in
|
|||||||
after = [ "network-online.target" ];
|
after = [ "network-online.target" ];
|
||||||
};
|
};
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
clerie-system-upgrade
|
nixfiles-system-upgrade
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
pkgs.writeShellApplication {
|
pkgs.writeShellApplication {
|
||||||
name = "clerie-system-upgrade";
|
name = "nixfiles-system-upgrade";
|
||||||
text = builtins.readFile ./clerie-system-upgrade.sh;
|
text = builtins.readFile ./nixfiles-system-upgrade.sh;
|
||||||
runtimeInputs = with pkgs; [
|
runtimeInputs = with pkgs; [
|
||||||
curl
|
curl
|
||||||
jq
|
jq
|
@ -55,7 +55,7 @@ echo "Set as boot target"
|
|||||||
|
|
||||||
if [[ -n "$NODE_EXPORTER_METRICS_PATH" ]]; then
|
if [[ -n "$NODE_EXPORTER_METRICS_PATH" ]]; then
|
||||||
echo "Write monitoring check data"
|
echo "Write monitoring check data"
|
||||||
echo "clerie_system_upgrade_last_check $(date +%s)" > "$NODE_EXPORTER_METRICS_PATH"
|
echo "nixfiles_system_upgrade_last_check $(date +%s)" > "$NODE_EXPORTER_METRICS_PATH"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
BOOTED_SYSTEM_KERNEL="$(readlink /run/booted-system/{initrd,kernel,kernel-modules})"
|
BOOTED_SYSTEM_KERNEL="$(readlink /run/booted-system/{initrd,kernel,kernel-modules})"
|
@ -3,7 +3,7 @@
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
xgit() {
|
xgit() {
|
||||||
git -c "user.name=Flake Update Bot" -c "user.email=flake-update-bot@clerie.de" -c "core.pager=cat" "$@"
|
git -c "user.name=Flake Update Bot" -c "user.email=flake-update-bot@clerie.de" "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
NOW="$(date --utc +%Y-%m-%d-%H-%M)"
|
NOW="$(date --utc +%Y-%m-%d-%H-%M)"
|
||||||
@ -25,19 +25,8 @@ nix flake lock --update-input nixpkgs
|
|||||||
|
|
||||||
echo "[!] Commit changes"
|
echo "[!] Commit changes"
|
||||||
xgit add flake.lock
|
xgit add flake.lock
|
||||||
|
|
||||||
xgit commit -m "Update nixpkgs ${NOW}" || true
|
xgit commit -m "Update nixpkgs ${NOW}" || true
|
||||||
|
|
||||||
xgit diff --name-status origin/updated-inputs "${UPDATE_BRANCH}"
|
|
||||||
|
|
||||||
echo "[!] biep"
|
|
||||||
if xgit diff --quiet origin/updated-inputs "${UPDATE_BRANCH}"
|
|
||||||
then
|
|
||||||
echo "[!] Nothing changed, removing branch"
|
|
||||||
xgit branch -D "${UPDATE_BRANCH}"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "[!] Publish ${UPDATE_BRANCH}"
|
echo "[!] Publish ${UPDATE_BRANCH}"
|
||||||
xgit push --set-upstream origin "${UPDATE_BRANCH}"
|
xgit push --set-upstream origin "${UPDATE_BRANCH}"
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
final: prev: {
|
final: prev: {
|
||||||
clerie-system-upgrade = final.callPackage ./clerie-system-upgrade/clerie-system-upgrade.nix {};
|
|
||||||
chromium-incognito = final.callPackage ./chromium-incognito {};
|
chromium-incognito = final.callPackage ./chromium-incognito {};
|
||||||
iot-data = final.python3.pkgs.callPackage ./iot-data {};
|
iot-data = final.python3.pkgs.callPackage ./iot-data {};
|
||||||
nix-remove-result-links = final.callPackage ./nix-remove-result-links {};
|
nix-remove-result-links = final.callPackage ./nix-remove-result-links {};
|
||||||
@ -7,6 +6,7 @@ final: prev: {
|
|||||||
nixfiles-auto-install = final.callPackage ./nixfiles/nixfiles-auto-install.nix {};
|
nixfiles-auto-install = final.callPackage ./nixfiles/nixfiles-auto-install.nix {};
|
||||||
nixfiles-generate-backup-secrets = final.callPackage ./nixfiles/nixfiles-generate-backup-secrets.nix {};
|
nixfiles-generate-backup-secrets = final.callPackage ./nixfiles/nixfiles-generate-backup-secrets.nix {};
|
||||||
nixfiles-generate-config = final.callPackage ./nixfiles/nixfiles-generate-config.nix {};
|
nixfiles-generate-config = final.callPackage ./nixfiles/nixfiles-generate-config.nix {};
|
||||||
|
nixfiles-system-upgrade = final.callPackage ./nixfiles/nixfiles-system-upgrade.nix {};
|
||||||
nixfiles-updated-inputs = final.callPackage ./nixfiles/nixfiles-updated-inputs.nix {};
|
nixfiles-updated-inputs = final.callPackage ./nixfiles/nixfiles-updated-inputs.nix {};
|
||||||
nixfiles-update-ssh-host-keys = final.callPackage ./nixfiles/nixfiles-update-ssh-host-keys.nix {};
|
nixfiles-update-ssh-host-keys = final.callPackage ./nixfiles/nixfiles-update-ssh-host-keys.nix {};
|
||||||
update-from-hydra = final.callPackage ./update-from-hydra {};
|
update-from-hydra = final.callPackage ./update-from-hydra {};
|
||||||
|
Loading…
Reference in New Issue
Block a user