Commit 3ca4d24e7b6d

Vincent Demeester <vincent@sbr.pm>
2025-05-12 23:29:41
home: do not fail if the machine is not defined
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent adc8472
Changed files (1)
home/default.nix
@@ -20,8 +20,9 @@
     ++ lib.optional (builtins.pathExists (
       ../systems/. + "/${hostname}/home.nix"
     )) ../systems/${hostname}/home.nix
-    ++ lib.optional (globals.fn.hasSyncthingFolders
-      globals.machines."${hostname}"
+    ++ lib.optional (
+      builtins.hasAttr "${hostname}" globals.machines
+      && globals.fn.hasSyncthingFolders globals.machines."${hostname}"
     ) ./common/services/syncthing.nix;
 
   home = {