Commit graph

36 commits

Author SHA1 Message Date
Austin Horstman
165228b0ef launchd: restore gui domain defaults
Some checks are pending
/ triage (push) Waiting to run
GitHub Pages / publish (ubuntu-latest) (push) Waiting to run
User-domain agents are not rediscovered from the user LaunchAgents directory after reboot. Let built-in agents inherit the GUI default while keeping explicit user-domain configuration available.
2026-07-15 10:29:26 -05:00
Austin Horstman
a9232b8b10 launchd: use user domain for background agents
Move non-graphical Darwin services out of the GUI launchd domain so they can be managed from non-Aqua contexts such as SSH sessions.
2026-06-24 20:38:38 -05:00
jiezhuzzz
93b932fdbb rclone: extend mount unit PATH for non-NixOS fusermount
The mount user-service set Environment=PATH=/run/wrappers/bin, which is
a NixOS-only directory. On standalone home-manager hosts running other
Linux distros the directory does not exist, and because Environment=PATH=
replaces systemd's inherited PATH, the resulting unit has no usable PATH
at all.

libfuse falls back to a hardcoded /usr/bin/fusermount3 lookup so the
helper still executes, but the eventual mount(2) syscall returns EPERM,
likely because libfuse's internal system()/popen() invocations into
mount.fuse3 fail without /bin/sh and friends on PATH. Empirically, the
EPERM goes away the moment PATH is widened to include standard Linux
locations.

Enumerate /run/wrappers/bin and /run/current-system/sw/bin alongside the
usual /usr/{local/,}{s,}bin and /{s,}bin entries. Path search order is
preserved, so the NixOS wrappers still win where they exist, and
fusermount/fusermount3 is found at /usr/bin on Ubuntu/Debian/Fedora and
similar distros.
2026-05-19 12:37:34 -05:00
jiezhuzzz
fd272ce76e rclone: make requiresUnit read-only on non-systemd platforms
The option only feeds the systemd config-install service; on Darwin the
launchd agent ignores it, and on any other non-Linux platform the
option is similarly inert. Marking it readOnly with a null default
when systemd is unavailable prevents users from setting a value that
would silently do nothing, and surfaces the platform constraint in the
option itself rather than only in the description.
2026-05-19 12:37:34 -05:00
jiezhuzzz
8da35b6f14 rclone: drop unused sidecarType arg from sidecar builders
mkLaunchdSidecar uses a strict argument pattern that did not include
sidecarType, but the call site was passing it via inherit, breaking
evaluation of any darwin config that defined a mount or serve sidecar.

Since isMount already encodes the same information as
sidecarType == "mounts", remove sidecarType from the call site and
replace the two systemd uses with isMount / !isMount.
2026-05-19 12:37:34 -05:00
jiezhuzzz
6cfa655a20 rclone: clarify secrets description for both Linux and Darwin 2026-05-19 12:37:34 -05:00
jiezhuzzz
2f578ccd99 rclone: document macFUSE requirement and Darwin requiresUnit semantics 2026-05-19 12:37:34 -05:00
jiezhuzzz
13e1296711 rclone: add launchd mount/serve sidecar agents for Darwin
Adds the Darwin launchd mount/serve sidecar agents together with the
mount sidecar generation test.
2026-05-19 12:37:34 -05:00
jiezhuzzz
d4e015754e rclone: add launchd config agent for Darwin
Renders rclone.conf at login on macOS using the same secret-injection
script as the Linux systemd path. Retries on failure via
KeepAlive.Crashed=true.
2026-05-19 12:37:34 -05:00
jiezhuzzz
2b6c692c95 rclone: add rclone-sidecar-wrapper derivation
Bash helper that waits up to 5 minutes for rclone.conf to exist
before exec'ing its arguments. Will be wired into the launchd
sidecar agents in a follow-up commit.
2026-05-19 12:37:34 -05:00
jiezhuzzz
f99cd3d4f4 rclone: lift config-install script to a named derivation
Prepares the script for reuse by the launchd config agent. No
behavioral change: the systemd unit references the same script
content via lib.getExe.
2026-05-19 12:37:34 -05:00
jiezhuzzz
1060e2e170 rclone: parameterize mkRcloneSidecars over a value builder
Pure refactor in preparation for adding a launchd value builder.
The systemd output is unchanged.
2026-05-19 12:37:34 -05:00
jiezhuzzz
5df5159c78 rclone: default cache-dir to xdg.cacheHome on Darwin
Linux keeps the systemd %C/rclone cache-dir specifier. Darwin has no
%C specifier, so the cache-dir default there is
${config.xdg.cacheHome}/rclone. Behaviour on Linux is unchanged.
2026-05-19 12:37:34 -05:00
Meow
b931102804 rclone: add serve options 2026-05-02 22:57:24 -05:00
Meow
3cea83bf84 rclone: make mounts wait for config 2026-03-23 13:53:26 -05:00
cethien
a5b92cc213 rclone: added sanitazion in systemd service name
- replaces $ and spaces
- escapes mount path
2026-02-26 21:02:03 -06:00
Jess
2954aa2944 rclone: add autoMount option 2026-01-18 23:02:16 -06:00
Jess
9e07a347f4 rclone: respect mounts enable option 2026-01-18 23:02:16 -06:00
Austin Horstman
312c4fe0bb rclone: migrate to lib.cli.toCommandLineShellGNU
Replace deprecated lib.cli.toGNUCommandLineShell with
lib.cli.toCommandLineShellGNU. This changes the behavior but `rclone`
supports the `=` separator for its flags.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2026-01-10 11:29:16 -05:00
Aguirre Matteo
df7bac2b2b rclone: change cache directory to $XDG_CACHE_HOME/rclone 2025-12-05 00:33:32 +01:00
Austin Horstman
0b44044694 treewide: meta.maintainers at top
Just make it consistent throughout codebase and easier to find
maintainers for a module.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-11-22 14:51:05 -06:00
Robert Radestock
371608e69c
rclone: add option to set log-level (#8105)
Add an option to set rclone's log-level per mount:
programs.rclone.remotes.<name>.mounts.<name>.logLevel = "DEBUG";
If no value is set, it'll use rclone's implicit default ("NOTICE")

Previously, the debug log-level got enforced (via "-vv"),
which caused noisy logs, and there was no easy way to change that.

Note: rclone global-flags can't be configured in the config file,
so this uses the environment variable approach.

references:
- https://rclone.org/docs/#logging
- https://rclone.org/docs/#v-vv-verbose

If no value is given, use the implicit default of rclone instead of redefining it through the options
2025-11-02 21:52:56 -06:00
Kylie McClain
3c97248d6f
rclone: check existence of file rather than using cat (#7799)
It's not really clear why this was done in the first place, and
furthermore it means that the secrets have been getting printed to
stdout and appear on the system journal as a result.
2025-09-10 13:27:41 +02:00
Kylie McClain
e44549074a programs.rclone: fix injecting secret when value begins with "-" 2025-08-31 09:26:13 -05:00
Kylie McClain
4896177e2c programs.rclone: set Service.Type=notify
According to <https://rclone.org/commands/rclone_mount/#systemd>,
it should be possible to set `Type=notify` to ensure that `rclone`
is not marked as started until the mountpoint has actually been
successfully mounted.
2025-08-31 09:26:13 -05:00
Kylie McClain
feba2b2daa programs.rclone: fix typo 2025-08-31 09:26:13 -05:00
Jess
3001400e9f rclone: move activation script to systemd service
Fixes #7577
This lets us better express activation order dependencies on secret
provisioners that run as systemd services
2025-08-21 16:02:50 -05:00
Austin Horstman
b8bb556ce5 maintainers: remove duplicate HM entries
We can remove duplicate entries and redirect to the nixpkgs entry.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-07-04 09:20:48 -05:00
Austin Horstman
86402a17b6 treewide: flatten single file modules
Some files don't need nesting and can be root level again to reduce
conflicts with other PRs.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-06-23 16:20:26 -05:00
Austin Horstman
4fca600cb1 treewide: implement auto importing for modules
Reduce maintenance burden and increase efficiency by automatically
importing modules following a specific convention.

Co-authored-by: awwpotato <awwpotato@voidq.com>
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-06-22 23:58:37 -05:00
Jess
dbc90cc3ae
rclone: declarative mounts (#7060) 2025-05-15 13:33:51 -05:00
octvs
1ad1232399
rclone: make secret injection non-interactive (#6919)
Pass `--non-interactive` flag to `rclone config update` calls so that an
incomplete config is not used, resulting in failure on some remotes,
for example gdrive.
2025-04-28 21:38:55 -05:00
Austin Horstman
cba2f9ce95 treewide: reformat nixfmt-rfc-style
Reformat repository using new nixfmt-rfc-style.
2025-04-08 08:50:05 -07:00
Jess
7853236fae rclone: ensure remotes have a type field 2025-03-22 21:52:23 -05:00
Jess
7a08b8c898 rclone: correctly escape whitespace in secrets 2025-03-22 21:52:23 -05:00
Jess
eb5d59dac9 rclone: add module
Rclone is a command-line program to manage files on cloud storage, it
also featrues support for FUSE mounts.

"Users call rclone *"The Swiss army knife of cloud storage"* and
*"Technology indistinguishable from magic"*" - https://rclone.org/

This module manages the configuration of rclone remotes.
2025-03-19 13:49:44 -05:00