diff --git a/sys/modules/default.nix b/sys/modules/default.nix index 602c965..00f03d1 100644 --- a/sys/modules/default.nix +++ b/sys/modules/default.nix @@ -15,6 +15,7 @@ ./bluetooth.nix ./net.nix ./steam.nix + ./gtklock.nix ]; fonts.packages = with pkgs; [ diff --git a/sys/modules/gtklock.nix b/sys/modules/gtklock.nix new file mode 100644 index 0000000..1450704 --- /dev/null +++ b/sys/modules/gtklock.nix @@ -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; + } + ''; + }; + }; +} diff --git a/sys/platforms/posixlycorrect/default.nix b/sys/platforms/posixlycorrect/default.nix index 853d2ab..09ad159 100644 --- a/sys/platforms/posixlycorrect/default.nix +++ b/sys/platforms/posixlycorrect/default.nix @@ -20,6 +20,7 @@ virtualisation.enable = true; androidSupport.enable = true; steam.enable = true; + gtklock.enable = true; users = { fabian = {