system-manager-wakasu
1{
2 globals,
3 hostname,
4 libx,
5 pkgs,
6 ...
7}:
8{
9 # The syncthing and wireguard modules are imported via mkSystemManager in lib/default.nix
10
11 # Environment packages
12 environment.systemPackages = with pkgs; [
13 helix
14 acpi
15 ];
16
17 # Syncthing configuration using the nixpkgs module
18 services.syncthing = {
19 enable = true;
20 user = "vincent";
21 group = "users";
22 dataDir = "/home/vincent/.local/share/syncthing";
23 configDir = "/home/vincent/.config/syncthing";
24 guiAddress = libx.syncthingGuiAddress globals.machines."${hostname}";
25 openDefaultPorts = false;
26
27 settings = {
28 options = {
29 urAccepted = -1; # Disable usage reporting
30 };
31 };
32 };
33
34 # WireGuard configuration using the custom wireguard wrapper module
35 services.wireguard = {
36 enable = true;
37 ips = [ "10.100.0.90/24" ];
38 allowedIPs = [ "10.100.0.0/24" ];
39 endpoint = "167.99.17.238";
40 endpointPort = 51820;
41 endpointPublicKey = "+H3fxErP9HoFUrPgU19ra9+GDLQw+VwvLWx3lMct7QI=";
42 };
43
44 # Configure /etc files
45 environment.etc = {
46 "syncthing-config-notice" = {
47 text = ''
48 Syncthing is managed by system-manager using the nixpkgs module.
49 Configuration is stored in /home/vincent/.config/syncthing
50
51 GUI Address: ${libx.syncthingGuiAddress globals.machines."${hostname}"}
52
53 To manage devices and folders, use the web interface.
54 '';
55 mode = "0444";
56 };
57 };
58}