home/nixos/networking.nix

52 lines
1.3 KiB
Nix

{
pkgs,
use-iwd ? false,
}:
{
networking.networkmanager = {
enable = true;
dhcp = "dhcpcd";
wifi.backend = if use-iwd then "iwd" else "wpa_supplicant";
};
networking.nameservers = [ "8.8.8.8" ];
networking.resolvconf.enable = true;
networking.resolvconf.dnsExtensionMechanism = false; # edns seems to be fucky with this enabled
# TODO: maybe this should be optional
services.syncthing = {
enable = true;
openDefaultPorts = true;
# run daemon with my user
user = "xenia";
group = "users";
configDir = "/home/xenia/.local/state/syncthing";
dataDir = "/home/xenia/";
settings = {
services.syncthing.settings.options.urAccepted = 1;
devices = {
"foxhut" = {
addresses = [ "tcp://10.100.1.1" ];
id = "RTWKTX2-OG5DDRL-GWRWYMT-KQWUQCE-IPB3NNR-3DFJBNO-V4OI2HU-B2HPOAD";
};
"gender-station" = {
addresses = [ "tcp://10.100.1.3" ];
id = "R7CUIAA-GOORP7Z-QCGZ2VK-MM5WCBK-O6BKFYM-7WQOF4U-MXCQZSU-WES3ZAM";
};
};
folders = {
"Music" = {
path = "/home/xenia/Music";
devices = [ "foxhut" "gender-station" ];
};
"foxshare" = {
path = "/home/xenia/foxshare-new";
devices = [ "foxhut" "gender-station" ];
};
};
};
};
}