fork/home-manager

git clone https://git.julia.blue/fork/home-manager

Robert HelgessonMerge PR #421575790441

master
732 B36 linesraw
1{ config, lib, pkgs, ... }:
2
3with lib;
4
5let
6
7  cfg = config.programs.vim-vint;
8
9  yamlFormat = pkgs.formats.yaml { };
10
11in {
12  meta.maintainers = [ maintainers.tomodachi94 ];
13
14  options = {
15    programs.vim-vint = {
16      enable = mkEnableOption "the Vint linter for Vimscript";
17      package = mkPackageOption pkgs "vim-vint" { };
18
19      settings = mkOption {
20        type = yamlFormat.type;
21        default = { };
22        description = ''
23          Configuration written to
24          {file}`$XDG_CONFIG_HOME/.vintrc.yaml`
25        '';
26      };
27    };
28  };
29
30  config = mkIf cfg.enable {
31    home.packages = [ cfg.package ];
32
33    xdg.configFile.".vintrc.yaml".source =
34      yamlFormat.generate "vim-vint-config" cfg.settings;
35  };
36}