mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-26 15:06:45 +00:00
refactor: prepare for home-manager module & cleanup
This commit is contained in:
parent
89be2b9d37
commit
4874df92b6
1 changed files with 72 additions and 56 deletions
128
flake.nix
128
flake.nix
|
@ -189,7 +189,7 @@
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
lib = {
|
lib = {
|
||||||
nvim = (import ./modules/lib/stdlib-extended.nix nixpkgs.lib).nvim;
|
nvim = (import ./lib/stdlib-extended.nix nixpkgs.lib).nvim;
|
||||||
inherit neovimConfiguration;
|
inherit neovimConfiguration;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -200,69 +200,85 @@
|
||||||
neovim-tidal = buildPkg prev [tidalConfig];
|
neovim-tidal = buildPkg prev [tidalConfig];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
// (flake-utils.lib.eachDefaultSystem (system: let
|
// (flake-utils.lib.eachDefaultSystem (
|
||||||
pkgs = import nixpkgs {
|
system: let
|
||||||
inherit system;
|
pkgs = import nixpkgs {
|
||||||
overlays = [
|
inherit system;
|
||||||
inputs.tidalcycles.overlays.default
|
overlays = [
|
||||||
(final: prev: {
|
inputs.tidalcycles.overlays.default
|
||||||
rnix-lsp = inputs.rnix-lsp.defaultPackage.${system};
|
(final: prev: {
|
||||||
nil = inputs.nil.packages.${system}.default;
|
rnix-lsp = inputs.rnix-lsp.defaultPackage.${system};
|
||||||
})
|
nil = inputs.nil.packages.${system}.default;
|
||||||
];
|
})
|
||||||
};
|
];
|
||||||
|
};
|
||||||
|
|
||||||
docs = import ./docs {
|
docs = import ./docs {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
nmdSrc = inputs.nmd;
|
nmdSrc = inputs.nmd;
|
||||||
};
|
};
|
||||||
|
|
||||||
tidalPkg = buildPkg pkgs [tidalConfig];
|
# Available Configurations
|
||||||
nixPkg = buildPkg pkgs [nixConfig];
|
tidalPkg = buildPkg pkgs [tidalConfig];
|
||||||
maximalPkg = buildPkg pkgs [maximalConfig];
|
nixPkg = buildPkg pkgs [nixConfig];
|
||||||
in {
|
maximalPkg = buildPkg pkgs [maximalConfig];
|
||||||
apps =
|
in {
|
||||||
rec {
|
apps =
|
||||||
nix = {
|
rec {
|
||||||
type = "app";
|
nix = {
|
||||||
program = nvimBin nixPkg;
|
|
||||||
};
|
|
||||||
maximal = {
|
|
||||||
type = "app";
|
|
||||||
program = nvimBin maximalPkg;
|
|
||||||
};
|
|
||||||
default = nix;
|
|
||||||
}
|
|
||||||
// (
|
|
||||||
if !(builtins.elem system ["aarch64-darwin" "x86_64-darwin"])
|
|
||||||
then {
|
|
||||||
tidal = {
|
|
||||||
type = "app";
|
type = "app";
|
||||||
program = nvimBin tidalPkg;
|
program = nvimBin nixPkg;
|
||||||
};
|
};
|
||||||
|
maximal = {
|
||||||
|
type = "app";
|
||||||
|
program = nvimBin maximalPkg;
|
||||||
|
};
|
||||||
|
default = nix;
|
||||||
}
|
}
|
||||||
else {}
|
// (
|
||||||
);
|
if !(builtins.elem system ["aarch64-darwin" "x86_64-darwin"])
|
||||||
|
then {
|
||||||
|
tidal = {
|
||||||
|
type = "app";
|
||||||
|
program = nvimBin tidalPkg;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else {}
|
||||||
|
);
|
||||||
|
|
||||||
devShells.default = pkgs.mkShell {nativeBuildInputs = [nixPkg];};
|
devShells.default = pkgs.mkShell {nativeBuildInputs = [nixPkg];};
|
||||||
|
|
||||||
packages =
|
packages =
|
||||||
{
|
{
|
||||||
docs-html = docs.manual.html;
|
# Documentation
|
||||||
docs-manpages = docs.manPages;
|
docs = docs.manual.html;
|
||||||
docs-json = docs.options.json;
|
docs-html = docs.manual.html;
|
||||||
default = nixPkg;
|
docs-manpages = docs.manPages;
|
||||||
nix = nixPkg;
|
docs-json = docs.options.json;
|
||||||
maximal = maximalPkg;
|
|
||||||
}
|
# Available Configurations
|
||||||
// (
|
default = nixPkg;
|
||||||
if !(builtins.elem system ["aarch64-darwin" "x86_64-darwin"])
|
nix = nixPkg;
|
||||||
then {
|
maximal = maximalPkg;
|
||||||
tidal = tidalPkg;
|
|
||||||
}
|
}
|
||||||
else {}
|
// (
|
||||||
);
|
if !(builtins.elem system ["aarch64-darwin" "x86_64-darwin"])
|
||||||
}));
|
then {
|
||||||
|
tidal = tidalPkg;
|
||||||
|
}
|
||||||
|
else {}
|
||||||
|
);
|
||||||
|
|
||||||
|
nixosModules.hm-module = {
|
||||||
|
imports = [
|
||||||
|
./lib/hm.nix
|
||||||
|
# {nixpkgs.overlays = [inputs.self.overlays.default];} what?
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
));
|
||||||
|
|
||||||
|
# Flake inputs
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
|
|
Loading…
Reference in a new issue