Update configuration.nix

This commit is contained in:
ska
2025-12-22 10:55:52 +00:00
parent eece3fa47c
commit 45c8f213b0

View File

@@ -2,7 +2,7 @@
{ {
############################################################ ############################################################
# BOOTLOADER GRUB (HYBRID BIOS + UEFI, REMOVABLE) test test # BOOTLOADER GRUB (HYBRID BIOS + UEFI, REMOVABLE)
############################################################ ############################################################
boot.loader.grub = { boot.loader.grub = {
@@ -41,7 +41,7 @@
}; };
############################################################ ############################################################
# FIRMWARE FULL HARDWARE SUPPORT # FIRMWARE MAXIMUM HARDWARE SUPPORT
############################################################ ############################################################
hardware.enableAllFirmware = true; hardware.enableAllFirmware = true;
@@ -149,10 +149,12 @@
programs.firefox.enable = true; programs.firefox.enable = true;
############################################################ ############################################################
# AUTOUPDATE FROM GIT # GIT AUTOUPDATE SCRIPT (RUNTIMEEXECUTED)
############################################################ ############################################################
environment.etc."update-nixos-config.sh".text = '' environment.etc."update-nixos-config.sh" = {
mode = "0700";
text = ''
#!/run/current-system/sw/bin/bash #!/run/current-system/sw/bin/bash
set -e set -e
@@ -174,13 +176,18 @@
nixos-rebuild switch nixos-rebuild switch
fi fi
''; '';
};
environment.etc."update-nixos-config.sh".mode = "0700"; ############################################################
# SYSTEMD SERVICE + TIMER (CORRECT EXECUTION)
############################################################
systemd.services.nixos-git-update = { systemd.services.nixos-git-update = {
description = "Update NixOS config from git"; description = "Update NixOS config from git";
script = "/etc/update-nixos-config.sh"; serviceConfig = {
serviceConfig.Type = "oneshot"; Type = "oneshot";
ExecStart = "/etc/update-nixos-config.sh";
};
}; };
systemd.timers.nixos-git-update = { systemd.timers.nixos-git-update = {