add and configure gtklock

This commit is contained in:
Fabian Montero 2025-08-08 10:49:07 -06:00
parent ef8b281c19
commit aa7265e49e
Signed by: fabian
GPG key ID: 1FFAC35E1798174F
3 changed files with 86 additions and 0 deletions

View file

@ -15,6 +15,7 @@
./bluetooth.nix
./net.nix
./steam.nix
./gtklock.nix
];
fonts.packages = with pkgs; [

84
sys/modules/gtklock.nix Normal file
View file

@ -0,0 +1,84 @@
{
config,
lib,
pkgs,
...
}:
with lib; let
cfg = config.local.sys.gtklock;
in {
options.local.sys.gtklock = {
enable = mkEnableOption "gtklock settings";
};
config = mkIf cfg.enable {
programs.gtklock = {
enable = true;
config = {
main = {
idle-hide = true;
idle-timeout = 1;
time-format = "%H:%M:%S";
start-hidden = true;
};
};
style = ''
/* Main lockscreen window */
window {
background-color: rgba(20, 20, 20, 0.9); /* dark, slightly translucent */
color: #eaeaea;
font-family: "JetBrains Mono", monospace;
font-size: 14px;
}
/* Container for clock + prompt */
#main-box {
background: transparent;
border: none;
border-radius: 0;
padding: 0;
margin: 0;
}
/* Clock text */
#clock {
font-size: 32px;
font-weight: bold;
color: #ffffff;
margin-bottom: 12px;
}
/* Date text */
#date {
font-size: 14px;
color: #aaaaaa;
margin-bottom: 24px;
}
/* Password entry */
entry {
background-color: rgba(0, 0, 0, 0.5);
color: #ffffff;
border: none;
border-radius: 0;
padding: 6px 8px;
font-family: "JetBrains Mono", monospace;
font-size: 12px;
}
/* Hide any extra icons in the entry */
entry image {
opacity: 0;
width: 0;
height: 0;
}
/* Wrong password feedback */
#auth-failure {
color: #ff6666;
font-size: 12px;
margin-top: 6px;
}
'';
};
};
}

View file

@ -20,6 +20,7 @@
virtualisation.enable = true;
androidSupport.enable = true;
steam.enable = true;
gtklock.enable = true;
users = {
fabian = {