Compare commits
5 commits
b02aef6546
...
47c8ca29a0
| Author | SHA1 | Date | |
|---|---|---|---|
| 47c8ca29a0 | |||
| e6b6416bc3 | |||
| 052d072ea5 | |||
| 559121da21 | |||
| 3fc4d0bf80 |
4 changed files with 29 additions and 6 deletions
|
|
@ -59,10 +59,9 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
# Open ports in the firewall.
|
# Open ports in the firewall.
|
||||||
# 8384 is syncthing's webui, and 22000 is syncthing related too
|
# No idea what ports 5201 and 21027 do tho
|
||||||
# No idea what 5201 and 21027 do tho
|
networking.firewall.allowedTCPPorts = [ 5201 ];
|
||||||
networking.firewall.allowedTCPPorts = [ 5201 8384 22000 ];
|
networking.firewall.allowedUDPPorts = [ 5201 21027];
|
||||||
networking.firewall.allowedUDPPorts = [ 5201 22000 21027];
|
|
||||||
# Or disable the firewall altogether.
|
# Or disable the firewall altogether.
|
||||||
# networking.firewall.enable = false;
|
# networking.firewall.enable = false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,16 @@
|
||||||
{ config, ... }:
|
{ config, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
# Set up devices and folders common to every device
|
|
||||||
services.syncthing = {
|
services.syncthing = {
|
||||||
|
overrideDevices = true;
|
||||||
|
overrideFolders = true;
|
||||||
|
openDefaultPorts = true;
|
||||||
|
extraOptions = {
|
||||||
|
options = {
|
||||||
|
urAccepted = 3;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
# Set up devices and folders common to every device
|
||||||
devices = {
|
devices = {
|
||||||
"phone" = {
|
"phone" = {
|
||||||
name = "Xiaomi Redmi Note 10 Pro";
|
name = "Xiaomi Redmi Note 10 Pro";
|
||||||
|
|
@ -16,12 +24,16 @@
|
||||||
name = "Steam Deck";
|
name = "Steam Deck";
|
||||||
id = "DLQPL74-KEQTPM5-X4PDZHB-4HLQYHV-UCMJLOB-P6W3KWU-QLJADBY-V4KEMA5";
|
id = "DLQPL74-KEQTPM5-X4PDZHB-4HLQYHV-UCMJLOB-P6W3KWU-QLJADBY-V4KEMA5";
|
||||||
};
|
};
|
||||||
|
"server" = {
|
||||||
|
name = "Everest";
|
||||||
|
id = "BVJBCAZ-WDIWBFR-CK3WB3N-TWH3UXX-EPZXVWE-BLQ3IDU-U7MHVVB-WO4BKAJ";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
folders = {
|
folders = {
|
||||||
"passwords" = {
|
"passwords" = {
|
||||||
label = "KeePassXC Passwords";
|
label = "KeePassXC Passwords";
|
||||||
id = "rdyaq-ex659";
|
id = "rdyaq-ex659";
|
||||||
devices = [ "phone" "pc" "steamdeck"];
|
devices = [ "phone" "pc" "steamdeck" "server"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -4,5 +4,6 @@
|
||||||
imports = [
|
imports = [
|
||||||
./ssh-agent.nix
|
./ssh-agent.nix
|
||||||
./flatpak.nix
|
./flatpak.nix
|
||||||
|
./syncthing.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
11
roles/desktop/services/syncthing.nix
Normal file
11
roles/desktop/services/syncthing.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
{ config, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
services.syncthing = {
|
||||||
|
enable = true;
|
||||||
|
user = "toast";
|
||||||
|
group = "users";
|
||||||
|
dataDir = config.users.users.toast.home;
|
||||||
|
folders."passwords".path = "~/Documents/Passwords";
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue