From 4094162785194b8166df2e1aeb258499ec8e2ff6 Mon Sep 17 00:00:00 2001 From: Jack O'Sullivan Date: Tue, 22 Aug 2023 11:50:14 +0100 Subject: [PATCH] home-manager/gui: Split standalone into manageGraphical --- home-manager/modules/gui/default.nix | 36 +++++++++++++++------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/home-manager/modules/gui/default.nix b/home-manager/modules/gui/default.nix index fca06df..2c4ab11 100644 --- a/home-manager/modules/gui/default.nix +++ b/home-manager/modules/gui/default.nix @@ -8,6 +8,7 @@ in { options.my.gui = { enable = mkBoolOpt' true "Enable settings and packages meant for graphical systems"; + manageGraphical = mkBoolOpt' false "Configure the graphical session"; standalone = mkBoolOpt' false "Enable settings for fully Nix managed systems"; }; @@ -73,7 +74,8 @@ in }; }; } - (mkIf (cfg.standalone && !pkgs.stdenv.isDarwin) { + + (mkIf (cfg.manageGraphical && !pkgs.stdenv.isDarwin) { systemd.user = { services = { wait-for-sway = { @@ -96,21 +98,6 @@ in }; }; - xdg = { - userDirs = { - enable = true; - createDirectories = true; - desktop = "$HOME/desktop"; - documents = "$HOME/documents"; - download = "$HOME/downloads"; - music = "$HOME/music"; - pictures = "$HOME/pictures"; - publicShare = "$HOME/public"; - templates = "$HOME/templates"; - videos = "$HOME/videos"; - }; - }; - home = { packages = with pkgs; [ wtype @@ -283,6 +270,23 @@ in }; }; }) + + (mkIf (cfg.standalone && !pkgs.stdenv.isDarwin) { + xdg = { + userDirs = { + enable = true; + createDirectories = true; + desktop = "$HOME/desktop"; + documents = "$HOME/documents"; + download = "$HOME/downloads"; + music = "$HOME/music"; + pictures = "$HOME/pictures"; + publicShare = "$HOME/public"; + templates = "$HOME/templates"; + videos = "$HOME/videos"; + }; + }; + }) ] ); }