Main
This commit is contained in:
parent
fc0abdd4bb
commit
aca73cdd0f
73 changed files with 3873 additions and 381 deletions
|
|
@ -1,3 +1,18 @@
|
|||
# Private Webapps
|
||||
#
|
||||
# Provides:
|
||||
# - Browser-based desktop entries for personal/private webapps
|
||||
# - Currently supported:
|
||||
# • WhatsApp
|
||||
#
|
||||
# Options:
|
||||
# - browser → Selects which browser package to use (default: chromium)
|
||||
# - whatsapp → Enable WhatsApp webapp launcher
|
||||
#
|
||||
# Notes:
|
||||
# - Uses --app mode to create minimal browser windows
|
||||
# - Additional services can be added following the same pattern
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
|
|
@ -5,16 +20,28 @@ let
|
|||
in
|
||||
{
|
||||
options.nyx-module.home.private-webapps = {
|
||||
enable = lib.mkEnableOption "Enable private-webapps (home) module";
|
||||
enable = lib.mkEnableOption "Enable private webapps (home module)";
|
||||
|
||||
package = lib.mkOption {
|
||||
browser = lib.mkOption {
|
||||
type = lib.types.package;
|
||||
default = pkgs.private-webapps;
|
||||
description = "Package to install for private-webapps.";
|
||||
default = pkgs.chromium;
|
||||
example = pkgs.firefox;
|
||||
description = "Browser package to use for private webapps.";
|
||||
};
|
||||
|
||||
whatsapp.enable = lib.mkEnableOption "Enable WhatsApp webapp entry";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = [ cfg.package ];
|
||||
xdg.desktopEntries = lib.mkMerge [
|
||||
(lib.mkIf cfg.whatsapp.enable {
|
||||
whatsapp = {
|
||||
name = "WhatsApp";
|
||||
exec = "${cfg.browser}/bin/${cfg.browser.pname} --app=https://web.whatsapp.com/";
|
||||
icon = "WhatsApp";
|
||||
type = "Application";
|
||||
};
|
||||
})
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue