summaryrefslogtreecommitdiffstats
path: root/nixos/modules
diff options
context:
space:
mode:
authorNick Cao <nickcao@nichi.co>2023-02-04 09:50:17 +0800
committerGitHub <noreply@github.com>2023-02-04 09:50:17 +0800
commit3ab1fd296f2ce73da91e404afb36d64e927b29c7 (patch)
treeb2dc04c77b320e78782f2835bffd6810e1378bce /nixos/modules
parent0dbdc44d26560a5dea99798cdf8588634a59379a (diff)
parent7ef7d9e26818955dc4bf011fa469718d52179eef (diff)
Merge pull request #212199 from OPNA2608/init/miriway
miriway: init at unstable-2022-12-18
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/module-list.nix1
-rw-r--r--nixos/modules/programs/miriway.nix60
2 files changed, 61 insertions, 0 deletions
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix
index 82eec40ecf10..2757a196555e 100644
--- a/nixos/modules/module-list.nix
+++ b/nixos/modules/module-list.nix
@@ -195,6 +195,7 @@
./programs/mdevctl.nix
./programs/mepo.nix
./programs/mininet.nix
+ ./programs/miriway.nix
./programs/mosh.nix
./programs/msmtp.nix
./programs/mtr.nix
diff --git a/nixos/modules/programs/miriway.nix b/nixos/modules/programs/miriway.nix
new file mode 100644
index 000000000000..52b5f8476222
--- /dev/null
+++ b/nixos/modules/programs/miriway.nix
@@ -0,0 +1,60 @@
+{ config, pkgs, lib, ... }:
+
+let
+ cfg = config.programs.miriway;
+in {
+ options.programs.miriway = {
+ enable = lib.mkEnableOption (lib.mdDoc ''
+ Miriway, a Mir based Wayland compositor. You can manually launch Miriway by
+ executing "exec miriway" on a TTY, or launch it from a display manager. Copy
+ /etc/xdg/xdg-miriway/miriway-shell.config to ~/.config/miriway-shell.config
+ to modify the default configuration. See <https://github.com/Miriway/Miriway>,
+ and "miriway --help" for more information'');
+
+ config = lib.mkOption {
+ type = lib.types.lines;
+ default = ''
+ x11-window-title=Miriway (Mir-on-X)
+ idle-timeout=600
+ ctrl-alt=t:miriway-terminal # Default "terminal emulator finder"
+
+ shell-component=dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY
+ '';
+ example = ''
+ idle-timeout=300
+ ctrl-alt=t:weston-terminal
+ add-wayland-extensions=all
+
+ shell-components=dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY
+
+ shell-component=waybar
+ shell-component=wbg Pictures/wallpaper
+
+ shell-meta=a:synapse
+ '';
+ description = lib.mdDoc ''
+ Miriway's config. This will be installed system-wide.
+ The default will install the miriway package's barebones example config.
+ '';
+ };
+ };
+
+ config = lib.mkIf cfg.enable {
+ environment = {
+ systemPackages = [ pkgs.miriway ];
+ etc = {
+ "xdg/xdg-miriway/miriway-shell.config".text = cfg.config;
+ };
+ };
+
+ hardware.opengl.enable = lib.mkDefault true;
+ fonts.enableDefaultFonts = lib.mkDefault true;
+ programs.dconf.enable = lib.mkDefault true;
+ programs.xwayland.enable = lib.mkDefault true;
+
+ # To make the Miriway session available if a display manager like SDDM is enabled:
+ services.xserver.displayManager.sessionPackages = [ pkgs.miriway ];
+ };
+
+ meta.maintainers = with lib.maintainers; [ OPNA2608 ];
+}