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