My Nix Configuration

[flake] remove hyprlock

pyrox.dev 369b9367 bbe9ec38

verified
Changed files
+11 -104
homeModules
nixosModules
homes
thehedgehog-zaphod
programs
hyprland
-1
homeModules/wayland/hyprland/default.nix
···
imports = [
./services.nix
./hypridle.nix
-
./hyprlock.nix
];
config = {
catppuccin.hyprland.enable = c.enable;
+3 -1
homeModules/wayland/hyprland/hypridle.nix
···
enable = false;
settings = {
general = {
-
lock_cmd = "hyprlock";
+
lock_cmd = "loginctl lock-session";
+
before_sleep_cmd = "loginctl lock-session";
+
after_sleep_cmd = "hyprctl dispatch dpms on";
};
};
};
-93
homeModules/wayland/hyprland/hyprlock.nix
···
-
{
-
config,
-
lib,
-
...
-
}:
-
let
-
cfg = config.wayland.windowManager.hyprland;
-
in
-
{
-
config.catppuccin.hyprlock.enable = cfg.enable;
-
config.catppuccin.hyprlock.useDefaultConfig = false;
-
config.programs.hyprlock = lib.mkIf cfg.enable {
-
enable = true;
-
settings = {
-
general = {
-
hide_cursor = true;
-
immediate_render = true;
-
text_trim = true;
-
};
-
};
-
extraConfig = ''
-
$accent = $mauve
-
$accentAlpha = $mauveAlpha
-
$font = Blex Mono Nerd Font
-
-
# BACKGROUND
-
background {
-
monitor =
-
path = $HOME/bgs/wallpapers/xenia/chimmie_valentine_xenia.png
-
blur_passes = 1
-
color = $base
-
}
-
-
# TIME
-
label {
-
monitor =
-
text = $TIME
-
color = $text
-
font_size = 90
-
font_family = $font
-
position = -30, 0
-
halign = right
-
valign = top
-
}
-
-
# DATE
-
label {
-
monitor =
-
text = cmd[update:43200000] 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 = $HOME/.face
-
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, -47
-
halign = center
-
valign = center
-
}
-
'';
-
};
-
}
+8 -8
nixosModules/homes/thehedgehog-zaphod/caelestia-shell.json
···
"timeouts": [
{
"idleAction": "lock",
-
"timeout": 180
+
"timeout": 420
},
{
"idleAction": "dpms off",
"returnAction": "dpms on",
-
"timeout": 300
+
"timeout": 600
},
{
-
"idleAction": ["systemctl", "suspend-then-hibernate"],
-
"timeout": 600
+
"idleAction": ["systemctl", "suspend"],
+
"timeout": 900
}
]
}
···
"name": "Lock"
},
{
-
"command": ["systemctl", "suspend-then-hibernate"],
+
"command": ["systemctl", "suspend"],
"dangerous": false,
-
"description": "Suspend then hibernate",
+
"description": "Suspend",
"enabled": true,
"icon": "bedtime",
"name": "Sleep"
···
},
"session": {
"commands": {
-
"hibernate": ["systemctl", "hibernate"],
+
"hibernate": ["systemctl", "suspend"],
"logout": ["loginctl", "terminate-user", ""],
"reboot": ["systemctl", "reboot"],
"shutdown": ["systemctl", "poweroff"]
},
"dragThreshold": 30,
"enabled": true,
-
"vimKeybinds": false
+
"vimKeybinds": true
},
"sidebar": {
"dragThreshold": 80,
-1
nixosModules/programs/hyprland/default.nix
···
enable = true;
xwayland.enable = true;
};
-
programs.hyprlock.enable = cfg.enable;
};
}