2023-11-16 04:20:00 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.programs.cardboard;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
meta.maintainers = with lib.maintainers; [ AndersonTorres ];
|
|
|
|
|
|
|
|
options.programs.cardboard = {
|
2024-04-21 15:54:59 +00:00
|
|
|
enable = lib.mkEnableOption "cardboard";
|
2023-11-16 04:20:00 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
package = lib.mkPackageOption pkgs "cardboard" { };
|
2023-11-16 04:20:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
config = lib.mkIf cfg.enable (lib.mkMerge [
|
|
|
|
{
|
|
|
|
environment.systemPackages = [ cfg.package ];
|
|
|
|
|
|
|
|
# To make a cardboard session available for certain DMs like SDDM
|
2024-04-21 15:54:59 +00:00
|
|
|
services.displayManager.sessionPackages = [ cfg.package ];
|
2023-11-16 04:20:00 +00:00
|
|
|
}
|
2024-09-19 14:19:46 +00:00
|
|
|
(import ./wayland-session.nix { inherit lib; })
|
2023-11-16 04:20:00 +00:00
|
|
|
]);
|
|
|
|
}
|