From ed443c58a8f0021142b5da39fbf38ef99b114aa7 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Mon, 10 Jun 2024 15:53:40 +0200 Subject: [PATCH] nixos/miracle-wm: init --- nixos/modules/module-list.nix | 1 + nixos/modules/programs/wayland/miracle-wm.nix | 43 +++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 nixos/modules/programs/wayland/miracle-wm.nix diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 53c314bb05d5..e48a836a6abd 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -304,6 +304,7 @@ ./programs/wayland/hyprlock.nix ./programs/wayland/hyprland.nix ./programs/wayland/labwc.nix + ./programs/wayland/miracle-wm.nix ./programs/wayland/river.nix ./programs/wayland/sway.nix ./programs/wayland/waybar.nix diff --git a/nixos/modules/programs/wayland/miracle-wm.nix b/nixos/modules/programs/wayland/miracle-wm.nix new file mode 100644 index 000000000000..a4c843523dc4 --- /dev/null +++ b/nixos/modules/programs/wayland/miracle-wm.nix @@ -0,0 +1,43 @@ +{ + config, + pkgs, + lib, + ... +}: + +let + cfg = config.programs.wayland.miracle-wm; +in +{ + options.programs.wayland.miracle-wm = { + enable = lib.mkEnableOption '' + miracle-wm, a tiling Mir based Wayland compositor. You can manually launch miracle-wm by + executing "exec miracle-wm" on a TTY, or launch it from a display manager. + Consult the USERGUIDE.md at for information on + how to use & configure it + ''; + }; + + config = lib.mkIf cfg.enable ( + lib.mkMerge [ + { + environment = { + systemPackages = [ pkgs.miracle-wm ]; + }; + + # To make the miracle-wm session available if a display manager like SDDM is enabled: + services.displayManager.sessionPackages = [ pkgs.miracle-wm ]; + } + + (import ./wayland-session.nix { + inherit lib pkgs; + # Hardcoded path in Mir, not really possible to disable + enableXWayland = true; + # No portal support yet: https://github.com/mattkae/miracle-wm/issues/164 + enableWlrPortal = false; + }) + ] + ); + + meta.maintainers = with lib.maintainers; [ OPNA2608 ]; +}