add declarative syncthing config for Torus and remove module

This commit is contained in:
Tyler Starr 2023-10-13 21:11:40 -07:00
parent f1f873f1ab
commit 9385a07586
5 changed files with 18 additions and 19 deletions

View File

@ -94,7 +94,6 @@
jellyfin.enable = false;
peripherals.enable = true;
samba-client.enable = true;
syncthing.enable = false;
virt-manager.enable = true;
};
system = {

View File

@ -1,9 +1,10 @@
{ config, pkgs, user, lib, ... }:
{
imports = [
../../modules
./wireguard-server.nix
./samba-server.nix
../../modules
./syncthing.nix
];
nix = {
@ -130,7 +131,6 @@
};
services = {
jellyfin.enable = true;
syncthing.enable = true;
};
system = {
terminal.enable = true;

View File

@ -0,0 +1,15 @@
{ config, lib, pkgs, user, ... }:
{
environment.systemPackages = with pkgs; [ syncthing ];
services.syncthing = {
enable = true;
user = "${user}";
configDir = "/home/${user}/.config/syncthing";
overrideDevices = true;
overrideFolders = true;
devices = {
};
folders = {
};
};
}

View File

@ -1,4 +1,4 @@
{ ... }:
{
imports = [ ./syncthing.nix ./samba-client.nix ./jellyfin.nix ./virt-manager.nix ./peripherals.nix ];
imports = [ ./samba-client.nix ./jellyfin.nix ./virt-manager.nix ./peripherals.nix ];
}

View File

@ -1,15 +0,0 @@
{ config, lib, pkgs, user, ... }:
let cfg = config.modules.services.syncthing;
in {
options.modules.services.syncthing.enable = lib.mkEnableOption "syncthing";
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [ syncthing ];
services.syncthing = {
enable = true;
user = "${user}";
configDir = "/home/${user}/.config/syncthing";
};
};
}