Testing git auto-rebuild for cluster

This commit is contained in:
2025-12-07 19:45:59 -08:00
parent 0d65e64e34
commit 8c4de5f015
2 changed files with 16 additions and 0 deletions

View File

@@ -8,6 +8,7 @@
# System Configuration # System Configuration
../system/cpu-amd.nix ../system/cpu-amd.nix
../system/fonts.nix ../system/fonts.nix
../system/git-auto-rebuild.nix
../system/gpu-amd.nix ../system/gpu-amd.nix
../system/home-manager-settings.nix ../system/home-manager-settings.nix
../system/internationalization.nix ../system/internationalization.nix

View File

@@ -0,0 +1,15 @@
{ config, pkgs, ... }:
{
systemd.services.git-auto-rebuild = {
# enable = true;
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
description = "Rebuilds the git repo at /etc/nixos if there are changes in the currently checked out branch";
# startAt = "*:0/1";
serviceConfig = {
Type = "simple";
ExecStart = "/run/current-system/sw/bin/bash -c '/etc/nixos && sudo nixos-rebuild switch --flake #${networking.hostname}'";
};
};
}