mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-04-27 18:19:11 +00:00
flake-parts/setups/nixvim: add branch option
This commit is contained in:
parent
ef2927ee32
commit
4590be0d3d
@ -11,8 +11,8 @@ let
|
|||||||
cfg = config.setups.nixvim;
|
cfg = config.setups.nixvim;
|
||||||
nixvimModules = ../../nixvim;
|
nixvimModules = ../../nixvim;
|
||||||
|
|
||||||
mkNixvimConfig = { system, pkgs, modules ? [ ] }:
|
mkNixvimConfig = { system, pkgs, nixvimBranch ? "nixvim", modules ? [ ] }:
|
||||||
inputs.nixvim.legacyPackages.${system}.makeNixvimWithModule {
|
inputs.${nixvimBranch}.legacyPackages.${system}.makeNixvimWithModule {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
module = {
|
module = {
|
||||||
imports = modules;
|
imports = modules;
|
||||||
@ -47,6 +47,15 @@ let
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nixvimBranch = lib.mkOption {
|
||||||
|
type = lib.types.nonEmptyStr;
|
||||||
|
default = "nixvim";
|
||||||
|
example = "nixvim-unstable";
|
||||||
|
description = ''
|
||||||
|
The NixVim branch to be used for the configuration.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
neovimPackages = lib.mkOption {
|
neovimPackages = lib.mkOption {
|
||||||
type = with lib.types; functionTo (listOf package);
|
type = with lib.types; functionTo (listOf package);
|
||||||
default = pkgs: with pkgs; [ neovim ];
|
default = pkgs: with pkgs; [ neovim ];
|
||||||
@ -140,6 +149,7 @@ in
|
|||||||
"${name}-${nixpkgsBranch}-${neovimPkg.name}"
|
"${name}-${nixpkgsBranch}-${neovimPkg.name}"
|
||||||
(mkNixvimConfig {
|
(mkNixvimConfig {
|
||||||
inherit system pkgs;
|
inherit system pkgs;
|
||||||
|
inherit (metadata) nixvimBranch;
|
||||||
modules =
|
modules =
|
||||||
cfg.sharedModules
|
cfg.sharedModules
|
||||||
++ cfg.standaloneConfigModules
|
++ cfg.standaloneConfigModules
|
||||||
|
Loading…
Reference in New Issue
Block a user