From a42225a0239dd4e8cfa931988f46b6403d489780 Mon Sep 17 00:00:00 2001 From: KoenDR06 Date: Wed, 19 Nov 2025 21:01:19 +0100 Subject: [PATCH 01/10] flake update --- flake.lock | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/flake.lock b/flake.lock index f81e1d7..10acabe 100644 --- a/flake.lock +++ b/flake.lock @@ -10,11 +10,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1761656077, - "narHash": "sha256-lsNWuj4Z+pE7s0bd2OKicOFq9bK86JE0ZGeKJbNqb94=", + "lastModified": 1762618334, + "narHash": "sha256-wyT7Pl6tMFbFrs8Lk/TlEs81N6L+VSybPfiIgzU8lbQ=", "owner": "ryantm", "repo": "agenix", - "rev": "9ba0d85de3eaa7afeab493fed622008b6e4924f5", + "rev": "fcdea223397448d35d9b31f798479227e80183f6", "type": "github" }, "original": { @@ -89,11 +89,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1762233356, - "narHash": "sha256-cGS3lLTYusbEP/IJIWGgnkzIl+FA5xDvtiHyjalGr4k=", + "lastModified": 1763334038, + "narHash": "sha256-LBVOyaH6NFzQ3X/c6vfMZ9k4SV2ofhpxeL9YnhHNJQQ=", "owner": "nixos", "repo": "nixpkgs", - "rev": "ca534a76c4afb2bdc07b681dbc11b453bab21af8", + "rev": "4c8cdd5b1a630e8f72c9dd9bf582b1afb3127d2c", "type": "github" }, "original": { @@ -113,11 +113,11 @@ ] }, "locked": { - "lastModified": 1762274591, - "narHash": "sha256-Vbhluvk15qwiyNDyPd9tjJh9gxIfUjbKVT79c05Pd3I=", + "lastModified": 1762784320, + "narHash": "sha256-odsk96Erywk5hs0dhArF38zb7Oe0q6LZ70gXbxAPKno=", "owner": "pjones", "repo": "plasma-manager", - "rev": "6296d7100cc84b2ff732b7c103a50c2856974cf6", + "rev": "7911a0f8a44c7e8b29d031be3149ee8943144321", "type": "github" }, "original": { From 22fb3d09f3f57d0ec503421a56dd62dbd2569b76 Mon Sep 17 00:00:00 2001 From: KoenDR06 Date: Wed, 19 Nov 2025 21:02:16 +0100 Subject: [PATCH 02/10] changes idk --- machines/terra/hardware-configuration.nix | 5 +++++ modules/network/syncthing.nix | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/machines/terra/hardware-configuration.nix b/machines/terra/hardware-configuration.nix index f06e944..049b792 100644 --- a/machines/terra/hardware-configuration.nix +++ b/machines/terra/hardware-configuration.nix @@ -22,6 +22,11 @@ fsType = "ext4"; }; + fileSystems."/mnt/bulk" = { + device = "/dev/disk/by-uuid/b43f0ba4-c628-4f1a-8523-c6b970325330"; + fsType = "ext4"; + }; + fileSystems."/boot" = { device = "/dev/disk/by-uuid/6AB6-63FD"; fsType = "vfat"; diff --git a/modules/network/syncthing.nix b/modules/network/syncthing.nix index 361688f..2e58f1f 100644 --- a/modules/network/syncthing.nix +++ b/modules/network/syncthing.nix @@ -51,12 +51,12 @@ in { "Documents" = { id = "documentFolder"; path = "/home/${username}/Documents"; - devices = ["luna" "artemis" "terra" "solis"]; + devices = ["artemis" "terra" "solis"]; }; "Programming" = { id = "programmingFolder"; path = "/home/${username}/Programming"; - devices = ["luna" "artemis" "terra" "solis"]; + devices = ["artemis" "terra" "solis"]; # TODO 25.11 add ignore }; }; From 81c5ee977815b500e7188140ede1a08ab2a25177 Mon Sep 17 00:00:00 2001 From: KoenDR06 Date: Wed, 19 Nov 2025 21:55:01 +0100 Subject: [PATCH 03/10] add flake updating timer --- machines/solis/modules.nix | 1 + modules/timers/default.nix | 1 + modules/timers/flakeUpdate.nix | 39 ++++++++++++++++++++++++++++++++++ 3 files changed, 41 insertions(+) create mode 100644 modules/timers/flakeUpdate.nix diff --git a/machines/solis/modules.nix b/machines/solis/modules.nix index 0c9e32e..8e84ee7 100644 --- a/machines/solis/modules.nix +++ b/machines/solis/modules.nix @@ -33,6 +33,7 @@ timers = { backup.enable = true; rooms.enable = true; + flakeUpdate.enable = true; }; }; } diff --git a/modules/timers/default.nix b/modules/timers/default.nix index 330ca6a..05da776 100644 --- a/modules/timers/default.nix +++ b/modules/timers/default.nix @@ -3,5 +3,6 @@ ./wol.nix ./backup.nix ./rooms.nix + ./flakeUpdate.nix ]; } diff --git a/modules/timers/flakeUpdate.nix b/modules/timers/flakeUpdate.nix new file mode 100644 index 0000000..1bca345 --- /dev/null +++ b/modules/timers/flakeUpdate.nix @@ -0,0 +1,39 @@ +{ + lib, + config, + ... +}: let + inherit (lib) mkEnableOption mkIf; + cfg = config.horseman.timers.flakeUpdate; +in { + options = { + horseman.timers.flakeUpdate = { + enable = mkEnableOption "Updates flake.nix weekly"; + }; + }; + + config = mkIf cfg.enable { + systemd.timers."flake-update" = { + wantedBy = ["timers.target"]; + timerConfig = { + OnCalendar = "weekly"; + Persistent = true; + }; + }; + + systemd.services."flake-update" = { + script = '' + cd /home/horseman/nix-config + git pull + nix flake update + rebuild .#${config.networking.hostName} + git commit flake.lock -m "Update flake" + git push + ''; + serviceConfig = { + Type = "oneshot"; + User = "root"; + }; + }; + }; +} From 748190e350bd155dd4ba0fb4fb0264a0c32ba127 Mon Sep 17 00:00:00 2001 From: KoenDR06 Date: Wed, 19 Nov 2025 22:02:35 +0100 Subject: [PATCH 04/10] update flake itme --- modules/timers/flakeUpdate.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/modules/timers/flakeUpdate.nix b/modules/timers/flakeUpdate.nix index 1bca345..361f341 100644 --- a/modules/timers/flakeUpdate.nix +++ b/modules/timers/flakeUpdate.nix @@ -1,6 +1,7 @@ { lib, config, + pkgs, ... }: let inherit (lib) mkEnableOption mkIf; @@ -21,14 +22,16 @@ in { }; }; - systemd.services."flake-update" = { + systemd.services."flake-update" = let + git = "${pkgs.git}/bin/git"; + in { script = '' cd /home/horseman/nix-config - git pull + ${git} pull nix flake update rebuild .#${config.networking.hostName} - git commit flake.lock -m "Update flake" - git push + ${git} commit flake.lock -m "Update flake" + ${git} push ''; serviceConfig = { Type = "oneshot"; From 040975ba2834962b1276e99d8c091edb533afd9f Mon Sep 17 00:00:00 2001 From: KoenDR06 Date: Wed, 19 Nov 2025 22:06:36 +0100 Subject: [PATCH 05/10] attempt 3 --- modules/timers/flakeUpdate.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/timers/flakeUpdate.nix b/modules/timers/flakeUpdate.nix index 361f341..3fee851 100644 --- a/modules/timers/flakeUpdate.nix +++ b/modules/timers/flakeUpdate.nix @@ -35,7 +35,7 @@ in { ''; serviceConfig = { Type = "oneshot"; - User = "root"; + User = "horseman"; }; }; }; From 46da0f1495d713a4997d3cc13368102ebf336d35 Mon Sep 17 00:00:00 2001 From: KoenDR06 Date: Wed, 19 Nov 2025 22:10:08 +0100 Subject: [PATCH 06/10] attempt 4 --- modules/timers/flakeUpdate.nix | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/modules/timers/flakeUpdate.nix b/modules/timers/flakeUpdate.nix index 3fee851..f7bda08 100644 --- a/modules/timers/flakeUpdate.nix +++ b/modules/timers/flakeUpdate.nix @@ -22,16 +22,15 @@ in { }; }; - systemd.services."flake-update" = let - git = "${pkgs.git}/bin/git"; - in { + systemd.services."flake-update" = { script = '' + #!/run/current-system/sw/bin/zsh cd /home/horseman/nix-config - ${git} pull - nix flake update + git pull + sudo nix flake update rebuild .#${config.networking.hostName} - ${git} commit flake.lock -m "Update flake" - ${git} push + git commit flake.lock -m "Update flake" + git push ''; serviceConfig = { Type = "oneshot"; From 62579dd9ed8fcb894c4a43b73c0585d2bad30237 Mon Sep 17 00:00:00 2001 From: KoenDR06 Date: Wed, 19 Nov 2025 22:10:23 +0100 Subject: [PATCH 07/10] attempt 4.1 --- modules/timers/flakeUpdate.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/timers/flakeUpdate.nix b/modules/timers/flakeUpdate.nix index f7bda08..e9eb1ae 100644 --- a/modules/timers/flakeUpdate.nix +++ b/modules/timers/flakeUpdate.nix @@ -34,7 +34,7 @@ in { ''; serviceConfig = { Type = "oneshot"; - User = "horseman"; + User = "root"; }; }; }; From e89849887ac0098bb6de01e32f3e0728dd1e61ff Mon Sep 17 00:00:00 2001 From: KoenDR06 Date: Wed, 19 Nov 2025 22:12:01 +0100 Subject: [PATCH 08/10] attempt 5 --- modules/timers/flakeUpdate.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/timers/flakeUpdate.nix b/modules/timers/flakeUpdate.nix index e9eb1ae..ff8aee7 100644 --- a/modules/timers/flakeUpdate.nix +++ b/modules/timers/flakeUpdate.nix @@ -22,15 +22,17 @@ in { }; }; - systemd.services."flake-update" = { + systemd.services."flake-update" = let + git = "${pkgs.git}/bin/git"; + in { script = '' #!/run/current-system/sw/bin/zsh cd /home/horseman/nix-config - git pull + ${git} pull sudo nix flake update rebuild .#${config.networking.hostName} - git commit flake.lock -m "Update flake" - git push + ${git} commit flake.lock -m "Update flake" + ${git} push ''; serviceConfig = { Type = "oneshot"; From a7ac419f7fdbb29bb8cd2070a7870b41cf3ddef1 Mon Sep 17 00:00:00 2001 From: KoenDR06 Date: Wed, 19 Nov 2025 22:15:05 +0100 Subject: [PATCH 09/10] attempt 6 --- modules/timers/flakeUpdate.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/timers/flakeUpdate.nix b/modules/timers/flakeUpdate.nix index ff8aee7..3131648 100644 --- a/modules/timers/flakeUpdate.nix +++ b/modules/timers/flakeUpdate.nix @@ -23,7 +23,7 @@ in { }; systemd.services."flake-update" = let - git = "${pkgs.git}/bin/git"; + git = "sudo -u horseman ${pkgs.git}/bin/git"; in { script = '' #!/run/current-system/sw/bin/zsh From a554de20710ac2145079d50b634e72b1377190e8 Mon Sep 17 00:00:00 2001 From: KoenDR06 Date: Wed, 19 Nov 2025 22:17:15 +0100 Subject: [PATCH 10/10] remove timer --- machines/solis/modules.nix | 1 - modules/timers/default.nix | 1 - modules/timers/flakeUpdate.nix | 43 ---------------------------------- 3 files changed, 45 deletions(-) delete mode 100644 modules/timers/flakeUpdate.nix diff --git a/machines/solis/modules.nix b/machines/solis/modules.nix index 8e84ee7..0c9e32e 100644 --- a/machines/solis/modules.nix +++ b/machines/solis/modules.nix @@ -33,7 +33,6 @@ timers = { backup.enable = true; rooms.enable = true; - flakeUpdate.enable = true; }; }; } diff --git a/modules/timers/default.nix b/modules/timers/default.nix index 05da776..330ca6a 100644 --- a/modules/timers/default.nix +++ b/modules/timers/default.nix @@ -3,6 +3,5 @@ ./wol.nix ./backup.nix ./rooms.nix - ./flakeUpdate.nix ]; } diff --git a/modules/timers/flakeUpdate.nix b/modules/timers/flakeUpdate.nix deleted file mode 100644 index 3131648..0000000 --- a/modules/timers/flakeUpdate.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ - lib, - config, - pkgs, - ... -}: let - inherit (lib) mkEnableOption mkIf; - cfg = config.horseman.timers.flakeUpdate; -in { - options = { - horseman.timers.flakeUpdate = { - enable = mkEnableOption "Updates flake.nix weekly"; - }; - }; - - config = mkIf cfg.enable { - systemd.timers."flake-update" = { - wantedBy = ["timers.target"]; - timerConfig = { - OnCalendar = "weekly"; - Persistent = true; - }; - }; - - systemd.services."flake-update" = let - git = "sudo -u horseman ${pkgs.git}/bin/git"; - in { - script = '' - #!/run/current-system/sw/bin/zsh - cd /home/horseman/nix-config - ${git} pull - sudo nix flake update - rebuild .#${config.networking.hostName} - ${git} commit flake.lock -m "Update flake" - ${git} push - ''; - serviceConfig = { - Type = "oneshot"; - User = "root"; - }; - }; - }; -}