my system configurations ^-^
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

add sync option

willow 5bd8c4c8 e759c2de

+55 -38
+6 -1
hosts/earthy/default.nix
··· 11 11 "${self}/modules/nixos" 12 12 ]; 13 13 14 - settings.system.hostName = "earthy"; 14 + settings = { 15 + system = { 16 + hostName = "earthy"; 17 + services.sync.enable = true; 18 + }; 19 + }; 15 20 16 21 # samba 17 22 environment.systemPackages = [pkgs.cifs-utils];
+1
hosts/starling/default.nix
··· 25 25 group = "staff"; 26 26 home = "/Users/${cfg.system.user.name}"; 27 27 }; 28 + services.sync.enable = true; 28 29 }; 29 30 }; 30 31
+43 -37
modules/shared/home/services/syncthing.nix
··· 1 1 { 2 2 config, 3 + lib, 4 + osConfig, 3 5 pkgs, 4 6 ... 5 7 }: let 6 8 inherit (pkgs.stdenv) isDarwin; 9 + 10 + cfg = osConfig.settings.system.services.sync; 7 11 8 12 devices = { 9 13 starling.id = "3NK35IK-ZONOPLB-R277NP3-MUTEU33-PFKOWCZ-U3SB6ZO-YPIBVY5-UTCTIQK"; ··· 16 20 # 17 21 # touch ~/Library/Application\ Support/Syncthing/.launchd_update_config 18 22 19 - services.syncthing = { 20 - enable = true; 23 + config = lib.mkIf cfg.enable { 24 + services.syncthing = { 25 + enable = true; 21 26 22 - settings = { 23 - inherit devices; 24 - options = { 25 - urAccepted = -1; # disable usage reporting 26 - relaysEnabled = false; 27 - }; 28 - folders = { 29 - docs = { 30 - label = "Documents"; 31 - devices = allDevices; 32 - path = config.xdg.userDirs.documents; 33 - }; 34 - music = { 35 - label = "Music"; 36 - devices = allDevices; 37 - path = config.xdg.userDirs.music; 38 - }; 39 - pictures = { 40 - label = "Pictures"; 41 - devices = allDevices; 42 - path = config.xdg.userDirs.pictures; 43 - }; 44 - # ignored in documents 45 - git = { 46 - label = "Git"; 47 - devices = allDevices; 48 - path = 49 - if isDarwin 50 - then "${config.xdg.userDirs.documents}/git" 51 - else "~/git"; 27 + settings = { 28 + inherit devices; 29 + options = { 30 + urAccepted = -1; # disable usage reporting 31 + relaysEnabled = false; 52 32 }; 53 - videos = { 54 - label = "Videos"; 55 - devices = allDevices; 56 - path = config.xdg.userDirs.videos; 33 + folders = { 34 + docs = { 35 + label = "Documents"; 36 + devices = allDevices; 37 + path = config.xdg.userDirs.documents; 38 + }; 39 + music = { 40 + label = "Music"; 41 + devices = allDevices; 42 + path = config.xdg.userDirs.music; 43 + }; 44 + pictures = { 45 + label = "Pictures"; 46 + devices = allDevices; 47 + path = config.xdg.userDirs.pictures; 48 + }; 49 + # ignored in documents 50 + git = { 51 + label = "Git"; 52 + devices = allDevices; 53 + path = 54 + if isDarwin 55 + then "${config.xdg.userDirs.documents}/git" 56 + else "~/git"; 57 + }; 58 + videos = { 59 + label = "Videos"; 60 + devices = allDevices; 61 + path = config.xdg.userDirs.videos; 62 + }; 57 63 }; 58 64 }; 65 + extraOptions = ["--no-default-folder"]; # don't create default ~/Sync folder 59 66 }; 60 - extraOptions = ["--no-default-folder"]; # don't create default ~/Sync folder 61 67 }; 62 68 }
+5
modules/shared/options/default.nix
··· 154 154 // { 155 155 default = cfg.system.services.enable; 156 156 }; 157 + sync.enable = 158 + mkEnableOption "Enable syncthing" 159 + // { 160 + default = false; 161 + }; 157 162 printing.enable = 158 163 mkEnableOption "Enable printing" 159 164 // {