Change how syncthing is configured
Revert syncthing to using own user space in /var/lib/syncthing and set to only run on server User home-manager syncthing service (with tray) for other machines Remove mpd/mpc, and spot
This commit is contained in:
parent
25628104a7
commit
461d2580dc
15
flake.nix
15
flake.nix
|
@ -45,8 +45,6 @@
|
|||
group = "users";
|
||||
shell = "zsh";
|
||||
systemModules = [ ./system/hyprland.nix ];
|
||||
serviceModules =
|
||||
[ ./services/sshd/default.nix ./services/syncthing/default.nix ];
|
||||
homeModules = [
|
||||
./home/accounts/default.nix
|
||||
./home/emacs/default.nix
|
||||
|
@ -58,14 +56,14 @@
|
|||
./home/media.nix
|
||||
./home/nnn.nix
|
||||
./home/pass.nix
|
||||
./home/syncthing.nix
|
||||
./home/zathura.nix
|
||||
];
|
||||
stateVersion = "23.05";
|
||||
};
|
||||
systemConfig = { hostName ? default.hostName, user ? default.user
|
||||
, system ? default.system, group ? default.group, shell ? default.shell
|
||||
, systemModules ? default.systemModules
|
||||
, serviceModules ? default.serviceModules
|
||||
, systemModules ? default.systemModules, serviceModules ? [ ]
|
||||
, homeModules ? default.homeModules, stateVersion ? default.stateVersion
|
||||
}:
|
||||
let
|
||||
|
@ -258,11 +256,13 @@
|
|||
in systemConfig {
|
||||
inherit hostName user system;
|
||||
systemModules = [ ./system/default.nix ];
|
||||
serviceModules = default.serviceModules ++ [
|
||||
serviceModules = [
|
||||
./services/adguardhome/default.nix
|
||||
./services/gitea/default.nix
|
||||
./services/nextcloud/default.nix
|
||||
./services/ntfy-sh/default.nix
|
||||
./services/sshd/default.nix
|
||||
./services/syncthing/default.nix
|
||||
];
|
||||
homeModules =
|
||||
[ ./home/default.nix ./home/media.nix ./home/emacs/default.nix ];
|
||||
|
@ -272,10 +272,7 @@
|
|||
hostName = "Northstar";
|
||||
user = "xenia";
|
||||
system = "x86_64-linux";
|
||||
in systemConfig {
|
||||
inherit hostName user system;
|
||||
systemModules = default.systemModules ++ [ ./system/steam.nix ];
|
||||
};
|
||||
in systemConfig { inherit hostName user system; };
|
||||
|
||||
Ronin = let
|
||||
hostName = "Ronin";
|
||||
|
|
|
@ -1,11 +1,6 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [ mpc-cli spot ];
|
||||
services.mpd = {
|
||||
enable = true;
|
||||
network.startWhenNeeded = true;
|
||||
};
|
||||
programs = {
|
||||
mpv = {
|
||||
enable = true;
|
||||
|
|
8
home/syncthing.nix
Normal file
8
home/syncthing.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
tray.enable = true;
|
||||
};
|
||||
}
|
|
@ -1,11 +1,8 @@
|
|||
{ config, lib, pkgs, user, ... }:
|
||||
let devices = [ "Ion" "Legion" "Northstar" "Ronin" "Vanguard" ];
|
||||
in {
|
||||
services.syncthing = rec {
|
||||
inherit user;
|
||||
inherit (config.users.users.${user}) group;
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
dataDir = "/home/${user}";
|
||||
systemService = true;
|
||||
openDefaultPorts = true;
|
||||
settings = {
|
||||
|
@ -22,16 +19,28 @@ in {
|
|||
"I366QNQ-D3FTDRX-RNOTXMW-YITZXOF-DSCDMQD-63Q72LI-ME2Y4HZ-T34RMQK";
|
||||
};
|
||||
folders = {
|
||||
"Documents" = {
|
||||
inherit devices;
|
||||
id = "gvggx-6telk";
|
||||
path = "~/Documents";
|
||||
ignorePerms = true;
|
||||
};
|
||||
"Music" = {
|
||||
inherit devices;
|
||||
id = "munzw-vnxhl";
|
||||
path = "~/Music";
|
||||
ignorePerms = true;
|
||||
};
|
||||
"Pictures" = {
|
||||
inherit devices;
|
||||
id = "ziuj8-rm6dn";
|
||||
path = "${dataDir}/Pictures";
|
||||
path = "~/Pictures";
|
||||
ignorePerms = true;
|
||||
};
|
||||
"Zotero" = {
|
||||
"Videos" = {
|
||||
inherit devices;
|
||||
id = "huyvn-liwc9";
|
||||
path = "${dataDir}/Documents/Zotero";
|
||||
id = "mbsop-qteua";
|
||||
path = "~/Videos";
|
||||
ignorePerms = true;
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue