mirror of
https://git.pvv.ntnu.no/Drift/pvv-nixos-config.git
synced 2025-01-31 14:54:53 +01:00
30 lines
665 B
Nix
30 lines
665 B
Nix
|
{
|
||
|
lib,
|
||
|
pkgs,
|
||
|
config,
|
||
|
...
|
||
|
}:
|
||
|
|
||
|
let
|
||
|
cfg = config.services.libeufin;
|
||
|
settingsFormat = pkgs.formats.ini { };
|
||
|
in
|
||
|
|
||
|
{
|
||
|
options.services.libeufin = {
|
||
|
configFile = lib.mkOption {
|
||
|
internal = true;
|
||
|
default = settingsFormat.generate "generated-libeufin.conf" cfg.settings;
|
||
|
};
|
||
|
settings = lib.mkOption {
|
||
|
description = "Global configuration options for the libeufin bank system config file.";
|
||
|
type = lib.types.submodule { freeformType = settingsFormat.type; };
|
||
|
default = { };
|
||
|
};
|
||
|
};
|
||
|
|
||
|
config = lib.mkIf (cfg.bank.enable || cfg.nexus.enable) {
|
||
|
environment.etc."libeufin/libeufin.conf".source = cfg.configFile;
|
||
|
};
|
||
|
}
|