ctucx.git: nixfiles

ctucx' nixfiles

commit 1e5ea074ef2a92d8448b5b2550aa606f764c8d2d
parent 4a8bb042c8bf920873943575b7de2f7e9446640a
Author: Leah (ctucx) <leah@ctu.cx>
Date: Mon, 24 Jan 2022 21:12:17 +0100

programs/syncthing: use secrets file
1 file changed, 28 insertions(+), 4 deletions(-)
M
configurations/programs/syncthing.nix
|
32
++++++++++++++++++++++++++++----
diff --git a/configurations/programs/syncthing.nix b/configurations/programs/syncthing.nix
@@ -1,12 +1,36 @@
 { config, lib, ... }:
 
 let
+  secrets = import ../../secrets;
   devices = {
-    #todo: find something to manage secrets
+    #laptops/desktops
+    coladose.id       = secrets.syncthing.ids.coladose;
+    stasicontainer.id = secrets.syncthing.ids.stasicontainer;
+    ludmilla.id       = secrets.syncthing.ids.ludmilla;
+
+    #servers
+    desastro = {
+      name = "desastro.ctu.cx";
+      id   = secrets.syncthing.ids.desastro;
+    };
+    lollo = {
+      name = "lollo.ctu.cx";
+      id   = secrets.syncthing.ids.lollo;
+    };
+    osterei = {
+      name = "osterei.ctu.cx";
+      id   = secrets.syncthing.ids.osterei;
+    };
+    taurus = {
+      name = "taurus.ctu.cx";
+      id   = secrets.syncthing.ids.taurus;
+    };
   };
 
   isaDevices = {
-    #todo: find something to manage secrets
+    isa-x390.id  = secrets.syncthing.ids.isa-x390;
+    isa-p2max.id = secrets.syncthing.ids.isa-p2max;
+    isa-mbp15.id = secrets.syncthing.ids.isa-mbp15;
   };
 
   enabledShares = {

@@ -39,8 +63,8 @@ let
     else
       false;
 
-  appendDataDirHosts = [ "desastro" "lollo" ];
-  dataDir     = "/home/leah" + (if builtins.elem config.networking.hostName appendDataDirHosts then "/syncthing" else "");
+  appendDataDirHosts = [ "desastro" "lollo" "taurus" ];
+  dataDir            = "/home/leah" + (if builtins.elem config.networking.hostName appendDataDirHosts then "/syncthing" else "");
 
 in {
   services = {