45 lines
1.4 KiB
Nix
45 lines
1.4 KiB
Nix
self:
|
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
let
|
|
cfg = config.services.rhemawave;
|
|
in
|
|
{
|
|
options.services.rhemawave = {
|
|
enable = lib.mkEnableOption "RhemaWave kiosk application";
|
|
|
|
package = lib.mkOption {
|
|
type = lib.types.package;
|
|
default = self.packages.${pkgs.system}.default;
|
|
};
|
|
|
|
user = lib.mkOption {
|
|
type = lib.types.str;
|
|
default = "kiosk";
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
# App-specific environment
|
|
environment.sessionVariables = {
|
|
SDL_VIDEODRIVER = "wayland";
|
|
QT_QPA_PLATFORM = "wayland";
|
|
GDK_BACKEND = "wayland";
|
|
CLUTTER_BACKEND = "wayland";
|
|
};
|
|
|
|
# App-specific assets (The Symlink Farm)
|
|
systemd.tmpfiles.rules = [
|
|
"d /home/${cfg.user}/.local/share/rhemawave 0700 ${cfg.user} kiosk -"
|
|
"L+ /home/${cfg.user}/.local/share/rhemawave/shaders - - - ${cfg.package}/share/rhemawave/shaders"
|
|
"L+ /home/${cfg.user}/.local/share/rhemawave/fonts - - - ${cfg.package}/share/rhemawave/fonts"
|
|
"L+ /home/${cfg.user}/.local/share/rhemawave/tos - - - ${cfg.package}/share/rhemawave/tos"
|
|
"L+ /home/${cfg.user}/.local/share/rhemawave/audio - - - ${cfg.package}/share/rhemawave/audio"
|
|
"L+ /home/${cfg.user}/.local/share/rhemawave/proclamations - - - ${cfg.package}/share/rhemawave/proclamations"
|
|
];
|
|
|
|
# Make the package available
|
|
environment.systemPackages = [ cfg.package ];
|
|
};
|
|
} |