[feat] Fix nvim config mostly

This commit is contained in:
Uttarayan
2024-02-22 01:45:37 +05:30
parent 3622d00200
commit ed82e4eec4
7 changed files with 87 additions and 254 deletions

View File

@@ -1,5 +1,11 @@
{ inputs, pkgs, osConfig, ... }: {
imports = [ inputs.anyrun.nixosModules.home-manager ];
{
inputs,
pkgs,
device,
osConfig,
...
}: {
imports = [inputs.anyrun.nixosModules.home-manager];
programs.anyrun = {
enable = true;
config = {
@@ -15,10 +21,10 @@
symbols
kidex
];
x = { fraction = 0.5; };
y = { fraction = 0.3; };
height = { absolute = 0; };
width = { absolute = 1000; };
x = {fraction = 0.5;};
y = {fraction = 0.3;};
height = {absolute = 0;};
width = {absolute = 1000;};
showResultsImmediately = true;
maxEntries = 10;
layer = "overlay";
@@ -26,9 +32,12 @@
extraConfigFiles = {
"nixos-options.ron".text = let
nixos-options = osConfig.system.build.manual.optionsJSON
nixos-options =
pkgs.lib.optionalString device.isNix
osConfig.system.build.manual.optionsJSON
+ "/share/doc/nixos/options.json";
hm-options = inputs.home-manager.packages.${pkgs.system}.docs-json
hm-options =
inputs.home-manager.packages.${pkgs.system}.docs-json
+ "/share/doc/home-manager/options.json";
# or alternatively if you wish to read any other documentation options, such as home-manager
# get the docs-json package from the home-manager flake
@@ -39,11 +48,16 @@
# ":something-else" = [some-other-option];
# ":nall" = [nixos-options hm-options some-other-option];
# };
options = builtins.toJSON {
":nix" = [ nixos-options ];
":hm" = [ hm-options ];
};
options = builtins.toJSON ({
":hm" = [hm-options];
}
// (
if device.isNix
then {
":nix" = [nixos-options];
}
else {}
));
in ''
Config(
options: ${options},
@@ -84,12 +98,12 @@
"rink.ron".text = ''
Config(
currency: Some("${
builtins.toFile "currency.units" ''
!category currencies "Currencies"
usd USD
inr INR
''
}"),
builtins.toFile "currency.units" ''
!category currencies "Currencies"
usd USD
inr INR
''
}"),
)
'';
};