diff --git a/common/hm/programs/helix/default.nix b/common/hm/programs/helix/default.nix index 4fd76ec..e4dc75d 100644 --- a/common/hm/programs/helix/default.nix +++ b/common/hm/programs/helix/default.nix @@ -7,6 +7,7 @@ }: { imports = [ + ./dnsZone.nix ./fusesoc.nix ./haskell.nix ./helix.nix diff --git a/common/hm/programs/helix/dnsZone.nix b/common/hm/programs/helix/dnsZone.nix new file mode 100644 index 0000000..4637bc9 --- /dev/null +++ b/common/hm/programs/helix/dnsZone.nix @@ -0,0 +1,40 @@ +{ + osConfig, + config, + pkgs, + lib, + ... +}: +{ + programs.helix = { + languages = { + grammar = [ + { + name = "dns-zone"; + source.path = pkgs.fetchFromGitHub { + owner = "goulinkh"; + repo = "tree-sitter-dns-zone"; + tag = "v0.1.0"; + hash = "sha256-Whey5T0P+2jhliLc7odisVj2fiUiXBHXnV6OCNEHmJU="; + }; + } + ]; + language = [ + { + name = "dns-zone"; + scope = "source.zone"; + injection-regex = "zone"; + file-types = [ "zone" ]; + comment-tokens = [ ";" ]; + indent = { + tab-width = 4; + unit = " "; + }; + formatter = { + command = lib.getExe pkgs.dnsfmt; + }; + } + ]; + }; + }; +}