Skip to content

Commit

Permalink
modules/filetype: code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
GaetanLepage committed Dec 9, 2023
1 parent 1f652b6 commit 430c8f6
Showing 1 changed file with 19 additions and 16 deletions.
35 changes: 19 additions & 16 deletions modules/filetype.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 ''
Expand Down

0 comments on commit 430c8f6

Please sign in to comment.