Add firefox and pipewire modules
This commit is contained in:
parent
85b2df7f24
commit
fec4eb7cfd
|
|
@ -8,6 +8,7 @@
|
|||
./gdm.nix
|
||||
./hyprland.nix
|
||||
./packages.nix
|
||||
./pipewire.nix
|
||||
./plasma.nix
|
||||
./sddm.nix
|
||||
./stylix.nix
|
||||
|
|
|
|||
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
pipewireCfg = config.modules.pipewire;
|
||||
in
|
||||
{
|
||||
programs = {
|
||||
firefox.enable = true;
|
||||
};
|
||||
|
||||
# Add wayland screensharing support if PipeWire is enabled
|
||||
environment.systemPackages = with pkgs; []
|
||||
++ (if pipewireCfg.enable
|
||||
then [ (wrapFirefox (firefox-unwrapped.override { pipewireSupport = true; }) {}) ]
|
||||
else [ firefox ]);
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.pipewire;
|
||||
in
|
||||
{
|
||||
config = mkIf cfg.enable {
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa = {
|
||||
enable = true;
|
||||
support32Bit = true;
|
||||
};
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
|
||||
# Allows Pipewire to use the realtime scheduler for increased performance
|
||||
security.rtkit.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -7,6 +7,7 @@
|
|||
with lib;
|
||||
let
|
||||
hyprlandCfg = osConfig.modules.hyprland;
|
||||
pipewireCfg = osConfig.modules.pipewire;
|
||||
plasmaCfg = osConfig.modules.plasma;
|
||||
in
|
||||
{
|
||||
|
|
@ -20,6 +21,12 @@ in
|
|||
++ (if hyprlandCfg.enable
|
||||
then [ pkgs.xdg-desktop-portal-hyprland ]
|
||||
else [])
|
||||
++ (if pipewireCfg.enable
|
||||
then [
|
||||
pkgs.xdg-desktop-portal-wlr
|
||||
pkgs.xdg-desktop-portal-gtk
|
||||
]
|
||||
else [])
|
||||
++ (if plasmaCfg.enable
|
||||
then [ pkgs.kdePackages.xdg-desktop-portal-kde ]
|
||||
else []);
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
imports = [
|
||||
./displayManager.nix
|
||||
./hyprland.nix
|
||||
./pipewire.nix
|
||||
./plasma.nix
|
||||
./shell.nix
|
||||
./system.nix
|
||||
|
|
|
|||
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.pipewire;
|
||||
in
|
||||
{
|
||||
options.modules.pipewire = {
|
||||
enable = mkEnableOption {
|
||||
default = true;
|
||||
description = "Enable PipeWire";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Reference in New Issue