Renamed home to programs, moved definition to user level

This commit is contained in:
2025-09-22 23:35:57 +02:00
parent d3266d1c1d
commit 03aebab782
88 changed files with 236 additions and 731 deletions

View File

@@ -0,0 +1,78 @@
$rosewater = rgb(f5e0dc)
$rosewaterAlpha = f5e0dc
$flamingo = rgb(f2cdcd)
$flamingoAlpha = f2cdcd
$pink = rgb(f5c2e7)
$pinkAlpha = f5c2e7
$mauve = rgb(cba6f7)
$mauveAlpha = cba6f7
$red = rgb(f38ba8)
$redAlpha = f38ba8
$maroon = rgb(eba0ac)
$maroonAlpha = eba0ac
$peach = rgb(fab387)
$peachAlpha = fab387
$yellow = rgb(f9e2af)
$yellowAlpha = f9e2af
$green = rgb(a6e3a1)
$greenAlpha = a6e3a1
$teal = rgb(94e2d5)
$tealAlpha = 94e2d5
$sky = rgb(89dceb)
$skyAlpha = 89dceb
$sapphire = rgb(74c7ec)
$sapphireAlpha = 74c7ec
$blue = rgb(89b4fa)
$blueAlpha = 89b4fa
$lavender = rgb(b4befe)
$lavenderAlpha = b4befe
$text = rgb(cdd6f4)
$textAlpha = cdd6f4
$subtext1 = rgb(bac2de)
$subtext1Alpha = bac2de
$subtext0 = rgb(a6adc8)
$subtext0Alpha = a6adc8
$overlay2 = rgb(9399b2)
$overlay2Alpha = 9399b2
$overlay1 = rgb(7f849c)
$overlay1Alpha = 7f849c
$overlay0 = rgb(6c7086)
$overlay0Alpha = 6c7086
$surface2 = rgb(585b70)
$surface2Alpha = 585b70
$surface1 = rgb(45475a)
$surface1Alpha = 45475a
$surface0 = rgb(313244)
$surface0Alpha = 313244
$base = rgb(1e1e2e)
$baseAlpha = 1e1e2e
$mantle = rgb(181825)
$mantleAlpha = 181825
$crust = rgb(11111b)
$crustAlpha = 11111b

View File

@@ -0,0 +1,50 @@
{
pkgs,
...
}:
{
imports = [
./hyprland.nix
./hypridle.nix
./hyprlock.nix
];
home.packages = with pkgs; [
grim
slurp
wl-clipboard
];
home.file.".config/hypr" = {
source = ./configs;
# copy the scripts directory recursively
recursive = true;
};
home.file.".config/hypr/avatar" = {
source = ../../../avatar;
recursive = true;
};
home.file = {
"Pictures/Avatar" = {
source = ../../../avatar;
recursive = true;
};
};
home.pointerCursor = {
gtk.enable = true;
package = pkgs.bibata-cursors;
name = "Bibata-Modern-Classic";
size = 16;
};
home.file.".config/hypr/hyprland.conf".enable = false;
# NOTE: this executable is used by greetd to start a wayland session when system boot up
# with such a vendor-no-locking script, we can switch to another wayland compositor without modifying greetd's config in NixOS module
home.file.".wayland-session" = {
source = "${pkgs.hyprland}/bin/Hyprland";
executable = true;
};
}

View File

@@ -0,0 +1,35 @@
{ pkgs, ... }:
{
# Hyprland and related packages
home.packages = with pkgs; [
hypridle
];
# Hypridle configuration
services.hypridle = {
enable = true;
settings = {
general = {
after_sleep_cmd = "hyprctl dispatch dpms on";
ignore_dbus_inhibit = false;
lock_cmd = "hyprlock";
before_sleep_cmd = ''
notify-send -u critical "Hey master, Im getting sleepy Ill see you in my code dreams 💖" --icon
="$HOME/.config/hypr/avatar.png" --app-name="Hyprlock"'';
};
listener = [
{
timeout = 300;
on-timeout = "hyprlock";
}
{
timeout = 600;
on-timeout = "hyprctl dispatch dpms off";
on-resume = "hyprctl dispatch dpms on";
}
];
};
};
}

View File

@@ -0,0 +1,269 @@
{ pkgs, ... }:
let
package = pkgs.hyprland;
super = "SUPER";
terminal = "kitty";
fileManager = "yazi";
theme = "-theme $HOME/.config/rofi/custom.rasi";
menu = "rofi -show drun ${theme}";
filebrowser = "rofi -show filebrowser ${theme}";
power = "rofi -show p -modi p:rofi-power-menu -theme $HOME/.config/rofi/power.rasi";
apps = "rofi -show window ${theme}";
in
{
systemd.user.targets.hyprland-sessionn.Unit.Wants = [
"xdg-desktop-autostart.target"
];
wayland.windowManager.hyprland = {
inherit package;
enable = true;
xwayland.enable = true;
systemd = {
enable = true;
variables = [ "--all" ];
enableXdgAutostart = true;
};
plugins = [
#inputs.hyprland-plugins.packages.${pkgs.stdenv.hostPlatform.system}.hyprbars
];
};
wayland.windowManager.hyprland.settings = {
source = [
"~/.config/hypr/mocha.conf"
];
env = [
"NIXOS_OZONE_WL,1"
"MOZ_ENABLE_WAYLAND,1"
"MOZ_WEBRENDER,1"
"_JAVA_AWT_WM_NONREPARENTING,1"
"QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
"QT_QPA_PLATFORM,wayland"
"SDL_VIDEODRIVER,wayland"
"GDK_BACKEND,wayland,x11"
"XCURSOR_SIZE,24"
"EDITOR,nvim"
];
monitor = [
"DP-1, 1920x1080@60, 1920x0, 1"
"HDMI-A-2, 1920x1080@60, 0x0, 1"
];
input = {
kb_layout = "de";
kb_variant = "mac";
repeat_rate = 50;
repeat_delay = 300;
accel_profile = "flat";
follow_mouse = 1;
mouse_refocus = false;
sensitivity = 0; # -1.0 to 1.0, 0 means no modification.
numlock_by_default = 1;
touchpad = {
natural_scroll = true;
};
};
general = {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
gaps_in = 4;
gaps_out = 0;
border_size = 4;
"col.active_border" = "$green";
"col.inactive_border" = "$red";
layout = "dwindle";
# Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
allow_tearing = false;
};
decoration = {
rounding = 1;
shadow = {
enabled = false;
range = 16;
render_power = 4;
ignore_window = true;
color = "$green";
color_inactive = "$red";
};
blur = {
enabled = true;
size = 1;
passes = 3;
new_optimizations = 1;
noise = 0.04;
};
};
animations = {
enabled = "yes";
bezier = "myBezier, 0.05, 0.9, 0.1, 1.05";
animation = [
"windows, 1, 7, myBezier"
"windowsOut, 1, 7, default, popin 80%"
"border, 1, 10, default"
"borderangle, 1, 8, default"
"fade, 1, 7, default"
"workspaces, 1, 6, default"
];
};
layerrule = [
"blur,gtk-layer-shell"
"ignorezero,gtk-layer-shell"
"blur,notifications"
"ignorezero,notifications"
"blur,rofi"
"ignorezero,rofi"
];
dwindle = {
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
pseudotile = "yes"; # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
preserve_split = "yes"; # you probably want this
};
gestures = {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
workspace_swipe = "off";
};
misc = {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
force_default_wallpaper = 0; # Set to 0 or 1 to disable the anime mascot wallpapers
};
# Example per-device config
# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more
device = {
name = "epic-mouse-v1";
sensitivity = -0.5;
};
windowrulev2 = "suppressevent maximize, class:.*";
windowrule = [
"opacity 0.0 override, class:^(xwaylandvideobridge)$"
"noanim, class:^(xwaylandvideobridge)$"
"noinitialfocus, class:^(xwaylandvideobridge)$"
"maxsize 1 1, class:^(xwaylandvideobridge)$"
"noblur, class:^(xwaylandvideobridge)$"
"nofocus, class:^(xwaylandvideobridge)$"
];
# See further https://wiki.hypr.land/Configuring/Workspace-Rules/
exec-once = [
"waybar &"
#"hyprpaper &"
#"wpaperd -d"
"swww-daemon & disown"
];
# Keybindings
bind = [
# Application Bindings
"${super}, Q, exec, ${terminal}"
"${super}, E, exec, ${fileManager}"
"${super}, O, exec, obsidian"
"${super}, I, exec, floorp"
"${super}, G, exec, thunderbird"
# Lock Screen
"${super}, M, exit, "
# swaync
"${super}, Y, exec, swaync-client -t -sw"
# Rofi bindings
"${super}, F, exec, ${filebrowser}"
"${super}, A, exec, ${apps}"
"${super}, R, exec, ${menu}"
"${super}, S, exec, ${power}"
# Move focus with mainMod + arrow keys
"${super}, left, movefocus, l"
"${super}, right, movefocus, r"
"${super}, up, movefocus, u"
"${super}, down, movefocus, d"
# Window Modifiers
"${super}, P, pseudo, " # dwindle
"${super}, J, togglesplit, " # dwindle
"${super}, V, togglefloating, " # dwindle
"${super}, C, killactive, "
# Switch workspaces with mainMod + [0-9]
"${super}, 1, workspace, 1"
"${super}, 2, workspace, 2"
"${super}, 3, workspace, 3"
"${super}, 4, workspace, 4"
"${super}, 5, workspace, 5"
"${super}, 6, workspace, 6"
"${super}, 7, workspace, 7"
"${super}, 8, workspace, 8"
"${super}, 9, workspace, 9"
"${super}, 0, workspace, 10"
# Move active window to a workspace with mainMod + SHIFT + [0-9]
"${super} SHIFT, 1, movetoworkspace, 1"
"${super} SHIFT, 2, movetoworkspace, 2"
"${super} SHIFT, 3, movetoworkspace, 3"
"${super} SHIFT, 4, movetoworkspace, 4"
"${super} SHIFT, 5, movetoworkspace, 5"
"${super} SHIFT, 6, movetoworkspace, 6"
"${super} SHIFT, 7, movetoworkspace, 7"
"${super} SHIFT, 8, movetoworkspace, 8"
"${super} SHIFT, 9, movetoworkspace, 9"
"${super} SHIFT, 0, movetoworkspace, 10"
# Example special workspace (scratchpad)
#"${super}, S, togglespecialworkspace, magic"
"${super} SHIFT, S, movetoworkspace, special:magic"
# Scroll through existing workspaces with mainMod + scroll
"${super}, mouse_down, workspace, e+1"
"${super}, mouse_up, workspace, e-1"
# Screenshot
''${super}, Z, exec, grim -g "$(slurp)" $HOME/Pictures/Screenshots/$(date +'%s_grim.png')''
''${super}, U, exec, grim $HOME/Pictures/Screenshots/$(date +'%s_grim.png')''
];
bindl = [
#", XF86AudioMute, exec, amixer set Master toggle
", XF86AudioMute, exec, pamixer -t"
", XF86AudioPlay, exec, playerctl play-pause" # the stupid key is called play , but it toggles
", XF86AudioNext, exec, playerctl next"
", XF86AudioPrev, exec, playerctl previous"
];
bindle = [
# Multi Media Control
", XF86AudioRaiseVolume, exec, pamixer -i 5"
", XF86AudioLowerVolume, exec, pamixer -d 5"
", XF86MonBrightnessUp, exec, brightnessctl set +5%"
", XF86MonBrightnessDown, exec, brightnessctl set 5%-"
];
bindm = [
"${super}, mouse:272, movewindow"
"${super}, mouse:273, resizewindow"
];
};
}

View File

@@ -0,0 +1,120 @@
{ pkgs, catppuccin, ... }:
{
# Hyprland and related packages
home.packages = with pkgs; [
hyprlock
];
catppuccin.hyprlock.enable = false;
# Hyprlock configuration
programs.hyprlock = {
enable = true;
settings = {
source = "$HOME/.config/hypr/mocha.conf";
"$accent" = "$mauve";
"$accentAlpha" = "$mauveAlpha";
"$font" = "JetBrainsMono Nerd Font";
general = {
disable_loading_bar = true;
hide_cursor = true;
};
background = [
{
path = "~/Pictures/Wallpapers/lucy_with_cat.png";
blur_passes = 1;
blur_size = 5;
}
];
label = [
# TIME
{
monitor = "";
text = "$TIME";
color = "$peach";
font_size = 90;
font_family = "$font";
position = "0, -100";
halign = "center";
valign = "top";
}
# DATE
{
monitor = "";
text = ''cmd[update:43200000] date +"%A, %d %B %Y"'';
color = "$peach";
font_size = 25;
font_family = "$font";
position = "0, 100";
halign = "center";
valign = "bottom";
}
# Message
{
monitor = "";
text = "Waiting for you...";
color = "$peach";
font_size = 20;
font_family = "$font";
position = "0, 200";
halign = "center";
valign = "bottom";
}
# Weather
{
monitor = "";
text = ''cmd[update:60000] curl -s "wttr.in/52.281311,10.527029?format=1"'';
color = "$peach";
font_size = 20;
font_family = "$font";
position = "0, 50";
halign = "center";
valign = "bottom";
}
];
# INPUT FIELD
input-field = {
monitor = "";
size = "300, 60";
outline_thickness = 4;
dots_size = 0.2;
dots_spacing = 0.2;
dots_center = "true";
outer_color = "$red";
inner_color = "$surface0";
font_color = "$text";
fade_on_empty = false;
placeholder_text = ''<span foreground="##$textAlpha"><i>󰌾 Logged in as </i><span foreground="##$accentAlpha">$USER</span></span>'';
hide_input = false;
check_color = "$accent";
fail_color = "$red";
fail_text = "<i>$FAIL <b>($ATTEMPTS)</b></i>";
capslock_color = "$yellow";
position = "0, -150";
halign = "center";
valign = "center";
};
image = {
monitor = "";
path = "~/.config/hypr/avatar/avatar.png";
size = 300;
border_color = "$teal";
position = "0, 75";
halign = "center";
valign = "center";
};
};
};
}