deduped some syncthing options
This commit is contained in:
parent
c716794070
commit
a89d4aa586
7 changed files with 94 additions and 171 deletions
|
|
@ -7,7 +7,6 @@
|
|||
## Selected host modules for import
|
||||
./hardware.nix # hardware configuration
|
||||
./network.nix # network configuration
|
||||
./sync.nix # syncthing & gitwatch
|
||||
./zfs.nix # zfs configuration
|
||||
|
||||
## Additional core modules to import
|
||||
|
|
|
|||
|
|
@ -15,37 +15,37 @@
|
|||
};
|
||||
|
||||
#nameservers = [
|
||||
#"1.1.1.1"
|
||||
#"1.1.1.1"
|
||||
#];
|
||||
|
||||
#proxy = {
|
||||
#default = "https://user:password@proxy:port/";
|
||||
#noProxy = "127.0.0.1, localhost, internal.domain";
|
||||
#default = "https://user:password@proxy:port/";
|
||||
#noProxy = "127.0.0.1, localhost, internal.domain";
|
||||
#};
|
||||
|
||||
|
||||
};
|
||||
|
||||
## i knooooowwwwwww i need a proper firewall config but im laaaazzyyyyyyyyyy
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
#checkReversePath = "loose";
|
||||
#allowedTCPPortRanges = [ { from = 1720; to = 1770; } ];
|
||||
#allowedUDPPortRanges = allowedTCPPortRanges;
|
||||
#interfaces."DEVICENAME".allowedTCPPorts = [
|
||||
#22999
|
||||
#]
|
||||
allowedTCPPorts = [
|
||||
2234 # soulseek/nicotine-plus
|
||||
8384 # syncthing
|
||||
#21027
|
||||
#25565
|
||||
];
|
||||
allowedUDPPorts = [
|
||||
#22000
|
||||
#21027
|
||||
#41641
|
||||
#51820
|
||||
];
|
||||
#checkReversePath = "loose";
|
||||
#allowedTCPPortRanges = [ { from = 1720; to = 1770; } ];
|
||||
#allowedUDPPortRanges = allowedTCPPortRanges;
|
||||
#interfaces."DEVICENAME".allowedTCPPorts = [
|
||||
#22999
|
||||
#]
|
||||
allowedTCPPorts = [
|
||||
2234 # soulseek/nicotine-plus
|
||||
8384 # syncthing
|
||||
#21027
|
||||
#25565
|
||||
];
|
||||
allowedUDPPorts = [
|
||||
#22000
|
||||
#21027
|
||||
#41641
|
||||
#51820
|
||||
];
|
||||
};
|
||||
|
||||
services.dnscrypt-proxy2 = {
|
||||
|
|
@ -60,7 +60,8 @@
|
|||
"https://download.dnscrypt.info/resolvers-list/v3/public-resolvers.md"
|
||||
];
|
||||
cache_file = "/var/lib/dnscrypt-proxy2/public-resolvers.md";
|
||||
minisign_key = "RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3";
|
||||
minisign_key =
|
||||
"RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3";
|
||||
};
|
||||
|
||||
# You can choose a specific set of servers from https://github.com/DNSCrypt/dnscrypt-resolvers/blob/master/v3/public-resolvers.md
|
||||
|
|
|
|||
|
|
@ -1,108 +0,0 @@
|
|||
# https://github.com/gitwatch/gitwatch
|
||||
# https://nixos.wiki/wiki/Syncthing
|
||||
{ pkgs, primaryUser, homeDir, ... }:
|
||||
|
||||
{
|
||||
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
gitwatch # automatic git versioning
|
||||
syncthing # standard syncthing package
|
||||
#syncthing-tray # tray applet for syncthing
|
||||
];
|
||||
};
|
||||
|
||||
services = {
|
||||
|
||||
## Gitwatch
|
||||
gitwatch = {
|
||||
|
||||
Keyring = { # keyring backup, dont have a nextcloud (yet)
|
||||
enable = true;
|
||||
user = "${primaryUser}";
|
||||
path = "${homeDir}/Keyring/";
|
||||
remote = "git@codeberg.org:serenity-F/keyring.git";
|
||||
};
|
||||
|
||||
Notes = { # notes backup, not paying for obsidian backup (lol)
|
||||
enable = true;
|
||||
user = "${primaryUser}";
|
||||
path = "${homeDir}/Notes/";
|
||||
remote = "git@codeberg.org:serenity-F/notes.git";
|
||||
};
|
||||
};
|
||||
|
||||
## Syncthing
|
||||
syncthing = {
|
||||
enable = true; # easy toggle
|
||||
dataDir = "${homeDir}"; # defaults to primaryUser's homedir
|
||||
openDefaultPorts = true; # opens the default firewall ports
|
||||
configDir =
|
||||
"${homeDir}/.config/syncthing"; # defaults to primaryUser's homedir
|
||||
user = "${primaryUser}"; # uses primaryUser to run the service
|
||||
group = "users"; # runs in the users group
|
||||
#guiAddress = "0.0.0.0:8384"; # default web address for the GUI
|
||||
settings = {
|
||||
## WebApp GUI
|
||||
user = "serenity";
|
||||
#password = "password";
|
||||
|
||||
## Syncthing Folders
|
||||
overrideFolders = true; # force these folder on activation
|
||||
folders = {
|
||||
|
||||
"Keyring" = { # folder for password/secrets vault
|
||||
enable = true; # easy toggle - OFF for now
|
||||
id = "k158k-hvzk3";
|
||||
path = "${homeDir}/Keyring"; # defaults to primaryUser's homedir
|
||||
devices = [
|
||||
"Hecate"
|
||||
#"Persephone"
|
||||
];
|
||||
#versioning = { # versioning, for added redundancy
|
||||
# disabled for now as we have versioning through git
|
||||
#type = "simple"; # nothing fancy, keeps x number of copies
|
||||
#params = { keep = "3"; }; # number of copies to keep
|
||||
#};
|
||||
};
|
||||
|
||||
"Notes" = { # folder for organisation/notes vault
|
||||
enable = true; # easy toggle
|
||||
id = "h0ay3-l8snk";
|
||||
path = "${homeDir}/Notes"; # defaults to primaryUser's homedir
|
||||
devices = [
|
||||
"Hecate"
|
||||
#"Persephone"
|
||||
];
|
||||
#versioning = { # versioning, for added redundancy
|
||||
# disabled for now as we have versioning through git
|
||||
#type = "simple"; # nothing fancy, keeps x number of copies
|
||||
#params = { keep = "3"; }; # number of copies to keep
|
||||
#};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
## Syncthing Devices
|
||||
overrideDevices = true; # force these devices on activation
|
||||
devices =
|
||||
{ # all syncthing devices listed - 'boilerplate' for other hosts
|
||||
|
||||
#"Orcus".id = "REALLY-LONG-ORCUS-SYNCTHING-KEY-HERE"; # disabled for testing
|
||||
#"Hades".id = "REALLY-LONG-HADES-SYNCTHING-KEY-HERE"; # disabled for testing
|
||||
"Hecate".id = "36WUSM4-HFYOGWP-33JHBPI-WR2TXXE-ZX3PFMB-QH6BMXM-DQ523ZF-FD7M3AI";
|
||||
#"Persephone".id = "REALLY-LONG-PERSEPHONE-SYNCTHING-KEY-HERE"; # disabled for testing
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services = {
|
||||
syncthing = {
|
||||
environment.STNODEFAULTFOLDER =
|
||||
"true"; # prevents the `Sync` folder from being created on activation
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
@ -15,36 +15,36 @@
|
|||
};
|
||||
|
||||
#nameservers = [
|
||||
#"1.1.1.1"
|
||||
#"1.1.1.1"
|
||||
#];
|
||||
|
||||
#proxy = {
|
||||
#default = "https://user:password@proxy:port/";
|
||||
#noProxy = "127.0.0.1, localhost, internal.domain";
|
||||
#default = "https://user:password@proxy:port/";
|
||||
#noProxy = "127.0.0.1, localhost, internal.domain";
|
||||
#};
|
||||
|
||||
|
||||
};
|
||||
|
||||
## i knooooowwwwwww i need a proper firewall config but im laaaazzyyyyyyyyyy
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
#checkReversePath = "loose";
|
||||
#allowedTCPPortRanges = [ { from = 1720; to = 1770; } ];
|
||||
#allowedUDPPortRanges = allowedTCPPortRanges;
|
||||
#interfaces."DEVICENAME".allowedTCPPorts = [
|
||||
#22999
|
||||
#]
|
||||
#allowedTCPPorts = [
|
||||
#22000
|
||||
#21027
|
||||
#25565
|
||||
#];
|
||||
#allowedUDPPorts = [
|
||||
#22000
|
||||
#21027
|
||||
#41641
|
||||
#51820
|
||||
#];
|
||||
#checkReversePath = "loose";
|
||||
#allowedTCPPortRanges = [ { from = 1720; to = 1770; } ];
|
||||
#allowedUDPPortRanges = allowedTCPPortRanges;
|
||||
#interfaces."DEVICENAME".allowedTCPPorts = [
|
||||
#22999
|
||||
#]
|
||||
#allowedTCPPorts = [
|
||||
#22000
|
||||
#21027
|
||||
#25565
|
||||
#];
|
||||
#allowedUDPPorts = [
|
||||
#22000
|
||||
#21027
|
||||
#41641
|
||||
#51820
|
||||
#];
|
||||
};
|
||||
|
||||
services.dnscrypt-proxy2 = {
|
||||
|
|
@ -59,7 +59,8 @@
|
|||
"https://download.dnscrypt.info/resolvers-list/v3/public-resolvers.md"
|
||||
];
|
||||
cache_file = "/var/lib/dnscrypt-proxy2/public-resolvers.md";
|
||||
minisign_key = "RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3";
|
||||
minisign_key =
|
||||
"RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3";
|
||||
};
|
||||
|
||||
# You can choose a specific set of servers from https://github.com/DNSCrypt/dnscrypt-resolvers/blob/master/v3/public-resolvers.md
|
||||
|
|
@ -78,31 +79,4 @@
|
|||
StateDirectory = "dnscrypt-proxy";
|
||||
};
|
||||
|
||||
## syncthing for device <-> device filesharing and,,, syncing
|
||||
## still not set up, grrrr
|
||||
services.syncthing = {
|
||||
enable = false;
|
||||
user = "serenity";
|
||||
dataDir = "/home/serenity/sync/";
|
||||
configDir = "/home/serenity/flakes/nixdots/home/common/dotconfig/syncthing/";
|
||||
#overrideDevices = true;
|
||||
#overrideFolder = true;
|
||||
|
||||
## these 3 devices are pretty much my entire ecosystem for now
|
||||
settings.devices = {
|
||||
#hades.id = "DEVICE_ID";
|
||||
#proserpina.id = "DEVICE_ID";
|
||||
#hecate.id = "DEVICE_ID";
|
||||
};
|
||||
|
||||
## plan to have this dir automatically committed and pushed to a git repo daily
|
||||
settings.folders = {
|
||||
#"FOLDER_ID" = {
|
||||
#path = "/home/serenity/Documents/Notes";
|
||||
#devices = [ "hecate" "hades" "persephone" ];
|
||||
#};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,36 +15,36 @@
|
|||
};
|
||||
|
||||
#nameservers = [
|
||||
#"1.1.1.1"
|
||||
#"1.1.1.1"
|
||||
#];
|
||||
|
||||
#proxy = {
|
||||
#default = "https://user:password@proxy:port/";
|
||||
#noProxy = "127.0.0.1, localhost, internal.domain";
|
||||
#default = "https://user:password@proxy:port/";
|
||||
#noProxy = "127.0.0.1, localhost, internal.domain";
|
||||
#};
|
||||
|
||||
|
||||
};
|
||||
|
||||
## i knooooowwwwwww i need a proper firewall config but im laaaazzyyyyyyyyyy
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
#checkReversePath = "loose";
|
||||
#allowedTCPPortRanges = [ { from = 1720; to = 1770; } ];
|
||||
#allowedUDPPortRanges = allowedTCPPortRanges;
|
||||
#interfaces."DEVICENAME".allowedTCPPorts = [
|
||||
#22999
|
||||
#]
|
||||
#allowedTCPPorts = [
|
||||
#22000
|
||||
#21027
|
||||
#25565
|
||||
#];
|
||||
#allowedUDPPorts = [
|
||||
#22000
|
||||
#21027
|
||||
#41641
|
||||
#51820
|
||||
#];
|
||||
#checkReversePath = "loose";
|
||||
#allowedTCPPortRanges = [ { from = 1720; to = 1770; } ];
|
||||
#allowedUDPPortRanges = allowedTCPPortRanges;
|
||||
#interfaces."DEVICENAME".allowedTCPPorts = [
|
||||
#22999
|
||||
#]
|
||||
#allowedTCPPorts = [
|
||||
#22000
|
||||
#21027
|
||||
#25565
|
||||
#];
|
||||
#allowedUDPPorts = [
|
||||
#22000
|
||||
#21027
|
||||
#41641
|
||||
#51820
|
||||
#];
|
||||
};
|
||||
|
||||
services.dnscrypt-proxy2 = {
|
||||
|
|
@ -59,7 +59,8 @@
|
|||
"https://download.dnscrypt.info/resolvers-list/v3/public-resolvers.md"
|
||||
];
|
||||
cache_file = "/var/lib/dnscrypt-proxy2/public-resolvers.md";
|
||||
minisign_key = "RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3";
|
||||
minisign_key =
|
||||
"RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3";
|
||||
};
|
||||
|
||||
# You can choose a specific set of servers from https://github.com/DNSCrypt/dnscrypt-resolvers/blob/master/v3/public-resolvers.md
|
||||
|
|
@ -78,31 +79,4 @@
|
|||
StateDirectory = "dnscrypt-proxy";
|
||||
};
|
||||
|
||||
## syncthing for device <-> device filesharing and,,, syncing
|
||||
## still not set up, grrrr
|
||||
services.syncthing = {
|
||||
enable = false;
|
||||
user = "serenity";
|
||||
dataDir = "/home/serenity/sync/";
|
||||
configDir = "/home/serenity/flakes/nixdots/home/common/dotconfig/syncthing/";
|
||||
#overrideDevices = true;
|
||||
#overrideFolder = true;
|
||||
|
||||
## these 3 devices are pretty much my entire ecosystem for now
|
||||
settings.devices = {
|
||||
#hades.id = "DEVICE_ID";
|
||||
#proserpina.id = "DEVICE_ID";
|
||||
#hecate.id = "DEVICE_ID";
|
||||
};
|
||||
|
||||
## plan to have this dir automatically committed and pushed to a git repo daily
|
||||
settings.folders = {
|
||||
#"FOLDER_ID" = {
|
||||
#path = "/home/serenity/Documents/Notes";
|
||||
#devices = [ "hecate" "hades" "persephone" ];
|
||||
#};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,36 +15,36 @@
|
|||
};
|
||||
|
||||
#nameservers = [
|
||||
#"1.1.1.1"
|
||||
#"1.1.1.1"
|
||||
#];
|
||||
|
||||
#proxy = {
|
||||
#default = "https://user:password@proxy:port/";
|
||||
#noProxy = "127.0.0.1, localhost, internal.domain";
|
||||
#default = "https://user:password@proxy:port/";
|
||||
#noProxy = "127.0.0.1, localhost, internal.domain";
|
||||
#};
|
||||
|
||||
|
||||
};
|
||||
|
||||
## i knooooowwwwwww i need a proper firewall config but im laaaazzyyyyyyyyyy
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
#checkReversePath = "loose";
|
||||
#allowedTCPPortRanges = [ { from = 1720; to = 1770; } ];
|
||||
#allowedUDPPortRanges = allowedTCPPortRanges;
|
||||
#interfaces."DEVICENAME".allowedTCPPorts = [
|
||||
#22999
|
||||
#]
|
||||
#allowedTCPPorts = [
|
||||
#22000
|
||||
#21027
|
||||
#25565
|
||||
#];
|
||||
#allowedUDPPorts = [
|
||||
#22000
|
||||
#21027
|
||||
#41641
|
||||
#51820
|
||||
#];
|
||||
#checkReversePath = "loose";
|
||||
#allowedTCPPortRanges = [ { from = 1720; to = 1770; } ];
|
||||
#allowedUDPPortRanges = allowedTCPPortRanges;
|
||||
#interfaces."DEVICENAME".allowedTCPPorts = [
|
||||
#22999
|
||||
#]
|
||||
#allowedTCPPorts = [
|
||||
#22000
|
||||
#21027
|
||||
#25565
|
||||
#];
|
||||
#allowedUDPPorts = [
|
||||
#22000
|
||||
#21027
|
||||
#41641
|
||||
#51820
|
||||
#];
|
||||
};
|
||||
|
||||
services.dnscrypt-proxy2 = {
|
||||
|
|
@ -59,7 +59,8 @@
|
|||
"https://download.dnscrypt.info/resolvers-list/v3/public-resolvers.md"
|
||||
];
|
||||
cache_file = "/var/lib/dnscrypt-proxy2/public-resolvers.md";
|
||||
minisign_key = "RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3";
|
||||
minisign_key =
|
||||
"RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3";
|
||||
};
|
||||
|
||||
# You can choose a specific set of servers from https://github.com/DNSCrypt/dnscrypt-resolvers/blob/master/v3/public-resolvers.md
|
||||
|
|
@ -78,31 +79,4 @@
|
|||
StateDirectory = "dnscrypt-proxy";
|
||||
};
|
||||
|
||||
## syncthing for device <-> device filesharing and,,, syncing
|
||||
## still not set up, grrrr
|
||||
services.syncthing = {
|
||||
enable = false;
|
||||
user = "serenity";
|
||||
dataDir = "/home/serenity/sync/";
|
||||
configDir = "/home/serenity/flakes/nixdots/home/common/dotconfig/syncthing/";
|
||||
#overrideDevices = true;
|
||||
#overrideFolder = true;
|
||||
|
||||
## these 3 devices are pretty much my entire ecosystem for now
|
||||
settings.devices = {
|
||||
#hades.id = "DEVICE_ID";
|
||||
#proserpina.id = "DEVICE_ID";
|
||||
#hecate.id = "DEVICE_ID";
|
||||
};
|
||||
|
||||
## plan to have this dir automatically committed and pushed to a git repo daily
|
||||
settings.folders = {
|
||||
#"FOLDER_ID" = {
|
||||
#path = "/home/serenity/Documents/Notes";
|
||||
#devices = [ "hecate" "hades" "persephone" ];
|
||||
#};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue