zion/modules/datasync.nix
coolneng ea06ff9985
Package cleanup and reverse proxy service restart
Squashed commit of the following:

commit db95d142d4
Author: coolneng <akasroua@gmail.com>
Date:   Thu Jan 30 13:23:23 2020 +0100

    Update Syncthing IDs and add roamer to Wireguard

commit 6a2346d4a1
Author: coolneng <akasroua@gmail.com>
Date:   Wed Jan 29 14:30:31 2020 +0100

    Add wireguard server configuration

commit 09c5755ec8
Author: coolneng <akasroua@gmail.com>
Date:   Wed Jan 29 00:20:52 2020 +0100

    Add wireguard packages

commit c542b06c9d
Author: coolneng <akasroua@gmail.com>
Date:   Tue Jan 28 21:57:53 2020 +0100

    Move zeroconf section to networking

commit 1af6e07072
Author: coolneng <akasroua@gmail.com>
Date:   Tue Jan 28 21:54:39 2020 +0100

    Revert "Clean up packages and refactor nginx config"

    This reverts commit 375758a958.

commit 5eb5e446ad
Author: coolneng <akasroua@gmail.com>
Date:   Sun Jan 26 19:39:28 2020 +0100

    Add wallabag docker container

commit 375758a958
Author: coolneng <akasroua@gmail.com>
Date:   Sun Jan 26 08:45:56 2020 +0100

    Clean up packages and refactor nginx config

commit f210353ce5
Author: coolneng <akasroua@gmail.com>
Date:   Tue Dec 31 18:41:34 2019 +0100

    Delete Security folder from Syncthing

commit 65afa32e57
Author: coolneng <akasroua@gmail.com>
Date:   Thu Dec 26 04:19:38 2019 +0100

    Use 'after' instead of 'wantedBy'

commit 8cc829e063
Author: coolneng <akasroua@gmail.com>
Date:   Thu Dec 26 04:16:21 2019 +0100

    Use wantedBy instead of partOf

commit e490102d74
Merge: 91d4b24 51ed142
Author: coolneng <akasroua@gmail.com>
Date:   Wed Dec 25 17:47:14 2019 +0100

    Merge branch 'test' of gitea into test

commit 51ed142c5f
Author: coolneng <akasroua@gmail.com>
Date:   Wed Dec 25 17:15:42 2019 +0100

    Use mkforce for 'partOf' option

commit caf4a49ec2
Author: coolneng <akasroua@gmail.com>
Date:   Wed Dec 25 16:37:11 2019 +0100

    Configure nginx service as dependent on gitea

commit e8850eff51
Author: coolneng <akasroua@gmail.com>
Date:   Wed Dec 25 16:24:10 2019 +0100

    Restart nginx after Gitea

commit 91d4b240d7
Author: coolneng <akasroua@gmail.com>
Date:   Sun Dec 15 22:54:00 2019 +0100

    # This is a combination of 2 commits.
    # This is the 1st commit message:

    Revert "Disable wizard on Gitea"

    This reverts commit d8b415ee16.

    # This is the commit message #2:

    Remove Gitea socket connection to the DB
2020-02-21 12:24:13 +01:00

63 lines
1.9 KiB
Nix

# Syncthing and Radicale configuration
{ config, pkgs, lib, ... }:
{
environment.systemPackages = with pkgs; [
syncthing
radicale
];
# Enable syncthing
services.syncthing = {
enable = true;
openDefaultPorts = true;
guiAddress = "0.0.0.0:8384";
dataDir = "/vault/syncthing";
declarative = {
devices = {
monolith = { id = "64P2YDH-S5V7PKM-XXBOSXC-WEXUSC7-B553ELI-6IJ3CPJ-ZFB3YA5-MTKAFAH"; };
roamer = { id = "XE6YPFU-TB7ARWF-7NDSJ35-2PBNNDS-VTXGGCH-KC2UBLE-UHWAXH3-MWD26A5"; };
unit = { id = "VYHHL4A-KJ6WUYQ-4SNWNA3-YRCFTHE-52ZTRLP-4LV6ZDV-4VAJLHC-RJXYYQY"; };
};
folders = {
"Documents" = { devices = [ "monolith" "roamer" "unit" ]; id = "wusdj-bfjkr"; };
"Notes" = { devices = [ "monolith" "roamer" "unit" ]; id = "kafhz-bfmzm"; };
"Music" = { devices = [ "monolith" "roamer" "unit" ]; id = "2aqt7-vpprc"; };
"Photos" = { devices = [ "monolith" "roamer" "unit" ]; id = "mjibc-ustcg"; };
"Projects" = { devices = [ "monolith" "unit" ]; id = "cjhmu-avy9v"; };
Documents.type = "receiveonly";
Notes.type = "receiveonly";
Music.type = "receiveonly";
Photos.type = "receiveonly";
Projects.type = "receiveonly";
Documents.path = "/vault/syncthing/Documents";
Notes.path = "/vault/syncthing/Notes";
Music.path = "/vault/syncthing/Music";
Photos.path = "/vault/syncthing/Photos";
Projects.path = "/vault/syncthing/Projects";
};
};
};
# Enable Radicale
services.radicale = {
enable = true;
config = ''
[server]
hosts = 127.0.0.1:5232
max_connections = 20
max_content_length = 100000000
timeout = 30
[auth]
type = htpasswd
htpasswd_filename = /var/lib/radicale/users
htpasswd_encryption = plain
delay = 1
'';
};
}