25 lines
480 B
Nix
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;
|
|
})
|
|
];
|
|
};
|
|
}
|