about summary refs log tree commit diff
path: root/modules/nixos/wayland.nix
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2023-12-03 02:52:28 +0300
committerAzat Bahawi <azat@bahawi.net>2023-12-03 02:52:28 +0300
commitcec9f7acd5e5e365563212c5144394f71dd90b27 (patch)
tree667b308a7241ab2e8f3fa4e2b53cc7888e876c68 /modules/nixos/wayland.nix
parent2023-11-29 (diff)
2023-12-03
Diffstat (limited to 'modules/nixos/wayland.nix')
-rw-r--r--modules/nixos/wayland.nix19
1 files changed, 19 insertions, 0 deletions
diff --git a/modules/nixos/wayland.nix b/modules/nixos/wayland.nix
new file mode 100644
index 0000000..5068c25
--- /dev/null
+++ b/modules/nixos/wayland.nix
@@ -0,0 +1,19 @@
+{
+  config,
+  lib,
+  ...
+}:
+with lib; let
+  cfg = config.nixfiles.modules.wayland;
+in {
+  options.nixfiles.modules.wayland.enable = mkEnableOption "Wayland";
+
+  config = mkIf cfg.enable {
+    assertions = [
+      {
+        assertion = !config.nixfiles.modules.x11.enable;
+        message = "Pick only one!";
+      }
+    ];
+  };
+}

Consider giving Nix/NixOS a try! <3