1
1
Fork 0

beatific: refactor tvb-syncthing to module

This commit is contained in:
Tim Van Baak 2023-12-23 13:01:26 -08:00
parent e381001f0a
commit 6b5dcb6e1d
7 changed files with 20 additions and 11 deletions

View File

@ -12,6 +12,7 @@
};
beatific.hostName = "backyard";
beatific.defaults.tvbSync = false;
# Enable networking
networking.networkmanager.enable = true;

View File

@ -7,6 +7,7 @@
];
beatific.hostName = "catacomb";
beatific.defaults.tvbSync = false;
boot = {
loader = {

View File

@ -15,6 +15,7 @@
beatific.hostName = "empyrean";
beatific.isLighthouse = true;
beatific.defaults.tvbSync = false;
# Use the GRUB 2 boot loader.
boot.loader.grub = {

View File

@ -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

View File

@ -19,6 +19,7 @@ in
#system.stateVersion = "21.11";
networking.hostName = "stagirite";
beatific.defaults.tvbSync = false;
fileSystems.winssh = {
device = "C:/Users/tvb/.ssh";

View File

@ -7,6 +7,7 @@
];
beatific.hostName = "unfolder";
beatific.defaults.tvbSync = false;
# Bootloader.
boot.loader.grub = {

View File

@ -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 = {