Skip to content

Commit

Permalink
test: nixvim flake-parts outputs & loaders.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lehmanator committed Mar 5, 2024
1 parent 79c5c10 commit 3a3a39f
Showing 1 changed file with 55 additions and 6 deletions.
61 changes: 55 additions & 6 deletions profiles/flakes/nixvim.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
{inputs, ...}: {
{inputs, ...}: let
#mkNixvim = inputs.nixvim.lib
inherit (inputs.haumea.lib) load loaders matchers transformers;
# Wrap profile "module" with enable option
#profile-wrapper = p: {inputs, config, lib, pkgs, ...}@args: let
# cfg = config.profile-${path};
# pcfg = (p args);
#in {
# imports = pcfg.imports;
# options.profile-${path} = pcfg.options // {
# enable = lib.mkEnableOption "profile-${path}";
# };
# config = lib.mkIf cfg.enable (pcfg.config // builtins.removeAttrs pcfg ["imports" "options" "config"]);
#};
in {
perSystem = {
config,
pkgs,
Expand All @@ -12,10 +26,45 @@
extraSpecialArgs = {inherit inputs;};
};
in {
checks.nixvim =
inputs.nixvim.lib.${pkgs.system}.check.mkTestDerivationFromNixvimModule nixvimModule;
packages.nvim =
inputs'.nixvim.legacyPackages.makeNixvimWithModule nixvimModule;
checks = {
#nixvim = inputs'.nixvim.lib.check.mkTestDerivationFromNixvimModule nixvimModule;
nixvim =
inputs.nixvim.lib.${system}.check.mkTestDerivationFromNixvimModule
nixvimModule;
};
packages = {
nvim = inputs'.nixvim.legacyPackages.makeNixvimWithModule nixvimModule;
};
};

flake = {
#lib = {
# mkNixvim = inputs'.nixvim.legacyPackages.makeNixvimWithModule nixvimModule;
#matchers.ignore-default = ext: f: {
# matches = file: !(inputs.nixpkgs.lib.hasSuffix "default.${ext}") && inputs.nixpkgs.lib.hasSuffix ".${ext}" file && inputs.nixpkgs.lib.stringLength file > (inputs.nixpkgs.lib.stringLength ext + 1);
# loader = f;
#};
#};
nixvimProfiles = {
default = ../nixvim;
languages = load {
src = ../nixvim/langs;
loader = loaders.verbatim;
#matcher = inputs.haumea.lib.matchers.nix;
};
plugins = load {
src = ../nixvim/plugins;
loader = loaders.verbatim;
};
colorschemes = load {
src = ../nixvim/colorschemes;
loader = loaders.verbatim;
};
};
nixvimModules = {
default = ../nixvim;
#profile-default = inputs.self.nixvimProfiles.default;
#builtins.attrNames inputs.self.nixvimProfiles
};
};
flake = {nixvimModules = {default = ../nixvim;};};
}

0 comments on commit 3a3a39f

Please sign in to comment.