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