old nix-conf: update proj_root + failure on hungtr-neovim
parent
416f0d0c60
commit
9944604a38
|
@ -5,7 +5,7 @@
|
|||
}:
|
||||
let
|
||||
inherit (myLib) fromYaml;
|
||||
actualConfig = fromYaml (builtins.readFile "${proj_root}//alacritty/alacritty.yml");
|
||||
actualConfig = fromYaml (builtins.readFile "${proj_root.config.path}//alacritty/alacritty.yml");
|
||||
cfg = config.base.alacritty;
|
||||
in
|
||||
{
|
||||
|
|
|
@ -5,9 +5,14 @@
|
|||
let
|
||||
recursiveUpdate = lib.recursiveUpdate;
|
||||
_lib = recursiveUpdate lib (import ../../lib { inherit pkgs lib; });
|
||||
proj_root = builtins.toString ./../../..;
|
||||
in
|
||||
# TODO: Unpollute inputs
|
||||
recursiveUpdate inputs {
|
||||
proj_root = builtins.toString ./../../..;
|
||||
proj_root = {
|
||||
path = proj_root;
|
||||
config.path = "${proj_root}/native_configs";
|
||||
scripts.path = "${proj_root}/scripts";
|
||||
};
|
||||
myLib = _lib;
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ in
|
|||
};
|
||||
};
|
||||
config = myLib.mkIf cfg.enable {
|
||||
xdg.configFile."starship.toml".source = "${proj_root}//starship/starship.toml";
|
||||
xdg.configFile."starship.toml".source = "${proj_root.config.path}//starship/starship.toml";
|
||||
# nix: Propagates the environment with packages and vars when enter (children of)
|
||||
# a directory with shell.nix-compatible and .envrc
|
||||
programs.direnv = {
|
||||
|
@ -51,7 +51,7 @@ in
|
|||
};
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
extraConfig = builtins.readFile "${proj_root}/tmux/tmux.conf";
|
||||
extraConfig = builtins.readFile "${proj_root.config.path}/tmux/tmux.conf";
|
||||
};
|
||||
programs.exa = {
|
||||
enable = true;
|
||||
|
|
|
@ -17,7 +17,7 @@ in
|
|||
config.programs.ssh = {
|
||||
inherit (cfg) enable;
|
||||
forwardAgent = true;
|
||||
extraConfig = builtins.readFile "${proj_root}/ssh/config";
|
||||
extraConfig = builtins.readFile "${proj_root.config.path}/ssh/config";
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
, myHome
|
||||
, myLib
|
||||
, option # The options we're given, this might be useful for typesafety?
|
||||
, proj_root
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
|
@ -32,7 +33,25 @@ let
|
|||
# pypkgs.ujson # pylsp seems to rely on this. satisfy it lol
|
||||
# ]))
|
||||
];
|
||||
proj_root = builtins.toString ./../..;
|
||||
rust_pkgs = (pkgs.rust-bin.selectLatestNightlyWith
|
||||
(
|
||||
toolchain:
|
||||
toolchain.default.override {
|
||||
extensions = [ "rust-src" ];
|
||||
}
|
||||
));
|
||||
my_neovim = pkgs.neovim-unwrapped.overrideDerivation (old: {
|
||||
# TODO: is there a more beautiful way to override propagatedBuildInputs?
|
||||
name = "hungtr-" + old.name;
|
||||
buildInputs = (old.buildInputs or []) ++ [
|
||||
pkgs.tree-sitter # highlighting
|
||||
rust_pkgs # for potentially rust-analyzer
|
||||
pkgs.fzf
|
||||
pkgs.ripgrep
|
||||
pkgs.zk
|
||||
pkgs.fd
|
||||
];
|
||||
});
|
||||
inherit (myLib) fromYaml;
|
||||
in
|
||||
{
|
||||
|
@ -68,8 +87,8 @@ in
|
|||
] ++ (myHome.packages or [ ]) ++ nvim_pkgs);
|
||||
|
||||
## Configs ##
|
||||
xdg.configFile."nvim/init.lua".source = "${proj_root}//neovim/init.lua";
|
||||
xdg.configFile."zk/config.toml".source = "${proj_root}//zk/config.toml";
|
||||
xdg.configFile."nvim/init.lua".source = "${proj_root.config.path}//neovim/init.lua";
|
||||
xdg.configFile."zk/config.toml".source = "${proj_root.config.path}//zk/config.toml";
|
||||
|
||||
## Programs ##
|
||||
programs.jq = {
|
||||
|
@ -78,11 +97,13 @@ in
|
|||
# TODO: override the original package, inject tree-sitter and stuffs
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
package = my_neovim;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
withPython3 = true;
|
||||
withNodeJs = true;
|
||||
extraPackages = nvim_pkgs;
|
||||
# only for here for archive-documentation
|
||||
# extraPython3Packages = (pypkgs: [
|
||||
# # pypkgs.python-lsp-server
|
||||
# pypkgs.ujson
|
||||
|
|
Loading…
Reference in New Issue