feat(nix): add graphical module, pass option to nixosSystem
This commit is contained in:
parent
c2bae8cd85
commit
df06e092d6
5 changed files with 73 additions and 29 deletions
19
nix/modules/graphical/default.nix
Normal file
19
nix/modules/graphical/default.nix
Normal 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 "";
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue