From 5dd3f3f4e6ab14b2b66629b137846d33af1c1410 Mon Sep 17 00:00:00 2001 From: matt1432 Date: Sat, 23 Nov 2024 05:02:06 -0500 Subject: [PATCH] fix(droid): get build to work again with tmux --- nixosModules/tmux/default.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/nixosModules/tmux/default.nix b/nixosModules/tmux/default.nix index c0c0a289..8a624120 100644 --- a/nixosModules/tmux/default.nix +++ b/nixosModules/tmux/default.nix @@ -4,11 +4,15 @@ pkgs, ... }: let - inherit (lib) attrValues elemAt mkIf mkOption types; + inherit (lib) attrValues elemAt hasAttr mkIf mkOption types; cfg = config.programs.tmux; - firstUser = elemAt (attrValues config.home-manager.users) 0; + # Support NixOnDroid + firstUser = + if hasAttr "users" config.home-manager + then elemAt (attrValues config.home-manager.users) 0 + else config.home-manager.config; in { options.programs.tmux = { enableCustomConf = mkOption {