From b085f9222617e550099077416340f1056161d807 Mon Sep 17 00:00:00 2001 From: Mohammad Rafiq Date: Mon, 14 Jul 2025 01:37:51 +0800 Subject: [PATCH] feat(graphical): Enable graphical modules for darwin and nixos --- nix/configurations.nix | 2 +- nix/manifest.nix | 2 +- nix/modules/graphical/default.nix | 15 +++++++++------ 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/nix/configurations.nix b/nix/configurations.nix index 66b9b83..9164647 100644 --- a/nix/configurations.nix +++ b/nix/configurations.nix @@ -43,7 +43,7 @@ let cfg.modules.darwin.default inputs.home-manager.darwinModules.home-manager { home-manager = globalCfg name value; } - ]; + ] ++ optional value.graphical cfg.modules.darwin.graphical; } else { } diff --git a/nix/manifest.nix b/nix/manifest.nix index 306e2ae..6d4698d 100644 --- a/nix/manifest.nix +++ b/nix/manifest.nix @@ -7,7 +7,7 @@ shell = "fish"; pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILdsZyY3gu8IGB8MzMnLdh+ClDxQQ2RYG9rkeetIKq8n rafiq"; }; - hosts.darwin.venus = { }; + hosts.darwin.venus.graphical = true; hosts.nixos = { nemesis = { graphical = true; diff --git a/nix/modules/graphical/default.nix b/nix/modules/graphical/default.nix index c714a2d..0ba55ca 100644 --- a/nix/modules/graphical/default.nix +++ b/nix/modules/graphical/default.nix @@ -3,12 +3,15 @@ let inherit (lib.options) mkEnableOption; in { - flake.modules.nixos.graphical = { - home-manager.sharedModules = [ { graphical = true; } ]; - services.pipewire = { - enable = true; - pulse.enable = true; + flake.modules = { + nixos.graphical = { + home-manager.sharedModules = [ { graphical = true; } ]; + services.pipewire = { + enable = true; + pulse.enable = true; + }; }; + homeManager.default.options.graphical = mkEnableOption ""; + darwin.graphical.home-manager.sharedModules = [ { graphical = true; } ]; }; - flake.modules.homeManager.default.options.graphical = mkEnableOption ""; }