3AM but we bangin

This commit is contained in:
javif89 2025-08-09 03:35:49 -04:00
parent 6ac828ca48
commit 561e273c1a
7 changed files with 126 additions and 76 deletions

View File

@ -6,6 +6,7 @@
{
imports = [
./home/kitty.nix
./home/ssh.nix
./home/shell.nix
./home/starship.nix
./home/git.nix
@ -52,9 +53,13 @@
btop
fastfetch
# Langs
php
go
nodejs_22
bun
# Util
xclip
flameshot
# Media
mpc

View File

@ -8,11 +8,15 @@
{
home.packages = [
pkgs.wofi
pkgs.hyprlock
pkgs.hyprpaper
# pkgs.hyprlock
pkgs.mako
pkgs.libnotify
];
imports = [
# Configs
./hyprland/binds.nix
# Ecosystem
./hyprland/hyprpaper.nix
];
@ -41,76 +45,10 @@
general = {
layout = "master";
gaps_out = 5;
gaps_in = 5;
gaps_out = 10;
gaps_in = 10;
};
bind = [
# Start programs
"$mod, q, exec, $terminal"
"$mod SHIFT, o, exec, $browser"
"$mod SHIFT, p, exec, $browser --incognito"
"$mod, e, exec, $file_browser"
"$mod SHIFT, n, exec, kitty --start-as=normal -- bash -ic 'code ~/nix && exit'"
"$mod, RETURN, exec, $webapphttps://chatgpt.com"
# Window and workspace navigation
# Move between windows with vim keys
"$mod, h, movefocus, l"
"$mod, l, movefocus, r"
"$mod, k, movefocus, u"
"$mod, j, movefocus, d"
"$mod, c, killactive"
# Move between workspaces
"$mod ALT, l, movetoworkspace, r+1"
"$mod ALT, h, movetoworkspace, r-1"
"$mod SHIFT, l, workspace, r+1"
"$mod SHIFT, h, workspace, r-1"
# Window management
"$mod, 0, layoutmsg, rollnext"
"$mod, f, fullscreen, 0"
"$mod, v, togglefloating, active"
"$mod, SPACE, exec, wofi --show drun"
# ", Print, exec, grimblast copy area"
# "$mod, r, exec, kitty -- zsh -c 'exec yazi; exec zsh'"
# "$mod, b, exec, kitty -- zsh -c 'btop; exec zsh'"
# "$mod, y, exec, kitty --start-as=normal -- zsh -ic 'repos'"
# "$mod, i, exec, brave"
# "$mod, u, exec, kitty --start-as=normal -- zsh -ic 'home'"
"$mod SHIFT, s, togglespecialworkspace, comms"
# "$mod, v, togglespecialworkspace, special2"
# Log out
# "$mod, -, exec, hyprctl dispatch exit"
"$mod SHIFT ALT, x, exec, hyprctl dispatch exit"
# Shift+Print → select area and copy
"SHIFT, Print, exec, grimblast copy area"
# Ctrl+Print → select window and copy
"CTRL, Print, exec, grimblast copy active"
]
++ (
# workspaces
# binds $mod + [shift +] {1..9} to [move to] workspace {1..9}
builtins.concatLists (
builtins.genList (
i:
let
ws = i + 1;
in
[
"$mod, code:1${toString i}, workspace, ${toString ws}"
"$mod SHIFT, code:1${toString i}, movetoworkspace, ${toString ws}"
]
) 9
)
);
workspace = [
1
2

80
home/hyprland/binds.nix Normal file
View File

@ -0,0 +1,80 @@
{
config,
pkgs,
inputs,
...
}:
{
wayland.windowManager.hyprland.settings = {
"$mod" = "SUPER";
"$browser" = "brave";
"$terminal" = "kitty";
"$file_browser" = "nautilus";
"$webapp" = "$browser --new-window --app=";
binds = {
drag_threshold = 10;
};
bindm = [
"$mod, mouse:272, movewindow"
"$mod, mouse:273, resizewindow"
];
bind = [
# Start programs
"$mod, q, exec, $terminal"
"$mod SHIFT, o, exec, $browser"
"$mod SHIFT, p, exec, $browser --incognito"
"$mod, e, exec, $file_browser"
"$mod SHIFT, n, exec, kitty --start-as=normal -- bash -ic 'code ~/nix && exit'"
"$mod, RETURN, exec, $webapphttps://chatgpt.com"
# Window and workspace navigation
# Move between windows with vim keys
"$mod, h, movefocus, l"
"$mod, l, movefocus, r"
"$mod, k, movefocus, u"
"$mod, j, movefocus, d"
"$mod, c, killactive"
# Move between workspaces
"$mod ALT, l, movetoworkspace, r+1"
"$mod ALT, h, movetoworkspace, r-1"
"$mod SHIFT, l, workspace, r+1"
"$mod SHIFT, h, workspace, r-1"
# Window management
"$mod, 0, layoutmsg, rollnext"
"$mod, f, fullscreen, 0"
"$mod, v, togglefloating, active"
"$mod, SPACE, exec, wofi --show drun"
"$mod SHIFT, s, togglespecialworkspace, comms"
"$mod SHIFT ALT, x, exec, hyprctl dispatch exit"
"SHIFT, Print, exec, grimblast copy area"
"CTRL, Print, exec, grimblast copy active"
]
++ (
# workspaces
# binds $mod + [shift +] {1..9} to [move to] workspace {1..9}
builtins.concatLists (
builtins.genList (
i:
let
ws = i + 1;
in
[
"$mod, code:1${toString i}, workspace, ${toString ws}"
"$mod SHIFT, code:1${toString i}, movetoworkspace, ${toString ws}"
]
) 9
)
);
};
wayland.windowManager.hyprland.plugins = [
# inputs.hyprland-plugins.packages.${pkgs.stdenv.hostPlatform.system}.hyprbars
];
}

View File

View File

@ -10,7 +10,7 @@ let
font_size 16.0
background_opacity 0.9
background_opacity 0.7
background_blur 1
hide_window_decorations yes

View File

@ -13,9 +13,7 @@
shellAliases = {
sudo = "sudo ";
# Better ls with eza
ls = "eza";
ll = "eza -la";
la = "eza -la";
ls = "eza -lg --group-directories-first --icons";
tree = "eza --tree";
# Convenience

29
home/ssh.nix Normal file
View File

@ -0,0 +1,29 @@
{ config, pkgs, ... }:
{
# Enable SSH client and add to agent automatically
programs.ssh = {
enable = true;
addKeysToAgent = "yes";
};
# Per-user ssh-agent (systemd --user)
services.ssh-agent.enable = true;
# Systemd unit to load all private keys from ~/.ssh
systemd.user.services."ssh-add-all-keys" = {
Unit = {
Description = "Add all SSH keys from ~/.ssh to ssh-agent";
After = [ "ssh-agent.service" ];
Requires = [ "ssh-agent.service" ];
};
Service = {
Type = "oneshot";
Environment = [ "SSH_ASKPASS_REQUIRE=prefer" ];
ExecStart = ''
${pkgs.openssh}/bin/ssh-add -q ~/.ssh/id_* 2>/dev/null || true
'';
};
Install.WantedBy = [ "default.target" ];
};
}