added share folder config
This commit is contained in:
		
							parent
							
								
									98b475e4c8
								
							
						
					
					
						commit
						50d1e8d5ea
					
				
					 2 changed files with 34 additions and 9 deletions
				
			
		| 
						 | 
					@ -121,6 +121,7 @@
 | 
				
			||||||
    sync = {
 | 
					    sync = {
 | 
				
			||||||
      enable = true;
 | 
					      enable = true;
 | 
				
			||||||
      folders = {
 | 
					      folders = {
 | 
				
			||||||
 | 
					        share.enable = true;
 | 
				
			||||||
        leyla = {
 | 
					        leyla = {
 | 
				
			||||||
          documents.enable = true;
 | 
					          documents.enable = true;
 | 
				
			||||||
          calendar.enable = true;
 | 
					          calendar.enable = true;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -8,6 +8,9 @@ in {
 | 
				
			||||||
  options.host.sync = {
 | 
					  options.host.sync = {
 | 
				
			||||||
    enable = lib.mkEnableOption "should sync thing be enabled on this device";
 | 
					    enable = lib.mkEnableOption "should sync thing be enabled on this device";
 | 
				
			||||||
    folders = {
 | 
					    folders = {
 | 
				
			||||||
 | 
					      share = {
 | 
				
			||||||
 | 
					        enable = lib.mkEnableOption "should the share folder by synced";
 | 
				
			||||||
 | 
					      };
 | 
				
			||||||
      leyla = {
 | 
					      leyla = {
 | 
				
			||||||
        documents = {
 | 
					        documents = {
 | 
				
			||||||
          enable = lib.mkEnableOption "should the documents folder be synced";
 | 
					          enable = lib.mkEnableOption "should the documents folder be synced";
 | 
				
			||||||
| 
						 | 
					@ -72,14 +75,24 @@ in {
 | 
				
			||||||
              horizon = lib.mkIf (config.networking.hostName != "horizon") {
 | 
					              horizon = lib.mkIf (config.networking.hostName != "horizon") {
 | 
				
			||||||
                id = "OGPAEU6-5UR56VL-SP7YC4Y-IMVCRTO-XFD4CYN-Z6T5TZO-PFZNAT6-4MKWPQS";
 | 
					                id = "OGPAEU6-5UR56VL-SP7YC4Y-IMVCRTO-XFD4CYN-Z6T5TZO-PFZNAT6-4MKWPQS";
 | 
				
			||||||
              };
 | 
					              };
 | 
				
			||||||
 | 
					              shale = {
 | 
				
			||||||
 | 
					                id = "AOAXEVD-QJ2IVRA-6G44Q7Q-TGUPXU2-FWWKOBH-DPKWC5N-LBAEHWJ-7EQF4AM";
 | 
				
			||||||
 | 
					              };
 | 
				
			||||||
            };
 | 
					            };
 | 
				
			||||||
            folders = let
 | 
					            folders = let
 | 
				
			||||||
              allDevices = [
 | 
					              ceder = "ceder";
 | 
				
			||||||
                "ceder"
 | 
					              coven = "coven";
 | 
				
			||||||
                "coven"
 | 
					              shale = "shale";
 | 
				
			||||||
                (lib.mkIf (config.networking.hostName != "defiant") "defiant")
 | 
					              defiant = lib.mkIf (config.networking.hostName != "defiant") "defiant";
 | 
				
			||||||
                (lib.mkIf (config.networking.hostName != "twilight") "twilight")
 | 
					              twilight = lib.mkIf (config.networking.hostName != "twilight") "twilight";
 | 
				
			||||||
                (lib.mkIf (config.networking.hostName != "horizon") "horizon")
 | 
					              horizon = lib.mkIf (config.networking.hostName != "horizon") "horizon";
 | 
				
			||||||
 | 
					              leylaDevices = [
 | 
				
			||||||
 | 
					                ceder
 | 
				
			||||||
 | 
					                coven
 | 
				
			||||||
 | 
					                shale
 | 
				
			||||||
 | 
					                defiant
 | 
				
			||||||
 | 
					                twilight
 | 
				
			||||||
 | 
					                horizon
 | 
				
			||||||
              ];
 | 
					              ];
 | 
				
			||||||
            in
 | 
					            in
 | 
				
			||||||
              lib.mkMerge [
 | 
					              lib.mkMerge [
 | 
				
			||||||
| 
						 | 
					@ -88,21 +101,32 @@ in {
 | 
				
			||||||
                  "documents" = {
 | 
					                  "documents" = {
 | 
				
			||||||
                    id = "hvrj0-9bm1p";
 | 
					                    id = "hvrj0-9bm1p";
 | 
				
			||||||
                    path = "${mountDir}/leyla/documents";
 | 
					                    path = "${mountDir}/leyla/documents";
 | 
				
			||||||
                    devices = allDevices;
 | 
					                    devices = leylaDevices;
 | 
				
			||||||
                  };
 | 
					                  };
 | 
				
			||||||
                })
 | 
					                })
 | 
				
			||||||
                (lib.mkIf config.host.sync.folders.leyla.calendar.enable {
 | 
					                (lib.mkIf config.host.sync.folders.leyla.calendar.enable {
 | 
				
			||||||
                  "calendar" = {
 | 
					                  "calendar" = {
 | 
				
			||||||
                    id = "8oatl-1rv6w";
 | 
					                    id = "8oatl-1rv6w";
 | 
				
			||||||
                    path = "${mountDir}/leyla/calendar";
 | 
					                    path = "${mountDir}/leyla/calendar";
 | 
				
			||||||
                    devices = allDevices;
 | 
					                    devices = leylaDevices;
 | 
				
			||||||
                  };
 | 
					                  };
 | 
				
			||||||
                })
 | 
					                })
 | 
				
			||||||
                (lib.mkIf config.host.sync.folders.leyla.notes.enable {
 | 
					                (lib.mkIf config.host.sync.folders.leyla.notes.enable {
 | 
				
			||||||
                  "notes" = {
 | 
					                  "notes" = {
 | 
				
			||||||
                    id = "dwbuv-zffnf";
 | 
					                    id = "dwbuv-zffnf";
 | 
				
			||||||
                    path = "${mountDir}/leyla/notes";
 | 
					                    path = "${mountDir}/leyla/notes";
 | 
				
			||||||
                    devices = allDevices;
 | 
					                    devices = leylaDevices;
 | 
				
			||||||
 | 
					                  };
 | 
				
			||||||
 | 
					                })
 | 
				
			||||||
 | 
					                (lib.mkIf config.host.sync.folders.share.enable {
 | 
				
			||||||
 | 
					                  "share" = {
 | 
				
			||||||
 | 
					                    id = "73ot0-cxmkx";
 | 
				
			||||||
 | 
					                    path = "${mountDir}/default/share";
 | 
				
			||||||
 | 
					                    devices = [
 | 
				
			||||||
 | 
					                      ceder
 | 
				
			||||||
 | 
					                      shale
 | 
				
			||||||
 | 
					                      defiant
 | 
				
			||||||
 | 
					                    ];
 | 
				
			||||||
                  };
 | 
					                  };
 | 
				
			||||||
                })
 | 
					                })
 | 
				
			||||||
              ];
 | 
					              ];
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue