[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

@@ -35,6 +35,16 @@ in {
(nerdfonts.override { fonts = [ "Hasklig" ]; })
mpv
] ++ (if device.isLinux then [
(pkgs.catppuccin-gtk.override {
variant = "mocha";
size = "standard";
accents = [ "mauve" ];
tweaks = [ "normal" ];
})
(pkgs.catppuccin-papirus-folders.override {
accent = "mauve";
flavor = "mocha";
})
swaynotificationcenter
openocd-rp2040
usbutils
@@ -55,7 +65,7 @@ in {
] else
[ ]);
xdg.enable = true;
# xdg.enable = true;
programs = {
git = {

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
''
}"),
)
'';
};

View File

@@ -1,17 +1,30 @@
{ devices, inputs, overlays, home-manager, ... }:
{
devices,
inputs,
overlays,
home-manager,
...
}:
builtins.listToAttrs (builtins.map (device: {
name = device.user;
value = let
pkgs = import inputs.nixpkgs {
inherit overlays;
system = device.system;
};
in home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {
inherit inputs;
inherit device;
};
modules = [ ../common/home.nix ];
};
}) devices)
name = device.user;
value = let
pkgs = import inputs.nixpkgs {
inherit overlays;
system = device.system;
};
in
home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {
inherit inputs;
inherit device;
};
modules = [
{
nixpkgs.config.allowUnfree = true;
}
../common/home.nix
];
};
})
devices)

View File

@@ -1,4 +1,4 @@
{ ... }: {
{ pkgs, ... }: {
wayland.windowManager.hyprland = {
enable = true;
settings = {
@@ -119,22 +119,22 @@
bind = [
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
"$mainMod, Return, exec, foot"
"$mainModShift, Return, exec, wezterm"
"$mainMod, Return, exec, ${pkgs.foot}/bin/foot"
"$mainModShift, Return, exec, ${pkgs.wezterm}/bin/wezterm"
"$mainModShift, Q, killactive,"
# "$mainMod, M, exit,"
"$mainMod, t, togglefloating,"
"$mainMod, f, fullscreen,"
"$mainMod, d, exec, anyrun"
"$mainMod, Space, exec, anyrun"
"$mainMod, d, exec, ${pkgs.anyrun}/bin/anyrun"
"$mainMod, Space, exec, ${pkgs.anyrun}/bin/anyrun"
"$mainMod, p, pseudo, # dwindle"
"$mainMod, v, togglesplit, # dwindle"
"$mainMod, a, exec, swaync-client -t"
"$mainMod, Tab, cyclenext"
# Audio
",xf86audioraisevolume, exec, swayosd --output-volume raise"
",xf86audiolowervolume, exec, swayosd --output-volume lower"
",xf86audiomute, exec, swayosd --output-volume mute-toggle"
",xf86audioraisevolume, exec, ${pkgs.swayosd}/bin/swayosd --output-volume raise"
",xf86audiolowervolume, exec, ${pkgs.swayosd}/bin/swayosd --output-volume lower"
",xf86audiomute, exec, ${pkgs.swayosd}/bin/swayosd --output-volume mute-toggle"
",xf86audioprev, exec, /home/fs0c131y/.cargo/bin/mctl prev"
",xf86audionext, exec, /home/fs0c131y/.cargo/bin/mctl next"
",xf86audioplay, exec, /home/fs0c131y/.cargo/bin/mctl toggle"