{ config, lib, pkgs, ... }: with lib; let cfg = config.grimmShared; in { options.grimmShared = { enable = mkEnableOption "grimm-shared-modules"; enableLocale = mkOption { type = types.bool; default = true; description = "Sets german units but english language"; }; }; config = with cfg; lib.mkIf (enable) { imports = [] ++ optionals cfg.enableLocale [./modules/localisation.nix] ; }; }