diff --git a/flake.nix b/flake.nix index 25b12168..fff6f64b 100644 --- a/flake.nix +++ b/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"; diff --git a/home/media.nix b/home/media.nix index c4fb7e92..13321a4d 100644 --- a/home/media.nix +++ b/home/media.nix @@ -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; diff --git a/home/syncthing.nix b/home/syncthing.nix new file mode 100644 index 00000000..871384a4 --- /dev/null +++ b/home/syncthing.nix @@ -0,0 +1,8 @@ +{ config, lib, pkgs, ... }: + +{ + services.syncthing = { + enable = true; + tray.enable = true; + }; +} diff --git a/services/syncthing/default.nix b/services/syncthing/default.nix index 8d57f062..802904c5 100644 --- a/services/syncthing/default.nix +++ b/services/syncthing/default.nix @@ -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; }; };