Part of #197 (remove home-manager). Atomic PR 4 of 7.
Migrate darwin syncthing (aaron only) off home-manager into native nix-darwin config. home-manager stays functional after this PR; verify with an aaron build.
What moves
From modules/home/darwin.nix (flake.homeModules.darwin):
services.syncthing = {
enable = true;
guiAddress = "0.0.0.0:8384";
settings = import (self + /lib/syncthing-settings.nix) { dataDir = config.home.homeDirectory; };
};
(config.home.homeDirectory on darwin = /Users/soft.)
Target
nix-darwin has no services.syncthing module, so reproduce it with launchd.user.agents:
- A
syncthing agent that runs ${pkgs.syncthing}/bin/syncthing --no-default-folder --gui-address=0.0.0.0:8384 --home=… (keep-alive, run at load).
- Pushing the declarative
settings (folders/devices from lib/syncthing-settings.nix) is the tricky part. The Linux system module (modules/nixos-base.nix:70) already consumes lib/syncthing-settings.nix via the NixOS services.syncthing.settings option — but launchd has no equivalent. Reproduce it with a second launchd.user.agents.syncthing-init one-shot that POSTs the settings to the syncthing REST API (/rest/config) after start, OR writes the generated config.xml. Reuse lib/syncthing-settings.nix so the device/folder definitions stay single-sourced. Document the chosen approach in the PR.
Keep guiAddress = 0.0.0.0:8384 behavior.
Where it lands
aaron only. modules/hosts/aaron/configuration.nix already has home-manager.users.soft = self.homeModules.darwin (line 231). Add the launchd agents to aaron's darwin config (configuration.nix or a darwin module). Remove the services.syncthing block from modules/home/darwin.nix.
Verify
nix build .#darwinConfigurations.aaron.system (or the appropriate aaron darwin build attr).
- Confirm a
syncthing launchd user agent is generated and the settings/devices match lib/syncthing-settings.nix.
Scope guard
Only darwin syncthing. The .hushlogin + bg alias (also in darwin.nix) are a separate PR. Do not touch mpd/hyprlock/hypridle/prettier/teardown.
Part of #197 (remove home-manager). Atomic PR 4 of 7.
Migrate darwin syncthing (aaron only) off home-manager into native nix-darwin config. home-manager stays functional after this PR; verify with an aaron build.
What moves
From
modules/home/darwin.nix(flake.homeModules.darwin):(
config.home.homeDirectoryon darwin =/Users/soft.)Target
nix-darwin has no
services.syncthingmodule, so reproduce it withlaunchd.user.agents:syncthingagent that runs${pkgs.syncthing}/bin/syncthing --no-default-folder --gui-address=0.0.0.0:8384 --home=…(keep-alive, run at load).settings(folders/devices fromlib/syncthing-settings.nix) is the tricky part. The Linux system module (modules/nixos-base.nix:70) already consumeslib/syncthing-settings.nixvia the NixOSservices.syncthing.settingsoption — but launchd has no equivalent. Reproduce it with a secondlaunchd.user.agents.syncthing-initone-shot that POSTs the settings to the syncthing REST API (/rest/config) after start, OR writes the generatedconfig.xml. Reuselib/syncthing-settings.nixso the device/folder definitions stay single-sourced. Document the chosen approach in the PR.Keep
guiAddress = 0.0.0.0:8384behavior.Where it lands
aaron only.
modules/hosts/aaron/configuration.nixalready hashome-manager.users.soft = self.homeModules.darwin(line 231). Add the launchd agents to aaron's darwin config (configuration.nixor a darwin module). Remove theservices.syncthingblock frommodules/home/darwin.nix.Verify
nix build .#darwinConfigurations.aaron.system(or the appropriate aaron darwin build attr).syncthinglaunchd user agent is generated and the settings/devices matchlib/syncthing-settings.nix.Scope guard
Only darwin syncthing. The
.hushlogin+bgalias (also indarwin.nix) are a separate PR. Do not touch mpd/hyprlock/hypridle/prettier/teardown.