diff --git a/nixos/modules/services/networking/blocky.nix b/nixos/modules/services/networking/blocky.nix index d130e4433a6f..2cd6b28e1293 100644 --- a/nixos/modules/services/networking/blocky.nix +++ b/nixos/modules/services/networking/blocky.nix @@ -16,6 +16,10 @@ in package = lib.mkPackageOption pkgs "blocky" { }; + enableConfigCheck = lib.mkEnableOption "checking the config during build time" // { + default = true; + }; + settings = lib.mkOption { type = format.type; default = { }; @@ -80,6 +84,14 @@ in ]; }; }; + system.checks = lib.mkIf cfg.enableConfigCheck [ + (pkgs.runCommand "check-blocky-config" { } '' + ${lib.getExe cfg.package} --config ${configFile} validate && touch $out + '') + ]; }; - meta.maintainers = with lib.maintainers; [ paepcke ]; + meta.maintainers = with lib.maintainers; [ + paepcke + kuflierl + ]; }