mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-22 13:20:44 +00:00
flake/modules: add finalPackage akin to nixos' neovim module
This commit is contained in:
parent
8c4f32645b
commit
c53c8311fc
2 changed files with 14 additions and 10 deletions
|
@ -13,7 +13,7 @@ packages: inputs: {
|
||||||
cfg = config.programs.neovim-flake;
|
cfg = config.programs.neovim-flake;
|
||||||
inherit (import ../../configuration.nix inputs) neovimConfiguration;
|
inherit (import ../../configuration.nix inputs) neovimConfiguration;
|
||||||
|
|
||||||
builtPackage = neovimConfiguration {
|
neovimConfigured = neovimConfiguration {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
modules = [cfg.settings];
|
modules = [cfg.settings];
|
||||||
};
|
};
|
||||||
|
@ -23,10 +23,10 @@ in {
|
||||||
options.programs.neovim-flake = {
|
options.programs.neovim-flake = {
|
||||||
enable = mkEnableOption "neovim-flake, the extensible neovim-wrapper";
|
enable = mkEnableOption "neovim-flake, the extensible neovim-wrapper";
|
||||||
|
|
||||||
builtPackage = mkOption {
|
finalPackage = mkOption {
|
||||||
type = anything;
|
type = anything;
|
||||||
default = builtPackage;
|
visible = false;
|
||||||
internal = true;
|
readOnly = true;
|
||||||
description = ''
|
description = ''
|
||||||
The built neovim-flake package, wrapped with the user's configuration.
|
The built neovim-flake package, wrapped with the user's configuration.
|
||||||
'';
|
'';
|
||||||
|
@ -57,6 +57,8 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home.packages = [builtPackage];
|
home.packages = [cfg.finalPackage];
|
||||||
|
|
||||||
|
programs.neovim-flake.finalPackage = neovimConfigured.neovim;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ packages: inputs: {
|
||||||
cfg = config.programs.neovim-flake;
|
cfg = config.programs.neovim-flake;
|
||||||
inherit (import ../../configuration.nix inputs) neovimConfiguration;
|
inherit (import ../../configuration.nix inputs) neovimConfiguration;
|
||||||
|
|
||||||
builtPackage = neovimConfiguration {
|
neovimConfigured = neovimConfiguration {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
modules = [cfg.settings];
|
modules = [cfg.settings];
|
||||||
};
|
};
|
||||||
|
@ -23,10 +23,10 @@ in {
|
||||||
options.programs.neovim-flake = {
|
options.programs.neovim-flake = {
|
||||||
enable = mkEnableOption "neovim-flake, the extensible neovim-wrapper";
|
enable = mkEnableOption "neovim-flake, the extensible neovim-wrapper";
|
||||||
|
|
||||||
builtPackage = mkOption {
|
finalPackage = mkOption {
|
||||||
type = anything;
|
type = anything;
|
||||||
default = builtPackage;
|
visible = false;
|
||||||
internal = true;
|
readOnly = true;
|
||||||
description = ''
|
description = ''
|
||||||
The built neovim-flake package, wrapped with the user's configuration.
|
The built neovim-flake package, wrapped with the user's configuration.
|
||||||
'';
|
'';
|
||||||
|
@ -57,6 +57,8 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
environment.systemPackages = [builtPackage];
|
environment.systemPackages = [cfg.finalPackage];
|
||||||
|
|
||||||
|
programs.neovim-flake.finalPackage = neovimConfigured.neovim;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue