summaryrefslogtreecommitdiff
path: root/modules/desktop/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/desktop/default.nix')
-rw-r--r--modules/desktop/default.nix73
1 files changed, 39 insertions, 34 deletions
diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix
index 4719b5d..be082bc 100644
--- a/modules/desktop/default.nix
+++ b/modules/desktop/default.nix
@@ -1,50 +1,55 @@
-{pkgs, lib, config,...}:
-with lib;
- let
- wmMeta = config.addons.desktop.wmMeta;
+{
+ pkgs,
+ lib,
+ config,
+ ...
+}:
+with lib;
+let
+ wmMeta = config.addons.desktop.wmMeta;
- # Gets all the vm's that are enabled and checks which protocols are used
+ # Gets all the vm's that are enabled and checks which protocols are used
enabledWMs = (filter (wm: wm.enable) (attrValues wmMeta));
- protos = (unique (map (wm: wm.protocol) enabledWMs));
- desktopEnabled = protos != [];
- x11Enabled = elem "x11" protos;
- waylandEnabled = elem "wayland" protos;
+ protos = (unique (map (wm: wm.protocol) enabledWMs));
+ desktopEnabled = protos != [ ];
+ x11Enabled = elem "x11" protos;
+ waylandEnabled = elem "wayland" protos;
-
-in {
+in
+{
imports = [
./common.nix
./x11.nix
./wayland.nix
./wms
./steam.nix
- ];
+ ];
options.addons.desktop = with types; {
- wmMeta = mkOption {
- type = attrsOf (submodule {
- options = {
- enable = mkOption {
- type = bool;
- default = false;
- };
- protocol = mkOption {
- type = str;
- description = "Used display protocol (x11 or wayland)";
- };
+ wmMeta = mkOption {
+ type = attrsOf (submodule {
+ options = {
+ enable = mkOption {
+ type = bool;
+ default = false;
+ };
+ protocol = mkOption {
+ type = str;
+ description = "Used display protocol (x11 or wayland)";
};
- });
- default = {};
- description = "Window manager metadata used for determining which protocol to enable.";
- };
+ };
+ });
+ default = { };
+ description = "Window manager metadata used for determining which protocol to enable.";
+ };
- # enable = lib.mkEnableOption "Whenever any desktop environment is enabled.";
- # x11.enable = lib.mkEnableOption "Whenever x11 desktop environment is enabled.";
- # wayland.enable = lib.mkEnableOption "Whenever wayland desktop environment is enabled.";
+ # enable = lib.mkEnableOption "Whenever any desktop environment is enabled.";
+ # x11.enable = lib.mkEnableOption "Whenever x11 desktop environment is enabled.";
+ # wayland.enable = lib.mkEnableOption "Whenever wayland desktop environment is enabled.";
};
- config.addons.desktop = {
- enable = desktopEnabled;
- x11.enable = x11Enabled;
- wayland.enable = waylandEnabled;
+ config.addons.desktop = {
+ enable = desktopEnabled;
+ x11.enable = x11Enabled;
+ wayland.enable = waylandEnabled;
};
}