rclone tests: cross-platform basic-configuration gating

Lets basic-configuration run on both Linux and Darwin with
platform-specific assertions. Mount/serve generation tests stay
Linux-only for now.
This commit is contained in:
jiezhuzzz
2026-05-05 21:33:33 -05:00
committed by Austin Horstman
parent 2b6c692c95
commit fd3a68e640
2 changed files with 24 additions and 11 deletions

View File

@@ -1,11 +1,22 @@
_: {
programs.rclone = {
enable = true;
remotes.myremote.config.type = "local";
};
{ lib, pkgs, ... }:
# make sure config service exists
nmt.script = ''
assertFileExists home-files/.config/systemd/user/rclone-config.service
'';
}
lib.mkMerge [
{
programs.rclone = {
enable = true;
remotes.myremote.config.type = "local";
};
}
(lib.mkIf pkgs.stdenv.isLinux {
nmt.script = ''
assertFileExists home-files/.config/systemd/user/rclone-config.service
'';
})
(lib.mkIf pkgs.stdenv.isDarwin {
nmt.script = ''
assertFileExists LaunchAgents/org.nix-community.home.rclone-config.plist
'';
})
]

View File

@@ -1,6 +1,8 @@
{ lib, pkgs, ... }:
lib.optionalAttrs pkgs.stdenv.hostPlatform.isLinux {
{
rclone-basic-configuration = ./basic-configuration.nix;
}
// lib.optionalAttrs pkgs.stdenv.hostPlatform.isLinux {
rclone-mount-service-generation = ./mount-service-generation.nix;
rclone-serve-service-generation = ./serve-service-generation.nix;
}