mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-11-15 11:15:59 +01:00
901363d1ac
* treewide: refactor custom lib, merge lists in hm/nixos module * lib/types(custom): clarify anythingConcatLists code --------- Co-authored-by: raf <raf@notashelf.dev>
56 lines
1.4 KiB
Nix
56 lines
1.4 KiB
Nix
{inputs, ...}: {
|
|
perSystem = {
|
|
config,
|
|
pkgs,
|
|
lib,
|
|
...
|
|
}: let
|
|
docs = import ../docs {inherit pkgs inputs lib;};
|
|
in {
|
|
packages = {
|
|
# Documentation
|
|
docs = docs.manual.html;
|
|
docs-html = docs.manual.html;
|
|
docs-manpages = docs.manPages;
|
|
docs-json = docs.options.json;
|
|
|
|
# Build and open the built manual in your system browser
|
|
docs-html-wrapped = pkgs.writeScriptBin "docs-html-wrapped" ''
|
|
#!${pkgs.stdenv.shell}
|
|
# use xdg-open to open the docs in the browser
|
|
${pkgs.xdg_utils}/bin/xdg-open ${docs.manual.html}
|
|
'';
|
|
|
|
# Exposed neovim configurations
|
|
nix = config.legacyPackages.neovim-nix;
|
|
maximal = config.legacyPackages.neovim-maximal;
|
|
default = config.legacyPackages.neovim-nix;
|
|
|
|
# Published docker images
|
|
docker-nix = let
|
|
inherit (pkgs) bash gitFull buildEnv dockerTools;
|
|
inherit (config.legacyPackages) neovim-nix;
|
|
in
|
|
dockerTools.buildImage {
|
|
name = "nvf";
|
|
tag = "latest";
|
|
|
|
copyToRoot = buildEnv {
|
|
name = "neovim-root";
|
|
pathsToLink = ["/bin"];
|
|
paths = [
|
|
neovim-nix
|
|
gitFull
|
|
bash
|
|
];
|
|
};
|
|
|
|
config = {
|
|
Cmd = ["${neovim-nix}/bin/nvim"];
|
|
WorkingDir = "/home/neovim/demo";
|
|
Volumes = {"/home/neovim/demo" = {};};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|