eae5eade56
I want to show how composable this project is. For example, you could just use the Authelia module to add SSO to any service, not just those provided here.
35 lines
656 B
Nix
35 lines
656 B
Nix
{ 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 {};
|
|
};
|
|
}
|
|
../../modules/blocks/davfs.nix
|
|
m
|
|
];
|
|
}).config;
|
|
in {
|
|
inherit (cfg) systemd services;
|
|
};
|
|
in
|
|
{
|
|
testDavfsNoOptions = {
|
|
expected = {
|
|
services.davfs2.enable = false;
|
|
systemd.mounts = [];
|
|
};
|
|
expr = testConfig {};
|
|
};
|
|
}
|