436 lines
11 KiB
Nix
436 lines
11 KiB
Nix
{ config, pkgs, ... }:
|
|
|
|
{
|
|
home.username = "ahurac";
|
|
home.homeDirectory = "/home/ahurac";
|
|
|
|
home.stateVersion = "24.05";
|
|
|
|
home.packages = with pkgs; [
|
|
d2
|
|
cargo
|
|
tinymist
|
|
typst
|
|
ipcalc
|
|
thunderbird
|
|
python3
|
|
swaybg
|
|
catimg
|
|
virt-manager
|
|
unzip
|
|
nil
|
|
pavucontrol
|
|
wl-clipboard
|
|
prismlauncher
|
|
noto-fonts
|
|
libreoffice
|
|
mosh
|
|
gnumake
|
|
man-pages
|
|
man-pages-posix
|
|
gdb
|
|
gcc
|
|
valgrind
|
|
cloc
|
|
nodejs_22
|
|
libnotify
|
|
|
|
(nerdfonts.override { fonts = [ "Hack" ]; })
|
|
];
|
|
|
|
home.sessionVariables = { EDITOR = "hx"; };
|
|
|
|
gtk = {
|
|
enable = true;
|
|
theme = {
|
|
package = pkgs.adw-gtk3;
|
|
name = "adw-gtk3-dark";
|
|
};
|
|
iconTheme = {
|
|
package = pkgs.adwaita-icon-theme;
|
|
name = "Adwaita";
|
|
};
|
|
font.name = "Noto Sans";
|
|
font.size = 11;
|
|
};
|
|
|
|
xdg.portal = {
|
|
enable = true;
|
|
config.common.default = [ "gnome" "gtk" ];
|
|
extraPortals = [ pkgs.xdg-desktop-portal-gnome ];
|
|
};
|
|
|
|
services.ssh-agent.enable = true;
|
|
services.swayosd.enable = true;
|
|
|
|
services.flatpak.packages = [
|
|
"im.riot.Riot"
|
|
"io.github.spacingbat3.webcord"
|
|
"net.cozic.joplin_desktop"
|
|
"dev.aunetx.deezer"
|
|
"com.jgraph.drawio.desktop"
|
|
"com.bitwarden.desktop"
|
|
];
|
|
services.flatpak.update.onActivation = true;
|
|
services.flatpak.overrides = {
|
|
global = {
|
|
Context.sockets = [ "wayland" "!x11" "!fallback-x11" ];
|
|
Environment = {
|
|
XCURSOR_PATH = "/run/host/user-share/icons:/run/host/share/icons";
|
|
GTK_THEME = "adw-gtk3-dark";
|
|
};
|
|
};
|
|
};
|
|
|
|
programs.librewolf.enable = true;
|
|
programs.kitty.enable = true;
|
|
|
|
programs.helix = {
|
|
enable = true;
|
|
package = pkgs.evil-helix;
|
|
settings = { editor.soft-wrap.enable = true; };
|
|
extraPackages = with pkgs; [
|
|
clang-tools
|
|
rust-analyzer
|
|
jdt-language-server
|
|
bash-language-server
|
|
marksman
|
|
python3Packages.python-lsp-server
|
|
];
|
|
languages.language = [
|
|
{
|
|
name = "nix";
|
|
auto-format = true;
|
|
formatter.command = "${pkgs.nixfmt-classic}/bin/nixfmt";
|
|
}
|
|
{
|
|
name = "c";
|
|
auto-format = true;
|
|
formatter.command = "${pkgs.clang-tools}/bin/clang-format";
|
|
}
|
|
{
|
|
name = "bash";
|
|
auto-format = true;
|
|
formatter.command = "${pkgs.shfmt}/bin/shfmt";
|
|
}
|
|
{
|
|
name = "java";
|
|
auto-format = true;
|
|
formatter.command = "${pkgs.google-java-format}/bin/google-java-format";
|
|
}
|
|
{
|
|
name = "rust";
|
|
auto-format = true;
|
|
formatter.command = "${pkgs.rustfmt}/bin/rustfmt";
|
|
}
|
|
{
|
|
name = "python";
|
|
auto-format = true;
|
|
formatter.command = "${pkgs.yapf}/bin/yapf";
|
|
}
|
|
];
|
|
};
|
|
|
|
programs.rbw = {
|
|
enable = true;
|
|
settings = {
|
|
email = "hchauvin@mailbox.org";
|
|
base_url = "https://vw.ahur.ac";
|
|
pinentry = pkgs.pinentry-curses;
|
|
};
|
|
};
|
|
|
|
fonts.fontconfig.enable = true;
|
|
fonts.fontconfig.defaultFonts = {
|
|
sansSerif = [ "Noto Sans" ];
|
|
monospace = [ "Hack Nerd Font" ];
|
|
emoji = [ "Noto Color Emoji" ];
|
|
};
|
|
|
|
home.pointerCursor = {
|
|
name = "Bibata-Modern-Ice";
|
|
package = pkgs.bibata-cursors;
|
|
size = 24;
|
|
gtk.enable = true;
|
|
};
|
|
|
|
programs.git = {
|
|
enable = true;
|
|
aliases = {
|
|
a = "add";
|
|
c = "commit";
|
|
s = "status";
|
|
d = "diff";
|
|
ch = "checkout";
|
|
r = "restore";
|
|
re = "reset";
|
|
p = "pull";
|
|
pu = "push";
|
|
m = "merge";
|
|
l = "log";
|
|
graph = "log --graph --oneline --all";
|
|
b = "branch -a";
|
|
sh = "show";
|
|
ds = "diff --staged";
|
|
};
|
|
userEmail = "ahurac@mailbox.org";
|
|
userName = "Ahurac";
|
|
extraConfig = {
|
|
init.defaultBranch = "main";
|
|
push.autoSetupRemote = true;
|
|
pull.rebase = false;
|
|
};
|
|
};
|
|
|
|
programs.zsh = {
|
|
enable = true;
|
|
shellAliases = {
|
|
g = "git";
|
|
j = "jobs";
|
|
sshm = "ssh -M";
|
|
pd = "pushd";
|
|
wlc = "wl-copy";
|
|
lw = "librewolf";
|
|
};
|
|
plugins = [{
|
|
name = "vi-mode";
|
|
src = pkgs.zsh-vi-mode;
|
|
file = "share/zsh-vi-mode/zsh-vi-mode.plugin.zsh";
|
|
}];
|
|
initExtra = ''
|
|
mkcdir() {
|
|
mkdir -p -- "$@" && cd -- "$1"
|
|
}
|
|
|
|
getpwd() {
|
|
rbw get "$@" | wl-copy
|
|
}
|
|
'';
|
|
};
|
|
|
|
programs.swaylock = {
|
|
enable = true;
|
|
settings = {
|
|
color = "202020";
|
|
font-size = 24;
|
|
font = "Noto Sans";
|
|
indicator-radius = 100;
|
|
line-uses-ring = true;
|
|
separator-color = "00000000";
|
|
};
|
|
};
|
|
|
|
programs.anyrun = {
|
|
enable = true;
|
|
package = pkgs.anyrun;
|
|
config = {
|
|
plugins = [ "libapplications.so" ];
|
|
x.fraction = 0.5;
|
|
y.absolute = 0;
|
|
width.absolute = 800;
|
|
height.absolute = 0;
|
|
hideIcons = false;
|
|
ignoreExclusiveZones = false;
|
|
layer = "overlay";
|
|
hidePluginInfo = false;
|
|
closeOnClick = false;
|
|
showResultsImmediately = false;
|
|
maxEntries = null;
|
|
};
|
|
extraCss = ''
|
|
#window {
|
|
background-color: rgba(0, 0, 0, 0);
|
|
}
|
|
|
|
box#main {
|
|
border-radius: 10px;
|
|
background-color: @theme_bg_color;
|
|
margin-top: 20px;
|
|
}
|
|
|
|
list#main {
|
|
background-color: rgba(0, 0, 0, 0);
|
|
border-radius: 10px;
|
|
}
|
|
|
|
list#plugin {
|
|
background-color: rgba(0, 0, 0, 0);
|
|
}
|
|
|
|
label#match-desc {
|
|
font-size: 10px;
|
|
}
|
|
|
|
label#plugin {
|
|
font-size: 14px;
|
|
}
|
|
'';
|
|
};
|
|
|
|
programs.alacritty = {
|
|
enable = true;
|
|
settings = {
|
|
window = {
|
|
dimensions = {
|
|
columns = 0;
|
|
lines = 0;
|
|
};
|
|
};
|
|
colors.bright = {
|
|
blue = "0xb399ff";
|
|
cyan = "0x99e6ff";
|
|
green = "0x89f5a4";
|
|
magenta = "0xe699ff";
|
|
red = "0xff809f";
|
|
white = "0xffffff";
|
|
yellow = "0xffffb3";
|
|
};
|
|
colors.normal = {
|
|
black = "0x000000";
|
|
blue = "0x794dff";
|
|
cyan = "0x33ccff";
|
|
green = "0x13ec49";
|
|
magenta = "0xcc33ff";
|
|
red = "0xff0040";
|
|
white = "0xffffff";
|
|
yellow = "0xffff4d";
|
|
};
|
|
colors.primary = {
|
|
background = "0x000000";
|
|
foreground = "0xffffff";
|
|
};
|
|
};
|
|
};
|
|
|
|
services.swaync = {
|
|
enable = true;
|
|
settings = {
|
|
positionX = "center";
|
|
positionY = "bottom";
|
|
control-center-positionX = "center";
|
|
control-center-positionY = "bottom";
|
|
control-center-margin-bottom = 10;
|
|
fit-to-screen = false;
|
|
control-center-height = 600;
|
|
};
|
|
};
|
|
|
|
programs.niri = {
|
|
settings = {
|
|
input = {
|
|
keyboard = {
|
|
xkb.options = "compose:rctrl";
|
|
repeat-delay = 300;
|
|
repeat-rate = 100;
|
|
};
|
|
mouse.accel-profile = "flat";
|
|
warp-mouse-to-focus = true;
|
|
focus-follows-mouse.enable = true;
|
|
};
|
|
layout = {
|
|
gaps = 10;
|
|
default-column-width.proportion = 0.5;
|
|
preset-column-widths = [ { proportion = 0.5; } { proportion = 1.0; } ];
|
|
preset-window-heights = [ { proportion = 0.5; } { proportion = 1.0; } ];
|
|
focus-ring.enable = false;
|
|
border = {
|
|
enable = true;
|
|
width = 2;
|
|
inactive.color = "#80808080";
|
|
};
|
|
center-focused-column = "never";
|
|
};
|
|
workspaces = {
|
|
w1.name = "admin";
|
|
w2.name = "everything";
|
|
w3.name = "apps";
|
|
};
|
|
hotkey-overlay.skip-at-startup = true;
|
|
window-rules = [
|
|
{
|
|
matches =
|
|
[{ app-id = "^(im\\.riot\\.Riot|WebCord|@joplin/app-desktop)$"; }];
|
|
open-on-workspace = "apps";
|
|
default-column-width.proportion = 1.0;
|
|
}
|
|
{
|
|
geometry-corner-radius = {
|
|
top-left = 10.0;
|
|
top-right = 10.0;
|
|
bottom-right = 10.0;
|
|
bottom-left = 10.0;
|
|
};
|
|
clip-to-geometry = true;
|
|
}
|
|
];
|
|
prefer-no-csd = true;
|
|
screenshot-path = "~/screenshots/%Y%m%d%H%M%S.png";
|
|
binds = with config.lib.niri.actions; {
|
|
"Mod+Space".action = spawn "alacritty";
|
|
"Mod+Shift+Space".action = spawn "alacritty" "-e" "sudo" "-i";
|
|
"Mod+F1".action = spawn "anyrun";
|
|
"Mod+F2".action = spawn "flatpak" "run" "net.cozic.joplin_desktop";
|
|
"Mod+F3".action = spawn "flatpak" "run" "im.riot.Riot";
|
|
"Mod+F4".action = spawn "flatpak" "run" "io.github.spacingbat3.webcord";
|
|
"Mod+F5".action = spawn "flatpak" "run" "dev.aunetx.deezer";
|
|
"Mod+L".action = spawn "swaylock";
|
|
"Mod+Shift+Q".action = close-window;
|
|
"Mod+A".action = focus-column-left;
|
|
"Mod+Z".action = focus-window-or-workspace-up;
|
|
"Mod+S".action = focus-window-or-workspace-down;
|
|
"Mod+D".action = focus-column-right;
|
|
"Mod+Shift+A".action = consume-or-expel-window-left;
|
|
"Mod+Shift+Z".action = move-window-up-or-to-workspace-up;
|
|
"Mod+Shift+S".action = move-window-down-or-to-workspace-down;
|
|
"Mod+Shift+D".action = consume-or-expel-window-right;
|
|
"Mod+Page_Up".action = focus-workspace-up;
|
|
"Mod+Page_Down".action = focus-workspace-down;
|
|
"Mod+WheelScrollDown".action = focus-column-right;
|
|
"Mod+WheelScrollUp".action = focus-column-left;
|
|
"Mod+Shift+WheelScrollDown".action = move-column-right;
|
|
"Mod+Shift+WheelScrollUp".action = move-column-left;
|
|
"Mod+N".action = spawn "swaync" "--toggle-panel";
|
|
"Mod+Tab".action = focus-workspace-previous;
|
|
"Mod+Shift+W".action = maximize-column;
|
|
"Mod+W".action = switch-preset-column-width;
|
|
"Mod+X".action = switch-preset-window-height;
|
|
"Mod+E".action = set-column-width "-10%";
|
|
"Mod+R".action = set-column-width "+10%";
|
|
"Print".action = screenshot-screen;
|
|
"Shift+Print".action = screenshot;
|
|
"Alt+Print".action = screenshot-window;
|
|
"Mod+Shift+Backspace" = {
|
|
action = quit { skip-confirmation = true; };
|
|
};
|
|
"XF86MonBrightnessDown" = {
|
|
allow-when-locked = true;
|
|
action = spawn "swayosd-client" "--brightness=lower";
|
|
};
|
|
"XF86MonBrightnessUp" = {
|
|
allow-when-locked = true;
|
|
action = spawn "swayosd-client" "--brightness=raise";
|
|
};
|
|
"XF86AudioRaiseVolume" = {
|
|
allow-when-locked = true;
|
|
action = spawn "swayosd-client" "--output-volume=raise";
|
|
};
|
|
"XF86AudioLowerVolume" = {
|
|
allow-when-locked = true;
|
|
action = spawn "swayosd-client" "--output-volume=lower";
|
|
};
|
|
"XF86AudioMute" = {
|
|
allow-when-locked = true;
|
|
action = spawn "swayosd-client" "--output-volume=mute-toggle";
|
|
};
|
|
};
|
|
spawn-at-startup = [
|
|
{ command = [ "eww" "daemon" ]; }
|
|
{ command = [ "eww" "open" "dock" ]; }
|
|
];
|
|
};
|
|
};
|
|
|
|
programs.mpv.enable = true;
|
|
programs.jq.enable = true;
|
|
programs.fastfetch.enable = true;
|
|
}
|