diff options
author | Anderson Torres <torres.anderson.85@protonmail.com> | 2023-10-20 22:26:04 -0300 |
---|---|---|
committer | Anderson Torres <torres.anderson.85@protonmail.com> | 2023-10-25 13:26:38 -0300 |
commit | 6b2f0db2566071c4f796fce75b5d03794c27990d (patch) | |
tree | 9bce31a014c425fbca7d0a3ac42262361037118f /nixos/modules/programs | |
parent | 347ed6dca8e6ca4d9b7cf9455097f4a66663f4ea (diff) |
nixos/cardboard: init
Copy-inspired from river.
Diffstat (limited to 'nixos/modules/programs')
-rw-r--r-- | nixos/modules/programs/wayland/cardboard.nix | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/nixos/modules/programs/wayland/cardboard.nix b/nixos/modules/programs/wayland/cardboard.nix new file mode 100644 index 0000000000000..420efc69ebeae --- /dev/null +++ b/nixos/modules/programs/wayland/cardboard.nix @@ -0,0 +1,31 @@ +{ config, lib, pkgs, ... }: + +let + cfg = config.programs.cardboard; +in +{ + meta.maintainers = with lib.maintainers; [ AndersonTorres ]; + + options.programs.cardboard = { + enable = lib.mkEnableOption (lib.mdDoc "cardboard"); + + package = lib.mkOption { + type = with lib.types; nullOr package; + default = pkgs.cardboard; + defaultText = lib.literalExpression "pkgs.cardboard"; + description = lib.mdDoc '' + cardboard package to use. + ''; + }; + }; + + config = lib.mkIf cfg.enable (lib.mkMerge [ + { + environment.systemPackages = [ cfg.package ]; + + # To make a cardboard session available for certain DMs like SDDM + services.xserver.displayManager.sessionPackages = [ cfg.package ]; + } + (import ./wayland-session.nix { inherit lib pkgs; }) + ]); +} |