flake/modules: remove redundant lib calls

This commit is contained in:
raf 2024-04-20 23:48:15 +03:00
parent e982955540
commit 8ca0760b01
No known key found for this signature in database
GPG key ID: 02D1DD3FA08B6B29
2 changed files with 6 additions and 6 deletions

View file

@ -6,7 +6,7 @@ packages: inputs: {
... ...
}: let }: let
inherit (lib) maintainers; inherit (lib) maintainers;
inherit (lib.modules) mkIf mkMerge; inherit (lib.modules) mkIf;
inherit (lib.lists) optionals; inherit (lib.lists) optionals;
inherit (lib.options) mkOption mkEnableOption literalExpression; inherit (lib.options) mkOption mkEnableOption literalExpression;
inherit (lib.types) attrsOf anything bool; inherit (lib.types) attrsOf anything bool;
@ -75,10 +75,10 @@ in {
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
programs.neovim-flake.finalPackage = neovimConfigured.neovim-wrapped; programs.neovim-flake.finalPackage = neovimConfigured.neovim;
home = { home = {
sessionVariables.EDITOR = mkIf cfg.defaultEditor (lib.mkOverride 900 "nvim"); sessionVariables = mkIf cfg.defaultEditor {EDITOR = "nvim";};
packages = packages =
[cfg.finalPackage] [cfg.finalPackage]
++ optionals cfg.enableManpages packages.${pkgs.stdenv.system}.docs-manpages; ++ optionals cfg.enableManpages packages.${pkgs.stdenv.system}.docs-manpages;

View file

@ -6,7 +6,7 @@ packages: inputs: {
... ...
}: let }: let
inherit (lib) maintainers; inherit (lib) maintainers;
inherit (lib.modules) mkIf mkMerge; inherit (lib.modules) mkIf mkOverride;
inherit (lib.lists) optionals; inherit (lib.lists) optionals;
inherit (lib.options) mkOption mkEnableOption literalExpression; inherit (lib.options) mkOption mkEnableOption literalExpression;
inherit (lib.types) attrsOf anything bool; inherit (lib.types) attrsOf anything bool;
@ -75,10 +75,10 @@ in {
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
programs.neovim-flake.finalPackage = neovimConfigured.neovim-wrapped; programs.neovim-flake.finalPackage = neovimConfigured.neovim;
environment = { environment = {
variables.EDITOR = mkIf cfg.defaultEditor (lib.mkOverride 900 "nvim"); variables.EDITOR = mkIf cfg.defaultEditor (mkOverride 900 "nvim");
systemPackages = systemPackages =
[cfg.finalPackage] [cfg.finalPackage]
++ optionals cfg.enableManpages packages.${pkgs.stdenv.system}.docs-manpages; ++ optionals cfg.enableManpages packages.${pkgs.stdenv.system}.docs-manpages;