1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-27 05:29:46 +01:00
home-manager/modules/programs/vim-vint.nix
Tomo ffc022b6a7
vim-vint: add module (#3604)
* vim-vint: add module

* vim-vint: add tests

* maintainers: add tomodachi94

* vim-vint: fix tests

---------

Co-authored-by: Naïm Favier <n@monade.li>
2023-02-05 11:12:28 +01:00

36 lines
745 B
Nix

{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.programs.vim-vint;
yamlFormat = pkgs.formats.yaml { };
in {
meta.maintainers = [ maintainers.tomodachi94 ];
options = {
programs.vim-vint = {
enable = mkEnableOption "the Vint linter for Vimscript";
package = mkPackageOption pkgs "vim-vint" { };
settings = mkOption {
type = yamlFormat.type;
default = { };
description = ''
Configuration written to
<filename>$XDG_CONFIG_HOME/.vintrc.yaml</filename>
'';
};
};
};
config = mkIf cfg.enable {
home.packages = [ cfg.package ];
xdg.configFile.".vintrc.yaml".source =
yamlFormat.generate "vim-vint-config" cfg.settings;
};
}