at 23.11-beta 2.6 kB view raw
1{ config, pkgs, lib, ... }: 2 3let 4 cfg = config.programs.miriway; 5in { 6 options.programs.miriway = { 7 enable = lib.mkEnableOption (lib.mdDoc '' 8 Miriway, a Mir based Wayland compositor. You can manually launch Miriway by 9 executing "exec miriway" on a TTY, or launch it from a display manager. Copy 10 /etc/xdg/xdg-miriway/miriway-shell.config to ~/.config/miriway-shell.config 11 to modify the system-wide configuration on a per-user basis. See <https://github.com/Miriway/Miriway>, 12 and "miriway --help" for more information''); 13 14 config = lib.mkOption { 15 type = lib.types.lines; 16 default = '' 17 x11-window-title=Miriway (Mir-on-X) 18 idle-timeout=600 19 ctrl-alt=t:miriway-terminal # Default "terminal emulator finder" 20 21 shell-component=dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY 22 23 meta=Left:@dock-left 24 meta=Right:@dock-right 25 meta=Space:@toggle-maximized 26 meta=Home:@workspace-begin 27 meta=End:@workspace-end 28 meta=Page_Up:@workspace-up 29 meta=Page_Down:@workspace-down 30 ctrl-alt=BackSpace:@exit 31 ''; 32 example = '' 33 idle-timeout=300 34 ctrl-alt=t:weston-terminal 35 add-wayland-extensions=all 36 37 shell-components=dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY 38 39 shell-component=waybar 40 shell-component=wbg Pictures/wallpaper 41 42 shell-meta=a:synapse 43 44 meta=Left:@dock-left 45 meta=Right:@dock-right 46 meta=Space:@toggle-maximized 47 meta=Home:@workspace-begin 48 meta=End:@workspace-end 49 meta=Page_Up:@workspace-up 50 meta=Page_Down:@workspace-down 51 ctrl-alt=BackSpace:@exit 52 ''; 53 description = lib.mdDoc '' 54 Miriway's config. This will be installed system-wide. 55 The default will install the miriway package's barebones example config. 56 ''; 57 }; 58 }; 59 60 config = lib.mkIf cfg.enable { 61 environment = { 62 systemPackages = [ pkgs.miriway ]; 63 etc = { 64 "xdg/xdg-miriway/miriway-shell.config".text = cfg.config; 65 }; 66 }; 67 68 hardware.opengl.enable = lib.mkDefault true; 69 fonts.enableDefaultPackages = lib.mkDefault true; 70 programs.dconf.enable = lib.mkDefault true; 71 programs.xwayland.enable = lib.mkDefault true; 72 73 # To make the Miriway session available if a display manager like SDDM is enabled: 74 services.xserver.displayManager.sessionPackages = [ pkgs.miriway ]; 75 }; 76 77 meta.maintainers = with lib.maintainers; [ OPNA2608 ]; 78}