From 28a6098f3dd45e3579a2934cf58407d674bd87f2 Mon Sep 17 00:00:00 2001 From: Cameron Reed Date: Thu, 11 Jan 2024 14:14:59 -0700 Subject: [PATCH] Allow multiple desktops to be enabled --- common/desktop/hyprland.nix | 2 +- common/desktop/sway.nix | 2 +- common/options.nix | 4 ++-- common/users/cameron/default.nix | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/common/desktop/hyprland.nix b/common/desktop/hyprland.nix index 515360a..f550322 100644 --- a/common/desktop/hyprland.nix +++ b/common/desktop/hyprland.nix @@ -1,7 +1,7 @@ { config, pkgs, ... }: { - desktop = "hyprland"; + desktop = [ "hyprland" ]; programs.hyprland.enable = true; diff --git a/common/desktop/sway.nix b/common/desktop/sway.nix index f15b7f9..d029501 100644 --- a/common/desktop/sway.nix +++ b/common/desktop/sway.nix @@ -1,7 +1,7 @@ { config, pkgs, ... }: { - desktop = "sway"; + desktop = [ "sway" ]; programs.sway = { enable = true; diff --git a/common/options.nix b/common/options.nix index 63aa986..c4de205 100644 --- a/common/options.nix +++ b/common/options.nix @@ -8,8 +8,8 @@ with lib; { }; desktop = mkOption { - default = ""; - type = types.str; + default = []; + type = types.listOf types.str; }; }; } diff --git a/common/users/cameron/default.nix b/common/users/cameron/default.nix index 763c242..995cce8 100644 --- a/common/users/cameron/default.nix +++ b/common/users/cameron/default.nix @@ -27,7 +27,7 @@ in { packages = (with pkgs; [ direnv nix-direnv - ] ++ (lib.optionals (config.desktop != "") [ + ] ++ (lib.optionals ((builtins.length config.desktop) != 0) [ bibata-cursors bibata-cursors-translucent ]));