mirror of
https://github.com/traxys/Nixfiles.git
synced 2026-02-24 15:50:59 +01:00
20 lines
387 B
Nix
20 lines
387 B
Nix
{
|
|
lib,
|
|
config,
|
|
...
|
|
}:
|
|
with lib; {
|
|
options = {
|
|
commands = mkOption {
|
|
type = types.attrsOf types.str;
|
|
default = {};
|
|
description = "Extra commands to be created";
|
|
};
|
|
};
|
|
|
|
config.extraConfigVim = let
|
|
commands = cmds:
|
|
concatStringsSep "\n" (map (cmd: "command ${cmd} ${getAttr cmd cmds}") (attrNames cmds));
|
|
in
|
|
commands config.commands;
|
|
}
|