mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-02-07 12:19:07 +00:00
flake-parts/setups: add a branch option for NixVim instance submodule
This commit is contained in:
parent
9e3a95ba24
commit
8f520fa2ad
@ -151,7 +151,7 @@ let
|
|||||||
(lib.mkIf (config.nixvim.instance != null)
|
(lib.mkIf (config.nixvim.instance != null)
|
||||||
({ lib, ... }: {
|
({ lib, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
inputs.nixvim.homeManagerModules.nixvim
|
inputs.${config.nixvim.branch}.homeManagerModules.nixvim
|
||||||
];
|
];
|
||||||
|
|
||||||
config.programs.nixvim = { ... }: {
|
config.programs.nixvim = { ... }: {
|
||||||
|
@ -361,7 +361,7 @@ let
|
|||||||
setupConfig = config;
|
setupConfig = config;
|
||||||
in
|
in
|
||||||
{ lib, ... }: {
|
{ lib, ... }: {
|
||||||
imports = [ inputs.nixvim.nixosModules.nixvim ];
|
imports = [ inputs.${config.nixvim.branch}.nixosModules.nixvim ];
|
||||||
|
|
||||||
programs.nixvim = { ... }: {
|
programs.nixvim = { ... }: {
|
||||||
enable = lib.mkDefault true;
|
enable = lib.mkDefault true;
|
||||||
|
@ -11,6 +11,22 @@
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
branch = lib.mkOption {
|
||||||
|
type = lib.types.nonEmptyStr;
|
||||||
|
default = "nixvim";
|
||||||
|
example = "nixvim-stable";
|
||||||
|
description = ''
|
||||||
|
The branch of NixVim to be used for the module.
|
||||||
|
|
||||||
|
::: {.tip}
|
||||||
|
A rule of thumb for properly setting up NixVim with the wider-scoped
|
||||||
|
environment is it should match the nixpkgs version of it. For example,
|
||||||
|
a NixOS system of `nixos-23.11` nixpkgs branch should be paired with a NixVim
|
||||||
|
branch of `nixos-23.11`.
|
||||||
|
:::
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
additionalModules = lib.mkOption {
|
additionalModules = lib.mkOption {
|
||||||
type = with lib.types; listOf raw;
|
type = with lib.types; listOf raw;
|
||||||
default = [ ];
|
default = [ ];
|
||||||
|
Loading…
Reference in New Issue
Block a user