diff --git a/flake/checks.nix b/flake/checks.nix deleted file mode 100644 index 7fb1887..0000000 --- a/flake/checks.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ inputs, self, ... }: -{ - perSystem = - { pkgs, system, ... }: - { - checks.nixvim = inputs.nixvim.lib.${system}.check.mkTestDerivationFromNixvimModule { - inherit pkgs; - - extraSpecialArgs = { - inherit self system inputs; - }; - - module = { - imports = [ ../modules/nixvim ]; - }; - }; - }; -} diff --git a/flake/default.nix b/flake/default.nix index 91f0895..d8c88a9 100644 --- a/flake/default.nix +++ b/flake/default.nix @@ -6,9 +6,9 @@ }: { imports = [ - ./checks.nix ./devshell.nix ./git-hooks.nix + ./nixvim.nix ./overlays.nix ./pkgs-by-name.nix ./treefmt.nix @@ -16,7 +16,7 @@ perSystem = { - self', + config, system, ... }: @@ -27,6 +27,6 @@ config.allowUnfree = true; }; - packages.default = self'.packages.khanelivim; + packages.default = config.packages.khanelivim; }; } diff --git a/flake/nixvim.nix b/flake/nixvim.nix new file mode 100644 index 0000000..ca06939 --- /dev/null +++ b/flake/nixvim.nix @@ -0,0 +1,44 @@ +{ + inputs, + lib, + self, + ... +}: +{ + imports = [ + inputs.nixvim.flakeModules.default + ]; + + nixvim = { + packages = { + enable = true; + nameFunction = lib.id; + }; + checks = { + enable = true; + nameFunction = lib.id; + }; + }; + + flake.nixvimModules = { + default = ../modules/nixvim; + }; + + perSystem = + { system, ... }: + { + nixvimConfigurations = { + khanelivim = inputs.nixvim.lib.evalNixvim { + inherit system; + + extraSpecialArgs = { + inherit inputs system self; + }; + + modules = [ + self.nixvimModules.default + ]; + }; + }; + }; +} diff --git a/modules/nixvim/default.nix b/modules/nixvim/default.nix index a2bb1be..dfa7f50 100644 --- a/modules/nixvim/default.nix +++ b/modules/nixvim/default.nix @@ -1,4 +1,4 @@ -{ lib, ... }: +{ lib, self, ... }: let inherit (builtins) readDir; inherit (lib.attrsets) foldlAttrs; @@ -22,4 +22,9 @@ in ./performance.nix ./usercommands.nix ]; + + nixpkgs = { + overlays = lib.attrValues self.overlays; + config.allowUnfree = true; + }; } diff --git a/packages/khanelivim/package.nix b/packages/khanelivim/package.nix deleted file mode 100644 index fa1e71a..0000000 --- a/packages/khanelivim/package.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ - inputs, - pkgs, - system, - ... -}: -inputs.nixvim.legacyPackages.${system}.makeNixvimWithModule { - inherit pkgs; - - extraSpecialArgs = { - inherit inputs system; - inherit (inputs) self; - }; - - module = { - imports = [ ../../modules/nixvim ]; - - nixpkgs.pkgs = pkgs; - }; -}