updates
This commit is contained in:
parent
4816145c14
commit
dadd3ef367
9 changed files with 121 additions and 70 deletions
nixos/components/gui/xorg
|
@ -4,25 +4,6 @@ let
|
|||
|
||||
name = "lock";
|
||||
|
||||
# desktop file
|
||||
# ------------
|
||||
# makes it possible to be used by other programs
|
||||
desktopFile = pkgs.writeTextFile {
|
||||
name = "${name}.desktop";
|
||||
destination = "/share/applications/${name}.desktop";
|
||||
text = ''
|
||||
[Desktop Entry]
|
||||
Categories=Application;Utility;
|
||||
Comment=Screen Saver
|
||||
Encoding=UTF-8
|
||||
Exec=${lockProgram}/bin/${name}
|
||||
Icon=gnome-lockscreen
|
||||
Name=${name}
|
||||
Terminal=false
|
||||
Type=Application
|
||||
'';
|
||||
};
|
||||
|
||||
# the lock program
|
||||
lockProgram = pkgs.writeShellScriptBin "${name}" ''
|
||||
${pkgs.xlockmore}/bin/xlock -mode life1d -size 1
|
||||
|
@ -31,6 +12,14 @@ let
|
|||
in
|
||||
{
|
||||
config = mkIf config.components.gui.enable {
|
||||
environment.systemPackages = [ lockProgram desktopFile ];
|
||||
environment.systemPackages = [
|
||||
lockProgram
|
||||
(pkgs.makeDesktopItem {
|
||||
name = "lock";
|
||||
desktopName = "lock";
|
||||
exec = "${lockProgram}/bin/lock";
|
||||
terminal = false;
|
||||
})
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue