diff --git a/nixos/module.nix b/nixos/module.nix index 5885335..1ace79a 100644 --- a/nixos/module.nix +++ b/nixos/module.nix @@ -11,35 +11,21 @@ in package = lib.mkOption { type = lib.types.package; + # Points to the default package in your flake default = self.packages.${pkgs.system}.default; + description = "The RhemaWave package to use."; }; - + user = lib.mkOption { type = lib.types.str; default = "kiosk"; + description = "The user account name."; }; }; 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 + # Just put the package in the system path. + # The machine (configuration.nix) handles the service and the files. environment.systemPackages = [ cfg.package ]; }; } \ No newline at end of file