diff --git a/hosts/ni/default.nix b/hosts/ni/default.nix index 107df0c1..9b64952a 100644 --- a/hosts/ni/default.nix +++ b/hosts/ni/default.nix @@ -29,7 +29,6 @@ hardware.qol.enable = true; networking = { enable = true; - setup = "networkmanager"; wireguard.enable = true; }; services.backup.enable = true; diff --git a/hosts/ni/modules/setups/desktop.nix b/hosts/ni/modules/setups/desktop.nix index 6ee1bdb9..6af57218 100644 --- a/hosts/ni/modules/setups/desktop.nix +++ b/hosts/ni/modules/setups/desktop.nix @@ -3,40 +3,46 @@ let hostCfg = config.hosts.ni; cfg = hostCfg.setups.desktop; + + hasAnyWorkflowEnabled = workflows: + lib.lists.any (workflow: config.workflows.workflows.${workflow}.enable) workflows; in { options.hosts.ni.setups.desktop.enable = lib.mkEnableOption "desktop environment setup"; - config = lib.mkIf cfg.enable { - # Bring all of the desktop goodies. - profiles.desktop = { - enable = true; - audio.enable = true; - fonts.enable = true; - hardware.enable = true; - cleanup.enable = true; - wine.enable = true; - }; + config = lib.mkIf cfg.enable (lib.mkMerge [ + { + # Bring all of the desktop goodies. + profiles.desktop = { + enable = true; + audio.enable = true; + fonts.enable = true; + hardware.enable = true; + cleanup.enable = true; + wine.enable = true; + }; - # Apparently the Emacs of 3D artists. - programs.blender = { - enable = true; - package = pkgs.blender-foodogsquared; - addons = with pkgs; [ - blender-blendergis - blender-machin3tools - ]; - }; + # Apparently the Emacs of 3D artists. + programs.blender = { + enable = true; + package = pkgs.blender-foodogsquared; + addons = with pkgs; [ + blender-blendergis + blender-machin3tools + ]; + }; - # Make it in multiple languages. Take note this is meant to be set up by - # the workflow module of choice... - profiles.i18n.enable = true; + # Make it in multiple languages. Take note the input method engine is set + # up by the workflow module of choice... + profiles.i18n.enable = true; - # ...which is by the way is this one. - workflows.workflows.a-happy-gnome.enable = true; + # ...which is by the way is this one. + workflows.workflows.a-happy-gnome.enable = true; + } - # Backup for the almighty archive, pls. - tasks.backup-archive.enable = true; - }; + (lib.mkIf (hasAnyWorkflowEnabled [ "a-happy-gnome" "knome" "mosey-branch" ]) { + hosts.ni.networking.setup = "networkmanager"; + }) + ]); }