diff options
Diffstat (limited to 'modules/by-name/nv/nvim/module.nix')
| -rw-r--r-- | modules/by-name/nv/nvim/module.nix | 127 |
1 files changed, 67 insertions, 60 deletions
diff --git a/modules/by-name/nv/nvim/module.nix b/modules/by-name/nv/nvim/module.nix index 17cc8dcc..66ba7ad6 100644 --- a/modules/by-name/nv/nvim/module.nix +++ b/modules/by-name/nv/nvim/module.nix @@ -21,18 +21,15 @@ useShards = false; baseDirectory = ./plgs; fileName = "default.nix"; + finalizeFunction = name: path: import path {inherit config lib pkgs extra_lib;}; }); -in { - imports = - [ - ./autocmds - ./clipboard - ./mappings - ./options - ./performance - ] - ++ plgs; + autocmds = import ./autocmds {inherit config;}; + clipboard = import ./clipboard {}; + mappings = import ./mappings {}; + options = import ./options {inherit config lib;}; + performance = import ./performance {}; +in { options.soispha.programs.nvim = { enable = lib.mkEnableOption "custom nvim config"; shell = lib.mkOption { @@ -41,62 +38,72 @@ in { }; }; - config = lib.mkIf cfg.enable { - soispha.services.unison.pathsToSync = [ - "~/.local/state/nvim" - ]; - vhack.persist.userDirectories.soispha = [ - ".local/state/nvim" - ]; + config = lib.mkIf cfg.enable ( + lib.mkMerge (plgs + ++ [ + autocmds + clipboard + mappings + options + performance + { + soispha.services.unison.pathsToSync = [ + "~/.local/state/nvim" + ]; + vhack.persist.userDirectories.soispha = [ + ".local/state/nvim" + ]; - home-manager.users.soispha = { - imports = [ - extra_modules.home.nixvim - ]; + home-manager.users.soispha = { + imports = [ + extra_modules.home.nixvim + ]; - home.sessionVariables = { - EDITOR = "nvim"; - VISUAL = "nvim"; - CODEEDITOR = "nvim"; - }; + home.sessionVariables = { + EDITOR = "nvim"; + VISUAL = "nvim"; + CODEEDITOR = "nvim"; + }; - programs.nixvim = { - enable = true; + programs.nixvim = { + enable = true; - # Use my global nixpkgs set, instead of constructing a separate one. - nixpkgs.useGlobalPackages = true; + # Use my global nixpkgs set, instead of constructing a separate one. + nixpkgs.useGlobalPackages = true; - # source: https://www.patorjk.com/software/taag/#p=display&f=ANSI%20Shadow&t=Neovim - extraConfigLuaPre = lib.mkBefore '' - --------------------------------------------------------------------------- - -- - -- ███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗ - -- ████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║ - -- ██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║ - -- ██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║ - -- ██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║ - -- ╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ - -- - --------------------------------------------------------------------------- - ''; + # source: https://www.patorjk.com/software/taag/#p=display&f=ANSI%20Shadow&t=Neovim + extraConfigLuaPre = lib.mkBefore '' + --------------------------------------------------------------------------- + -- + -- ███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗ + -- ████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║ + -- ██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║ + -- ██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║ + -- ██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║ + -- ╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ + -- + --------------------------------------------------------------------------- + ''; - extraPackages = [ - /* - These are mostly linters and formatters used for different file types. - Including them here is fine, as they are not necessarily-sync able to different people. - */ - # nix - pkgs.alejandra - pkgs.statix + extraPackages = [ + /* + These are mostly linters and formatters used for different file types. + Including them here is fine, as they are not necessarily-sync able to different people. + */ + # nix + pkgs.alejandra + pkgs.statix - # yaml - pkgs.yamllint + # yaml + pkgs.yamllint - # shell - pkgs.shellcheck - pkgs.shfmt - ]; - }; - }; - }; + # shell + pkgs.shellcheck + pkgs.shfmt + ]; + }; + }; + } + ]) + ); } |
