forked from DGNum/infrastructure
fix(modules/dgn-records): Add enable option
This commit is contained in:
parent
1a05ea3a9a
commit
c0435e694d
1 changed files with 20 additions and 8 deletions
|
@ -1,13 +1,25 @@
|
|||
{ config, ... }:
|
||||
{ config, lib, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
|
||||
cfg = config.dgn-records;
|
||||
in
|
||||
|
||||
{
|
||||
services.arkheon.record = {
|
||||
enable = true;
|
||||
|
||||
tokenFile = config.age.secrets."__arkheon-token_file".path;
|
||||
|
||||
url = "https://arkheon.dgnum.eu";
|
||||
options.dgn-records.enable = mkEnableOption "Arkheon deployment recording." // {
|
||||
default = true;
|
||||
};
|
||||
|
||||
age-secrets.sources = [ ./. ];
|
||||
config = mkIf cfg.enable {
|
||||
services.arkheon.record = {
|
||||
enable = true;
|
||||
|
||||
tokenFile = config.age.secrets."__arkheon-token_file".path;
|
||||
|
||||
url = "https://arkheon.dgnum.eu";
|
||||
};
|
||||
|
||||
age-secrets.sources = [ ./. ];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue