mirror of
https://github.com/caperren/nixos-configs.git
synced 2025-12-30 19:14:19 +00:00
Testing git auto-rebuild for cluster
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
# System Configuration
|
||||
../system/cpu-amd.nix
|
||||
../system/fonts.nix
|
||||
../system/git-auto-rebuild.nix
|
||||
../system/gpu-amd.nix
|
||||
../system/home-manager-settings.nix
|
||||
../system/internationalization.nix
|
||||
|
||||
15
modules/system/git-auto-rebuild.nix
Normal file
15
modules/system/git-auto-rebuild.nix
Normal 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}'";
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user