Commits: 3
Setup automatic NixOS configuration synchronization
All BiebOS laptops will automatically switch to whatever configuration is in the remote repository.
For now I set the schedule on every quarter so I can test if and how it works. Eventually we want to only run it daily.
new file mode 100644
index 0000000..3a010d5
--- /dev/null
+++ b/config-sync.nix
@@ -0,0 +1,17 @@
+# This module enables periodic synchronization of the configuration.
+#
+# Once in a while, each laptop will switch to the configuration from the remote
+# repository, so when we change it, we don't have to manually switch them.
+
+{ config, pkgs, ... }:
+
+{
+ system.autoUpgrade = {
+ enable = true;
+ flake = "git+https://codeberg.org/foss-for-normies/biebos";
+ dates = "*:0/15"; # Every quarter - just for testing. Comment out this line to switch to a daily schedule.
+ runGarbageCollection = true;
+ };
+
+ nix.gc.options = "--delete-older-than 14d";
+}index 3a0fc7d..dcf358d 100644
--- a/flake.nix
+++ b/flake.nix
@@ -16,6 +16,7 @@
= ./configuration.nix
= ./guest-session.nix
= ./flatpak.nix
+ ./config-sync.nix
= ];
= };
= };Add Emacs
Mostly to check if config-sync works, but also because I want it. x
index b23ae0e..5d6f014 100644
--- a/configuration.nix
+++ b/configuration.nix
@@ -116,6 +116,7 @@
= bat
= httpie
= jq
+ emacs
= ];
=
= # Some programs need SUID wrappers, can be configured further or areSwitch config synchronization to a daily schedule
It seems to be working fine on all laptops, including the garbage collection and wiping of profile history.
index 3a010d5..d10eee6 100644
--- a/config-sync.nix
+++ b/config-sync.nix
@@ -9,7 +9,7 @@
= system.autoUpgrade = {
= enable = true;
= flake = "git+https://codeberg.org/foss-for-normies/biebos";
- dates = "*:0/15"; # Every quarter - just for testing. Comment out this line to switch to a daily schedule.
+ # dates = "*:0/5"; # Every 5 minutes. Useful for testing. Comment out this line to switch to a daily schedule.
= runGarbageCollection = true;
= };
=