diff --git a/machine/backyard/default.nix b/machine/backyard/default.nix index 45e7c24..1326d9a 100644 --- a/machine/backyard/default.nix +++ b/machine/backyard/default.nix @@ -12,6 +12,7 @@ }; beatific.hostName = "backyard"; + beatific.defaults.tvbSync = false; # Enable networking networking.networkmanager.enable = true; diff --git a/machine/catacomb/default.nix b/machine/catacomb/default.nix index 073910a..2db1295 100644 --- a/machine/catacomb/default.nix +++ b/machine/catacomb/default.nix @@ -7,6 +7,7 @@ ]; beatific.hostName = "catacomb"; + beatific.defaults.tvbSync = false; boot = { loader = { diff --git a/machine/empyrean/default.nix b/machine/empyrean/default.nix index 070547c..7260cfb 100644 --- a/machine/empyrean/default.nix +++ b/machine/empyrean/default.nix @@ -15,6 +15,7 @@ beatific.hostName = "empyrean"; beatific.isLighthouse = true; + beatific.defaults.tvbSync = false; # Use the GRUB 2 boot loader. boot.loader.grub = { diff --git a/machine/imperium/default.nix b/machine/imperium/default.nix index ca2bf61..f12f02a 100644 --- a/machine/imperium/default.nix +++ b/machine/imperium/default.nix @@ -62,17 +62,6 @@ enable = false; }; - # tvb monopolizes the system syncthing for now. User services are harder to get working - # and nobody else uses imperium right now. In the future, rewriting the syncthing module - # to allow multiple instances is probably the right move. - services.syncthing = { - enable = true; - dataDir = "/home/tvb"; - openDefaultPorts = true; - user = "tvb"; - group = "tvb"; - }; - # This value governs how some stateful data, like databases, are handled # across different versions of NixOS. This should not be changed to a new # release unless the sysadmin has determined that no services would be diff --git a/machine/stagirite/default.nix b/machine/stagirite/default.nix index 26bff85..639596e 100644 --- a/machine/stagirite/default.nix +++ b/machine/stagirite/default.nix @@ -19,6 +19,7 @@ in #system.stateVersion = "21.11"; networking.hostName = "stagirite"; + beatific.defaults.tvbSync = false; fileSystems.winssh = { device = "C:/Users/tvb/.ssh"; diff --git a/machine/unfolder/default.nix b/machine/unfolder/default.nix index 037f9fe..64779e7 100644 --- a/machine/unfolder/default.nix +++ b/machine/unfolder/default.nix @@ -7,6 +7,7 @@ ]; beatific.hostName = "unfolder"; + beatific.defaults.tvbSync = false; # Bootloader. boot.loader.grub = { diff --git a/modules/beatific.nix b/modules/beatific.nix index eb9c248..45e6fe7 100644 --- a/modules/beatific.nix +++ b/modules/beatific.nix @@ -36,6 +36,7 @@ in { ssh = mkFlag "Default sshd settings"; nebula = mkFlag "Default beatific nebula settings"; tvb = mkFlag "Default tvb account"; + tvbSync = mkFlag "Configure system syncthing for tvb"; hosts = mkFlag "Default 10.22.20.* DNS host entries"; }; }; @@ -163,6 +164,20 @@ in { }; }) + (mkIf cfg.defaults.tvbSync { + # I haven't gotten user services to work correctly yet, + # so for now, tvb monopolizes the system syncthing instance. + # Adding users in the future should probably involve multiple + # system services so as not to require login to sync. + services.syncthing = { + enable = true; + dataDir = "/home/tvb"; + openDefaultPorts = true; + user = "tvb"; + group = "tvb"; + }; + }) + (mkIf cfg.defaults.hosts { # Create *.home host entries for all the beatific members networking.hosts = {