From 38cd3bdb96f7ac5ca84cbb0cadcec3316c6d91a4 Mon Sep 17 00:00:00 2001 From: colin Date: Wed, 3 Aug 2022 01:23:23 -0700 Subject: [PATCH] home-manager: only enable `kitty` on GUI systems --- modules/universal/env/home-manager.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/universal/env/home-manager.nix b/modules/universal/env/home-manager.nix index 709eed22..1c237ea3 100644 --- a/modules/universal/env/home-manager.nix +++ b/modules/universal/env/home-manager.nix @@ -21,10 +21,12 @@ in default = [ ]; type = types.listOf types.package; }; + # attributes to copy directly to home-manager's `wayland.windowManager` option sane.home-manager.windowManager = mkOption { default = {}; type = types.attrs; }; + # extra attributes to include in home-manager's `programs` option sane.home-manager.programs = mkOption { default = {}; type = types.attrs; @@ -137,7 +139,7 @@ in }; }; }; - kitty = { + kitty = lib.mkIf (sysconfig.sane.gui.enable) { enable = true; # docs: https://sw.kovidgoyal.net/kitty/conf/ settings = { @@ -268,6 +270,7 @@ in ''; }; + # XXX: although home-manager calls this option `firefox`, we can use other browsers and it still mostly works. firefox = lib.mkIf (sysconfig.sane.gui.enable) { enable = true; package = import ./web-browser.nix pkgs;