at master 598 B view raw
1{ 2 lib, 3 pkgs, 4 config, 5 ... 6}: 7 8let 9 cfg = config.services.libeufin; 10 settingsFormat = pkgs.formats.ini { }; 11 configFile = settingsFormat.generate "generated-libeufin.conf" cfg.settings; 12in 13 14{ 15 options.services.libeufin = { 16 settings = lib.mkOption { 17 description = "Global configuration options for the libeufin bank system config file."; 18 type = lib.types.submodule { freeformType = settingsFormat.type; }; 19 default = { }; 20 }; 21 }; 22 23 config = lib.mkIf (cfg.bank.enable || cfg.nexus.enable) { 24 environment.etc."libeufin/libeufin.conf".source = configFile; 25 }; 26}