[app-launcher] Add app-launcher to boxy

This commit is contained in:
2025-10-13 13:59:54 -07:00
parent b75c43257b
commit 4a4ea6316d
4 changed files with 142 additions and 2 deletions

View File

@@ -14,6 +14,18 @@ in
wayland = mkOption {
default = true;
};
appLauncherServer = {
enable = mkOption {
type = types.bool;
default = true;
description = "Enable HTTP app launcher server for remote control";
};
port = mkOption {
type = types.int;
default = 8081;
description = "Port for the app launcher HTTP server";
};
};
};
@@ -33,17 +45,35 @@ in
};
networking.firewall = {
allowedTCPPorts = [ 8080 ];
allowedTCPPorts = [ 8080 ] ++ optional cfg.appLauncherServer.enable cfg.appLauncherServer.port;
allowedUDPPorts = [ 8080 ];
};
environment.systemPackages = with pkgs; [
kodiPkg
wget
];
firefox
] ++ optional cfg.appLauncherServer.enable config.customPackages.app-launcher-server;
programs.kdeconnect.enable = true;
systemd.user.services = mkIf cfg.appLauncherServer.enable {
app-launcher-server = {
description = "HTTP App Launcher Server";
wantedBy = [ "graphical-session.target" ];
after = [ "graphical-session.target" ];
serviceConfig = {
Type = "simple";
ExecStart = "${config.customPackages.app-launcher-server}/bin/app-launcher-server ${toString cfg.appLauncherServer.port}";
Restart = "always";
RestartSec = "5s";
Environment = [
"PATH=${pkgs.firefox}/bin:${kodiPkg}/bin:/run/current-system/sw/bin"
];
};
};
};
services = if cfg.autologin then {
displayManager = {
autoLogin.enable = true;