Add tools

This commit is contained in:
muon 2024-09-30 14:02:27 +00:00
parent 7ad646f580
commit 4dc6ab7864
5 changed files with 46 additions and 44 deletions

View file

@ -62,10 +62,11 @@ in {
}; };
}; };
# environment.variables = { environment.variables = {
# # GDK_SCALE = "2"; WINIT_HIDPI_FACTOR = "1";
# # XCURSOR_SIZE = "24"; # GDK_SCALE = "2";
# }; # XCURSOR_SIZE = "24";
};
hardware = { hardware = {
opengl = { opengl = {

View file

@ -1,5 +1,5 @@
{ pkgs, lib, config, osConfig, ... }: let { pkgs, lib, config, osConfig, ... }:
cfg = osConfig.mods; let cfg = osConfig.mods;
in { in {
imports = [ imports = [
@ -13,4 +13,6 @@ in {
programs.home-manager.enable = true; programs.home-manager.enable = true;
home.username = cfg.user.name; home.username = cfg.user.name;
home.homeDirectory = "/home/${cfg.user.name}"; home.homeDirectory = "/home/${cfg.user.name}";
# home.profileDirectory =
# "${config.home.homeDirectory}/.local/state/nix/profile/";
} }

View file

@ -71,6 +71,7 @@ in {
programs.direnv = { programs.direnv = {
enable = true; enable = true;
nix-direnv.enable = true; nix-direnv.enable = true;
enableZshIntegration = lib.mkIf config.mods.terminal.zsh.enable true;
}; };
home.sessionVariables.EDITOR = "hx"; home.sessionVariables.EDITOR = "hx";

View file

@ -1,36 +1,35 @@
{ pkgs, lib, config, ... }: { pkgs, lib, config, ... }:
let let cfg = config.mods.terminal;
cfg = config.mods.terminal;
in with lib; { in with lib; {
options.mods.terminal.tools.enable = mkEnableOption "enables cli tools"; options.mods.terminal.tools.enable = mkEnableOption "enables cli tools";
config = mkIf cfg.tools.enable { config = mkIf cfg.tools.enable {
programs.zellij = {
enable = true;
# enableZshIntegration = mkIf cfg.zsh.enable true;
};
programs.fzf = { programs = builtins.listToAttrs (map (name: {
enable = true; name = name;
enableZshIntegration = mkIf cfg.zsh.enable true; value = {
}; enable = true;
} // optionalAttrs
(builtins.hasAttr "enableZshIntegration" config.programs.${name}) {
enableZshIntegration = mkIf cfg.zsh.enable true;
};
}) [
"zellij"
"fzf"
"eza"
"bat"
"zoxide"
"dircolors"
"yazi"
"nix-index"
"thefuck"
programs.zoxide = { "lazygit"
enable = true; "fd"
enableZshIntegration = mkIf cfg.zsh.enable true; "ripgrep"
}; "bottom"
"htop"
programs.dircolors = { ]);
enable = true;
enableZshIntegration = mkIf cfg.zsh.enable true;
};
programs.yazi = {
enable = true;
enableZshIntegration = mkIf cfg.zsh.enable true;
};
programs.lazygit.enable = true;
home.packages = with pkgs; [ home.packages = with pkgs; [
# libraries # libraries
@ -38,13 +37,11 @@ in with lib; {
ueberzugpp ueberzugpp
# file managing # file managing
fd
ripgrep
trash-cli trash-cli
# programs # programs
bottom
fend fend
unzip
]; ];
}; };
} }

View file

@ -1,10 +1,11 @@
{ pkgs, lib, config, ... }: { { pkgs, lib, config, ... }: {
options.mods.xdg.enable = options.mods.xdg.enable = lib.mkEnableOption "enables xdg settings";
lib.mkEnableOption "enables xdg settings";
config = lib.mkIf config.mods.xdg.enable { config = lib.mkIf config.mods.xdg.enable {
nix.settings.use-xdg-base-directories = true;
xdg = let xdg = let
browser = ["librewolf.desktop"]; browser = [ "librewolf.desktop" ];
associations = { associations = {
"text/html" = browser; "text/html" = browser;
"x-scheme-handler/http" = browser; "x-scheme-handler/http" = browser;
@ -19,13 +20,13 @@
"application/x-extension-xhtml" = browser; "application/x-extension-xhtml" = browser;
"application/x-extension-xht" = browser; "application/x-extension-xht" = browser;
"audio/*" = ["mpv.desktop"]; "audio/*" = [ "mpv.desktop" ];
"video/*" = ["mpv.dekstop"]; "video/*" = [ "mpv.dekstop" ];
"image/*" = ["imv.desktop"]; "image/*" = [ "imv.desktop" ];
"application/json" = browser; "application/json" = browser;
# "application/pdf" = ["org.pwmt.zathura.desktop.desktop"]; # "application/pdf" = ["org.pwmt.zathura.desktop.desktop"];
"x-scheme-handler/tg" = ["kotatogram-desktop.desktop"]; "x-scheme-handler/tg" = [ "kotatogram-desktop.desktop" ];
"x-scheme-handler/discord" = ["vesktop.desktop"]; "x-scheme-handler/discord" = [ "vesktop.desktop" ];
}; };
in { in {
enable = true; enable = true;