2023-11-08 21:27:47 +01:00
|
|
|
{ pkgs, lib, ... }:
|
|
|
|
let
|
|
|
|
anyOpt = default: lib.mkOption {
|
|
|
|
type = lib.types.anything;
|
|
|
|
inherit default;
|
|
|
|
};
|
|
|
|
|
|
|
|
testConfig = m:
|
|
|
|
let
|
|
|
|
cfg = (lib.evalModules {
|
|
|
|
specialArgs = { inherit pkgs; };
|
|
|
|
modules = [
|
|
|
|
{
|
|
|
|
options = {
|
|
|
|
systemd = anyOpt {};
|
|
|
|
services = anyOpt {};
|
|
|
|
};
|
|
|
|
}
|
2023-11-21 07:20:19 +01:00
|
|
|
../../modules/blocks/davfs.nix
|
2023-11-08 21:27:47 +01:00
|
|
|
m
|
|
|
|
];
|
|
|
|
}).config;
|
|
|
|
in {
|
|
|
|
inherit (cfg) systemd services;
|
|
|
|
};
|
|
|
|
in
|
|
|
|
{
|
|
|
|
testDavfsNoOptions = {
|
|
|
|
expected = {
|
|
|
|
services.davfs2.enable = false;
|
|
|
|
systemd.mounts = [];
|
|
|
|
};
|
|
|
|
expr = testConfig {};
|
|
|
|
};
|
|
|
|
}
|