feat(nix): add graphical module, pass option to nixosSystem

This commit is contained in:
Mohammad Rafiq 2025-07-07 22:19:38 +08:00
parent c2bae8cd85
commit df06e092d6
No known key found for this signature in database
5 changed files with 73 additions and 29 deletions

View file

@ -0,0 +1,19 @@
{ lib, ... }:
let
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
in
{
flake.modules.nixos.default =
{ graphical, ... }:
{
config = mkIf graphical {
home-manager.sharedModules = [ { graphical = true; } ];
services.pipewire = {
enable = true;
pulse.enable = true;
};
};
};
flake.modules.homeManager.default.options.graphical = mkEnableOption "";
}