From 42c74f2067aed0654abf5a9db719562ead946332 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Romildo?= Date: Thu, 4 Jan 2024 22:01:11 -0300 Subject: [PATCH] nixos/labwc: init --- nixos/modules/module-list.nix | 1 + nixos/modules/programs/wayland/labwc.nix | 25 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 nixos/modules/programs/wayland/labwc.nix diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 65047bdd110a..4c2af80bfa13 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -273,6 +273,7 @@ ./programs/virt-manager.nix ./programs/wavemon.nix ./programs/wayland/cardboard.nix + ./programs/wayland/labwc.nix ./programs/wayland/river.nix ./programs/wayland/sway.nix ./programs/wayland/waybar.nix diff --git a/nixos/modules/programs/wayland/labwc.nix b/nixos/modules/programs/wayland/labwc.nix new file mode 100644 index 000000000000..d0806c3aa5d0 --- /dev/null +++ b/nixos/modules/programs/wayland/labwc.nix @@ -0,0 +1,25 @@ +{ config, lib, pkgs, ... }: + +let + cfg = config.programs.labwc; +in +{ + meta.maintainers = with lib.maintainers; [ AndersonTorres ]; + + options.programs.labwc = { + enable = lib.mkEnableOption (lib.mdDoc "labwc"); + package = lib.mkPackageOption pkgs "labwc" { }; + }; + + config = lib.mkIf cfg.enable (lib.mkMerge [ + { + environment.systemPackages = [ cfg.package ]; + + xdg.portal.config.wlroots.default = lib.mkDefault [ "wlr" "gtk" ]; + + # To make a labwc session available for certain DMs like SDDM + services.xserver.displayManager.sessionPackages = [ cfg.package ]; + } + (import ./wayland-session.nix { inherit lib pkgs; }) + ]); +}