From 430c8f672bcaf811aaae8b7856fcca481b7064e5 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Sat, 9 Dec 2023 20:34:24 +0100 Subject: [PATCH] modules/filetype: code formatting --- modules/filetype.nix | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/modules/filetype.nix b/modules/filetype.nix index 5d6c3021..e594e129 100644 --- a/modules/filetype.nix +++ b/modules/filetype.nix @@ -5,22 +5,25 @@ ... }: with lib; let - filetypeDefinition = helpers.mkNullOrOption (types.attrsOf ( - types.oneOf [ - # Raw filetype - types.str - # Function to set the filetype - helpers.rawType - # ["filetype" {priority = xx;}] - (types.listOf (types.either types.str (types.submodule { - options = { - priority = mkOption { - type = types.int; - }; - }; - }))) - ] - )); + filetypeDefinition = + helpers.mkNullOrOption + (with types; + attrsOf ( + oneOf [ + # Raw filetype + str + # Function to set the filetype + helpers.rawType + # ["filetype" {priority = xx;}] + (listOf (either str (submodule { + options = { + priority = mkOption { + type = int; + }; + }; + }))) + ] + )); in { options.filetype = helpers.mkCompositeOption ''