Kieran's opinionated (and probably slightly dumb) nix config

feat: add hyprlock and hypridle

Changed files
+193 -3
home-manager
moonlark
home-manager/dots/face.png

This is a binary file and will not be displayed.

+2 -3
home-manager/dots/hyprland.conf
···
exec-once = sunpaper -d
exec-once = wluma
exec-once = waybar
+
exec-once = hypridle
exec-once=[workspace 8 silent] slack
exec-once=[workspace 9 silent] spotify
···
# Launcher
bind = $mainMod, S, exec, sh ~/.config/bspwm/rofi/bin/launcher
-
bind = $mainMod, N, exec, nmd
-
bind = $mainMod + ALT, T, exec, sh ~/.config/bspwm/rofi/bin/themes
bind = $mainMod, X, exec, sh ~/.config/bspwm/rofi/bin/powermenu
-
bind = $mainMod + ALT, S, exec, sh ~/.config/bspwm/rofi/bin/screenshot
# System
bind = $mainMod, Q, killactive,
bind = $mainMod, M, exit
+
bind = $mainMod, L, exec, hyprlock
bind = $mainMod, V, togglefloating,
bind = $mainMod, R, exec, wofi --show drun
bind = $mainMod, P, pseudo, # dwindle
+78
home-manager/dots/hyprlock.conf
···
+
source = $HOME/.config/hypr/macchiato.conf
+
+
$accent = $blue
+
$accentAlpha = $blueAlpha
+
$font = FiraCode Nerd Font
+
+
# GENERAL
+
general {
+
disable_loading_bar = true
+
hide_cursor = true
+
}
+
+
# BACKGROUND
+
background {
+
monitor =
+
blur_passes = 0
+
color = $base
+
}
+
+
# TIME
+
label {
+
monitor =
+
text = cmd[update:30000] echo "$(date +"%R")"
+
color = $text
+
font_size = 90
+
font_family = $font
+
position = -30, 0
+
halign = right
+
valign = top
+
}
+
+
# DATE
+
label {
+
monitor =
+
text = cmd[update:43200000] echo "$(date +"%A, %d %B %Y")"
+
color = $text
+
font_size = 25
+
font_family = $font
+
position = -30, -150
+
halign = right
+
valign = top
+
}
+
+
# USER AVATAR
+
+
image {
+
monitor =
+
path = ~/.config/face.png
+
size = 100
+
border_color = $accent
+
+
position = 0, 75
+
halign = center
+
valign = center
+
}
+
+
# INPUT FIELD
+
input-field {
+
monitor =
+
size = 300, 60
+
outline_thickness = 4
+
dots_size = 0.2
+
dots_spacing = 0.2
+
dots_center = true
+
outer_color = $accent
+
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, -35
+
halign = center
+
valign = center
+
}
+78
home-manager/dots/macchiato.conf
···
+
+
$rosewater = rgb(f4dbd6)
+
$rosewaterAlpha = f4dbd6
+
+
$flamingo = rgb(f0c6c6)
+
$flamingoAlpha = f0c6c6
+
+
$pink = rgb(f5bde6)
+
$pinkAlpha = f5bde6
+
+
$mauve = rgb(c6a0f6)
+
$mauveAlpha = c6a0f6
+
+
$red = rgb(ed8796)
+
$redAlpha = ed8796
+
+
$maroon = rgb(ee99a0)
+
$maroonAlpha = ee99a0
+
+
$peach = rgb(f5a97f)
+
$peachAlpha = f5a97f
+
+
$yellow = rgb(eed49f)
+
$yellowAlpha = eed49f
+
+
$green = rgb(a6da95)
+
$greenAlpha = a6da95
+
+
$teal = rgb(8bd5ca)
+
$tealAlpha = 8bd5ca
+
+
$sky = rgb(91d7e3)
+
$skyAlpha = 91d7e3
+
+
$sapphire = rgb(7dc4e4)
+
$sapphireAlpha = 7dc4e4
+
+
$blue = rgb(8aadf4)
+
$blueAlpha = 8aadf4
+
+
$lavender = rgb(b7bdf8)
+
$lavenderAlpha = b7bdf8
+
+
$text = rgb(cad3f5)
+
$textAlpha = cad3f5
+
+
$subtext1 = rgb(b8c0e0)
+
$subtext1Alpha = b8c0e0
+
+
$subtext0 = rgb(a5adcb)
+
$subtext0Alpha = a5adcb
+
+
$overlay2 = rgb(939ab7)
+
$overlay2Alpha = 939ab7
+
+
$overlay1 = rgb(8087a2)
+
$overlay1Alpha = 8087a2
+
+
$overlay0 = rgb(6e738d)
+
$overlay0Alpha = 6e738d
+
+
$surface2 = rgb(5b6078)
+
$surface2Alpha = 5b6078
+
+
$surface1 = rgb(494d64)
+
$surface1Alpha = 494d64
+
+
$surface0 = rgb(363a4f)
+
$surface0Alpha = 363a4f
+
+
$base = rgb(24273a)
+
$baseAlpha = 24273a
+
+
$mantle = rgb(1e2030)
+
$mantleAlpha = 1e2030
+
+
$crust = rgb(181926)
+
$crustAlpha = 181926
+33
home-manager/hyprland.nix
···
}: {
xdg.configFile."sunpaper/config".source = ./dots/sunpaperconfig;
xdg.configFile."hypr/hyprland.conf".source = ./dots/hyprland.conf;
+
xdg.configFile."hypr/hyprlock.conf".source = ./dots/hyprlock.conf;
+
xdg.configFile."hypr/macchiato.conf".source = ./dots/macchiato.conf;
+
xdg.configFile."face.png".source = ./dots/face.png;
+
+
programs.hyprlock.enable = true;
+
services.hypridle = {
+
enable = true;
+
settings= {
+
general = {
+
after_sleep_cmd = "hyprctl dispatch dpms on";
+
before_sleep_cmd = "hyprlock";
+
ignore_dbus_inhibit = false;
+
lock_cmd = "pidof hyprlock || hyprlock";
+
};
+
+
listener = [
+
{
+
timeout = 10;
+
on-timeout = "kill $(pidof wluma); brightnessctl -s set 10";
+
on-resume = "brightnessctl -r; wluma &";
+
}
+
{
+
timeout = 45;
+
on-timeout = "loginctl lock-session";
+
}
+
{
+
timeout = 105;
+
on-timeout = "hyprctl dispatch dpms off";
+
on-resume = "hyprctl dispatch dpms on";
+
}
+
];
+
};
+
};
}
+2
moonlark/configuration.nix
···
];
services.fprintd.enable = true;
+
security.pam.services.hyprlock = {};
fonts.packages = with pkgs; [
nerdfonts
···
};
programs.hyprland.enable = true;
+
services.hypridle.enable = true;
# enable cups
services.printing.enable = true;