nixos-config/common/home.nix

348 lines
9 KiB
Nix

{ config, pkgs, ... }:
{
home.username = "ahurac";
home.homeDirectory = "/home/ahurac";
home.stateVersion = "24.05";
home.packages = with pkgs; [
pavucontrol
thunderbird
wl-clipboard
swayosd
prismlauncher
anyrun
noto-fonts
libreoffice
mosh
webcord
element-desktop
joplin-desktop
gnumake
man-pages
man-pages-posix
clang-tools
gdb
gcc
valgrind
weston
nixfmt-classic
(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";
};
};
services.ssh-agent.enable = true;
programs.home-manager.enable = true;
programs.firefox.enable = true;
programs.kitty.enable = true;
programs.helix = {
enable = true;
package = pkgs.evil-helix;
languages.language = [
{
name = "nix";
auto-format = true;
formatter.command = "nixfmt";
}
{
name = "c";
auto-format = true;
formatter.command = "clang-format";
}
];
};
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";
sh = "show";
ds = "diff --staged";
};
userEmail = "ahurac@mailbox.org";
userName = "Ahurac";
extraConfig = {
init.defaultBranch = "main";
push.autoSetupRemote = true;
};
};
programs.zsh = {
enable = true;
shellAliases = {
g = "git";
j = "jobs";
sshm = "ssh -M";
};
plugins = [{
name = "vi-mode";
src = pkgs.zsh-vi-mode;
file = "share/zsh-vi-mode/zsh-vi-mode.plugin.zsh";
}];
};
wayland.windowManager.hyprland = {
enable = true;
plugins = [ pkgs.hyprlandPlugins.hy3 ];
settings = {
monitor = ", highrr, 0x0, 1";
"$col_urgent" = "rgb(ffd966)";
"$terminal" = "kitty";
"$browser" = "firefox";
"$locker" = "hyprlock";
"$launcher" = "anyrun";
"$joplin" = "";
"$matrix_client" = "";
"$discord" = "";
"$deezer" = "";
exec-once = [ "swayosd-server" ];
binds = {
scroll_event_delay = 0;
workspace_back_and_forth = false;
allow_workspace_cycles = false;
workspace_center_on = 1;
focus_preferred_method = 1;
movefocus_cycles_fullscreen = false;
};
decoration = {
rounding = 10;
active_opacity = 1.0;
fullscreen_opacity = 1.0;
};
general = {
border_size = 2;
"col.inactive_border" = "$col_inactive";
"col.nogroup_border" = "$col_inactive";
"col.active_border" = "$col_accentdark $col_accentlight 90deg";
resize_on_border = false;
gaps_in = 5;
gaps_out = 10;
gaps_workspaces = 0;
layout = "hy3";
no_focus_fallback = true;
};
input = {
kb_layout = "fr";
numlock_by_default = true;
repeat_rate = 75;
repeat_delay = 300;
kb_options = "compose:rctrl";
sensitivity = 0.0;
accel_profile = "flat";
};
misc = {
disable_hyprland_logo = false;
disable_splash_rendering = false;
layers_hog_keyboard_focus = true;
mouse_move_focuses_monitor = true;
enable_swallow = false;
close_special_on_empty = true;
new_window_takes_over_fullscreen = 2;
};
plugin.hy3 = {
no_gaps_when_only = false;
node_collapse_policy = 0;
tabs = {
height = 5;
padding = 5;
from_top = true;
rounding = 4;
render_text = false;
"col.active" = "$col_accentdark";
"col.urgent" = "$col_urgent";
"col.inactive" = "$col_inactive";
};
autotile.enable = true;
};
xwayland = { force_zero_scaling = true; };
env = [
"QT_QPA_PLATFORM, wayland"
"QT_QPA_PLATFORM, qt6ct"
"QT_AUTO_SCREEN_SCALE_FACTOR, 1"
"QT_WAYLAND_DISABLE_WINDOWDECORATION, 1"
"CLUTTER_BACKEND, wayland"
"SDL_VIDEODRIVER, wayland"
"ELM_DISPLAY, wl"
"_JAVA_AWT_WM_NONREPARENTING, 1"
"XDG_SESSION_DESKTOP, Hyprland"
"ELECTRON_OZONE_PLATFORM_HINT, auto"
"HYPRCURSOR_THEME, bibata_modern_ice-hyprcursor"
];
bind = [
"SUPER, Space, exec, $terminal"
"SUPER SHIFT, Space, exec, $terminal -e sudo -i"
"SUPER, equal, movetoworkspace, special"
"SUPER, 10, workspace, 1"
"SUPER, 11, workspace, 2"
"SUPER, 12, workspace, 3"
"SUPER, 13, workspace, 4"
"SUPER, R, workspace, 5"
"SUPER, F, workspace, 6"
"SUPER, V, workspace, 7"
"SUPER, C, workspace, 8"
"SUPER, X, workspace, 9"
"SUPER, W, workspace, 10"
"SUPER, mouse_down, workspace, e-1"
"SUPER, mouse_up, workspace, e+1"
"SUPER SHIFT, Q, hy3:killactive"
"SUPER SHIFT, 10, movetoworkspacesilent, 1"
"SUPER SHIFT, 11, movetoworkspacesilent, 2"
"SUPER SHIFT, 12, movetoworkspacesilent, 3"
"SUPER SHIFT, 13, movetoworkspacesilent, 4"
"SUPER SHIFT, R, movetoworkspacesilent, 5"
"SUPER SHIFT, F, movetoworkspacesilent, 6"
"SUPER SHIFT, V, movetoworkspacesilent, 7"
"SUPER SHIFT, C, movetoworkspacesilent, 8"
"SUPER SHIFT, X, movetoworkspacesilent, 9"
"SUPER SHIFT, W, movetoworkspacesilent, 10"
"SUPER SHIFT, A, hy3:movewindow, l"
"SUPER SHIFT, Z, hy3:movewindow, u"
"SUPER SHIFT, S, hy3:movewindow, d"
"SUPER SHIFT, D, hy3:movewindow, r"
"SUPER SHIFT, Return, togglefloating"
"SUPER Alt_L, F, fullscreen"
"SUPER, A, hy3:movefocus, l"
"SUPER, Z, hy3:movefocus, u"
"SUPER, S, hy3:movefocus, d"
"SUPER, D, hy3:movefocus, r"
"SUPER, Q, hy3:makegroup, tab, force_ephemeral"
"SUPER, E, hy3:changegroup, opposite"
"SUPER, B, hy3:changegroup, toggletab"
"SUPER SHIFT, BackSpace, exit"
"SUPER, F1, exec, $launcher"
"SUPER, F2, exec, $joplin"
"SUPER, F3, exec, $matrix_client"
"SUPER, F4, exec, $discord"
"SUPER, F5, exec, $deezer"
"SUPER, G, exec, $browser"
"SUPER, L, exec, $locker"
];
bindm =
[ "SUPER, mouse:272, movewindow" "SUPER, mouse:273, resizewindow" ];
bindn = [
", mouse:272, hy3:focustab, mouse"
", mouse_up, hy3:focustab, r, require_hovered, wrap"
", mouse_down, hy3:focustab, l, require_hovered, wrap"
];
bindel = [
", XF86AudioRaiseVolume, exec, swayosd-client --output-volume=raise"
", XF86AudioLowerVolume, exec, swayosd-client --output-volume=lower"
", XF86AudioMute, exec, swayosd-client --output-volume=mute-toggle"
", XF86MonBrightnessUp, exec, swayosd-client --brightness=up"
", XF86MonBrightnessDown, exec, swayosd-client --brightness=lower"
];
};
extraConfig = ''
submap = resize
bind = , escape, submap, reset
bind = SUPER Alt_L, R, submap, reset
binde = , A, resizeactive, -25 0
binde = , Z, resizeactive, 0 -25
binde = , S, resizeactive, 0 25
binde = , D, resizeactive, 25 0
submap = reset
bind = SUPER Alt_L, R, submap, resize
'';
};
programs.hyprlock = {
enable = true;
settings = {
general = {
disable_loading_bar = true;
hide_cursor = true;
grace = 0;
no_fade_in = true;
no_fade_out = true;
ignore_empty_input = true;
text_trim = true;
fractional_scaling = 2;
};
label = {
monitor = "";
halign = "left";
valign = "bottom";
position = "50, 50";
font_size = 64;
font_family = "Noto Sans";
text =
''cmd[update:1000] printf '<b>%s</b>' "$(date +%Y-%m-%d%n%H:%M:%S)"'';
};
background = {
monitor = "";
path = "screenshot";
blur_passes = 5;
blur_size = 1;
};
input-field = {
monitor = "";
size = "700, 50";
outline_thickness = 5;
outer_color = "rgba(0, 0, 0, 0)";
dots_size = 0.5;
placeholder_text = "";
fail_text = "";
};
};
};
}