nixos-config/nixos/components/gui/xorg/xlock.nix
Ingolf Wagner dadd3ef367
updates
2023-07-05 20:43:59 +02:00

25 lines
475 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.enable {
environment.systemPackages = [
lockProgram
(pkgs.makeDesktopItem {
name = "lock";
desktopName = "lock";
exec = "${lockProgram}/bin/lock";
terminal = false;
})
];
};
}