nixos-config/components/gui/xorg/xlock.nix

26 lines
480 B
Nix
Raw Normal View History

2023-04-26 09:09:26 +02:00
{ lib, pkgs, config, ... }:
2019-10-24 02:20:38 +02:00
with lib;
let
name = "lock";
# the lock program
2019-12-20 05:54:26 +01:00
lockProgram = pkgs.writeShellScriptBin "${name}" ''
${pkgs.xlockmore}/bin/xlock -mode life1d -size 1
'';
2019-10-24 02:20:38 +02:00
2021-11-01 09:20:42 +01:00
in
{
2024-05-03 23:43:26 +02:00
config = mkIf config.components.gui.xorg.enable {
2023-07-05 20:43:59 +02:00
environment.systemPackages = [
lockProgram
(pkgs.makeDesktopItem {
name = "lock";
desktopName = "lock";
exec = "${lockProgram}/bin/lock";
terminal = false;
})
];
2023-02-17 00:59:29 +01:00
};
2019-10-24 02:20:38 +02:00
}