nixos-config/components/gui/xorg/xlock.nix
2024-06-07 22:56:52 +02:00

25 lines
480 B
Nix

{ lib, pkgs, config, ... }:
with lib;
let
name = "lock";
# the lock program
lockProgram = pkgs.writeShellScriptBin "${name}" ''
${pkgs.xlockmore}/bin/xlock -mode life1d -size 1
'';
in
{
config = mkIf config.components.gui.xorg.enable {
environment.systemPackages = [
lockProgram
(pkgs.makeDesktopItem {
name = "lock";
desktopName = "lock";
exec = "${lockProgram}/bin/lock";
terminal = false;
})
];
};
}