initial commit

This commit is contained in:
2026-08-15 16:21:08 -07:00
commit a67158f51b
24 changed files with 814 additions and 0 deletions

53
home/brave.nix Normal file
View File

@@ -0,0 +1,53 @@
{ pkgs, ... }:
let
bravePolicies = {
# Disable built-in autofill/password prompts in favor of Bitwarden
PasswordManagerEnabled = false;
AutofillCreditCardEnabled = false;
AutofillAddressEnabled = false;
# Dark Mode enforcement
BrowserColorScheme = 2; # 1 = Light, 2 = Dark
ForceDarkModeEnabled = true;
# Default Search Engine -> Brave Search
DefaultSearchProviderEnabled = true;
DefaultSearchProviderName = "Brave";
DefaultSearchProviderSearchURL = "https://search.brave.com/search?q={searchTerms}";
DefaultSearchProviderSuggestURL = "https://search.brave.com/api/suggest?q={searchTerms}";
# Font Settings
DefaultFontSize = 16;
DefaultFixedFontSize = 14;
FontFamilyMap = {
standard = "Inter";
sansserif = "Inter";
fixed = "JetBrainsMono Nerd Font";
serif = "DejaVu Serif";
};
};
in
{
programs.chromium = {
enable = true;
package = pkgs.brave;
commandLineArgs = [
"--enable-features=UseOzonePlatform"
"--ozone-platform=wayland"
"--enable-wayland-ime"
"--ignore-gpu-blocklist"
"--enable-gpu-rasterization"
"--enable-zero-copy"
];
extensions = [
{ id = "nngceckbapebfimnlniiiahkandclblb"; } # Bitwarden
{ id = "hfjbmagddngcpeloejdejnfgbamkjaeg"; } # Vimium C
];
};
xdg.configFile."brave/policies/managed/policies.json".text = builtins.toJSON bravePolicies;
xdg.configFile."BraveSoftware/Brave-Browser/policies/managed/policies.json".text = builtins.toJSON bravePolicies;
xdg.configFile."chromium/policies/managed/policies.json".text = builtins.toJSON bravePolicies;
}

11
home/default.nix Normal file
View File

@@ -0,0 +1,11 @@
{ pkgs, ... }:
{
imports = [
./hypr
./foot.nix
./brave.nix
];
home.stateVersion = "26.05";
}

17
home/foot.nix Normal file
View File

@@ -0,0 +1,17 @@
{ pkgs, ... }:
{
programs.foot = {
enable = true;
settings = {
main = {
font = "JetBrainsMono Nerd Font:size=16";
padding = "8x8";
};
colors = {
background = "0f172a";
foreground = "f8fafc";
};
};
};
}

18
home/hypr/default.nix Normal file
View File

@@ -0,0 +1,18 @@
{ pkgs, ... }:
{
imports = [
./hyprland.nix
./hyprlock.nix
./hypridle.nix
# ../waybar
];
home.packages = with pkgs; [
grim
slurp
wl-clipboard
cliphist
brightnessctl
];
}

40
home/hypr/hypridle.nix Normal file
View File

@@ -0,0 +1,40 @@
{ pkgs, ... }:
{
services.hypridle = {
enable = true;
settings = {
general = {
lock_cmd = "pidof hyprlock || hyprlock";
before_sleep_cmd = "loginctl lock-session";
after_sleep_cmd = "hyprctl dispatch dpms on";
};
listener = [
# 1. Dim screen brightness after 2.5 minutes
{
timeout = 150;
on-timeout = "brightnessctl -s set 10";
on-resume = "brightnessctl -r";
}
# 2. Lock screen after 5 minutes
{
timeout = 300;
on-timeout = "loginctl lock-session";
}
# 3. Turn off displays (DPMS) after 10 minutes
{
timeout = 600;
on-timeout = "hyprctl dispatch dpms off";
on-resume = "hyprctl dispatch dpms on";
}
# 4. Suspend system after 30 minutes
{
timeout = 1800;
on-timeout = "systemctl suspend";
}
];
};
};
}

167
home/hypr/hyprland.nix Normal file
View File

@@ -0,0 +1,167 @@
{ pkgs, lib, ... }:
let
mod = "SUPER";
in
{
wayland.windowManager.hyprland = {
settings = {
# -----------------------------------------------------------------------
# 1. Variables & Modifiers
# -----------------------------------------------------------------------
"$mod" = mod;
"$terminal" = "foot";
"$menu" = "rofi -show drun";
"$browser" = "brave";
# -----------------------------------------------------------------------
# 2. General, Layout & Decoration
# -----------------------------------------------------------------------
general = {
gaps_in = 4;
gaps_out = 8;
border_size = 2;
"col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg";
"col.inactive_border" = "rgba(595959aa)";
layout = "dwindle";
allow_tearing = false;
};
decoration = {
rounding = 8;
active_opacity = 1.0;
inactive_opacity = 0.95;
blur = {
enabled = true;
size = 5;
passes = 2;
new_optimizations = true;
};
shadow = {
enabled = true;
range = 4;
render_power = 3;
color = "rgba(1a1a1aee)";
};
};
animations = {
enabled = true;
bezier = [
"easeOutQuint, 0.23, 1, 0.32, 1"
];
animation = [
"windows, 1, 3, easeOutQuint"
"windowsOut, 1, 3, easeOutQuint, popin 80%"
"border, 1, 3, easeOutQuint"
"fade, 1, 3, easeOutQuint"
"workspaces, 1, 3, easeOutQuint"
];
};
input = {
kb_layout = "us";
follow_mouse = 1;
touchpad = {
natural_scroll = true;
};
sensitivity = 0;
};
dwindle = {
pseudotile = true;
preserve_split = true;
};
misc = {
force_default_wallpaper = 0;
disable_hyprland_logo = true;
};
# -----------------------------------------------------------------------
# 3. Autostart Daemons & Apps
# -----------------------------------------------------------------------
exec-once = [
"waybar"
"dunst"
"hypridle"
"wl-paste --type text --watch cliphist store"
"wl-paste --type image --watch cliphist store"
];
# -----------------------------------------------------------------------
# 4. Keybindings
# -----------------------------------------------------------------------
bind = [
# Launchers & Applications
"$mod, RETURN, exec, $terminal"
"$mod, SPACE, exec, $menu"
"$mod, B, exec, $browser"
"$mod, D, exec, discord"
"$mod, E, exec, $terminal -e yazi"
"$mod, L, exec, hyprlock"
# Window Controls
"$mod SHIFT, Q, killactive,"
"$mod, F, fullscreen, 0"
"$mod, V, togglefloating,"
"$mod, P, pseudo,"
"$mod, J, togglesplit,"
# Screenshots (Grim + Slurp)
"$mod, PRINT, exec, grim -g \"$(slurp)\" - | wl-copy"
"$mod SHIFT, PRINT, exec, grim ~/Pictures/Screenshot_$(date +'%Y%m%d_%H%M%S').png"
# Vim Focus Navigation (H, J, K, L & Arrows)
"$mod, left, movefocus, l"
"$mod, right, movefocus, r"
"$mod, up, movefocus, u"
"$mod, down, movefocus, d"
"$mod, h, movefocus, l"
"$mod, l, movefocus, r"
"$mod, k, movefocus, u"
"$mod, j, movefocus, d"
# Vim Window Swapping
"$mod SHIFT, left, swapwindow, l"
"$mod SHIFT, right, swapwindow, r"
"$mod SHIFT, up, swapwindow, u"
"$mod SHIFT, down, swapwindow, d"
"$mod SHIFT, h, swapwindow, l"
"$mod SHIFT, l, swapwindow, r"
"$mod SHIFT, k, swapwindow, u"
"$mod SHIFT, j, swapwindow, d"
# Scratchpad / Special Workspace
"$mod, S, togglespecialworkspace, magic"
"$mod SHIFT, S, movetoworkspace, special:magic"
]
# Generate Workspace 1-10 switching and moving bindings with a list comprehension
++ (map (i: "$mod, ${toString i}, workspace, ${toString i}") (lib.range 1 9))
++ [ "$mod, 0, workspace, 10" ]
++ (map (i: "$mod SHIFT, ${toString i}, movetoworkspace, ${toString i}") (lib.range 1 9))
++ [ "$mod SHIFT, 0, movetoworkspace, 10" ];
# Locked/repeating bindings (Volume, Media, Brightness)
bindle = [
", XF86MonBrightnessUp, exec, brightnessctl set +5%"
", XF86MonBrightnessDown, exec, brightnessctl set 5%-"
];
bindl = [
", XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"
", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
", XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
];
# Mouse bindings (move/resize floating windows)
bindm = [
"$mod, mouse:272, movewindow"
"$mod, mouse:273, resizewindow"
];
};
};
}

75
home/hypr/hyprlock.nix Normal file
View File

@@ -0,0 +1,75 @@
{ pkgs, ... }:
{
programs.hyprlock = {
enable = true;
settings = {
general = {
disable_loading_bar = true;
grace = 0;
hide_cursor = true;
no_fade_in = false;
};
# Background with screenshot blur effect
background = [
{
path = "screenshot";
blur_passes = 3;
blur_size = 8;
noise = 0.0117;
contrast = 0.8916;
brightness = 0.8172;
vibrancy = 0.1696;
vibrancy_darkness = 0.0;
}
];
# Clock display
label = [
{
monitor = "";
text = "$TIME";
color = "rgba(242, 243, 244, 0.75)";
font_size = 95;
font_family = "JetBrainsMono Nerd Font Bold";
position = "0, 200";
halign = "center";
valign = "center";
}
{
monitor = "";
text = "cmd[update:1000] echo \"$(date +'%A, %B %d')\"";
color = "rgba(242, 243, 244, 0.6)";
font_size = 22;
font_family = "JetBrainsMono Nerd Font";
position = "0, 100";
halign = "center";
valign = "center";
}
];
# Password Input Field
input-field = [
{
monitor = "";
size = "250, 50";
outline_thickness = 2;
dots_size = 0.2;
dots_spacing = 0.2;
dots_center = true;
outer_color = "rgba(33ccffee)";
inner_color = "rgba(15, 23, 42, 0.85)";
font_color = "rgb(242, 243, 244)";
fade_on_empty = false;
placeholder_text = "<i>Enter Password...</i>";
hide_input = false;
position = "0, -50";
halign = "center";
valign = "center";
}
];
};
};
}