Skip to content

Commit

Permalink
treewide: migrate to new standalone nixvim design
Browse files Browse the repository at this point in the history
  • Loading branch information
khaneliman committed Jan 20, 2025
1 parent f7a2a0c commit ca20fce
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 43 deletions.
18 changes: 0 additions & 18 deletions flake/checks.nix

This file was deleted.

5 changes: 1 addition & 4 deletions flake/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,16 @@
}:
{
imports = [
./checks.nix
./devshell.nix
./git-hooks.nix
./nixvim.nix
./overlays.nix
./pkgs-by-name.nix
./treefmt.nix
];

perSystem =
{
self',
system,
...
}:
Expand All @@ -26,7 +25,5 @@
overlays = lib.attrValues self.overlays;
config.allowUnfree = true;
};

packages.default = self'.packages.khanelivim;
};
}
49 changes: 49 additions & 0 deletions flake/nixvim.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{ inputs, self, ... }:
{
imports = [
inputs.nixvim.flakeModules.default
];

nixvim =
let
nameFunction = name: name;
in
{
packages = {
enable = true;
inherit nameFunction;
};
checks = {
enable = true;
inherit nameFunction;
};
};

flake.nixvimModules = {
default = ../modules/nixvim;
};

perSystem =
{ config, system, ... }:
{
nixvimConfigurations = {
khanelivim = inputs.nixvim.lib.evalNixvim {
inherit system;

extraSpecialArgs = {
inherit inputs system;
inherit (inputs) self;
};

modules = [
self.nixvimModules.default
];
};
};

packages = {
# Lets you start nixvim using `nix run`
default = config.packages.khanelivim;
};
};
}
8 changes: 7 additions & 1 deletion modules/nixvim/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, ... }:
{ lib, self, ... }:
let
inherit (builtins) readDir;
inherit (lib.attrsets) foldlAttrs;
Expand All @@ -22,4 +22,10 @@ in
./performance.nix
./usercommands.nix
];

nixpkgs = {
overlays = lib.attrValues self.overlays;
config.allowUnfree = true;
};

}
20 changes: 0 additions & 20 deletions packages/khanelivim/package.nix

This file was deleted.

0 comments on commit ca20fce

Please sign in to comment.