Add firefox and pipewire modules
This commit is contained in:
parent
85b2df7f24
commit
fec4eb7cfd
|
|
@ -8,6 +8,7 @@
|
||||||
./gdm.nix
|
./gdm.nix
|
||||||
./hyprland.nix
|
./hyprland.nix
|
||||||
./packages.nix
|
./packages.nix
|
||||||
|
./pipewire.nix
|
||||||
./plasma.nix
|
./plasma.nix
|
||||||
./sddm.nix
|
./sddm.nix
|
||||||
./stylix.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;
|
with lib;
|
||||||
let
|
let
|
||||||
hyprlandCfg = osConfig.modules.hyprland;
|
hyprlandCfg = osConfig.modules.hyprland;
|
||||||
|
pipewireCfg = osConfig.modules.pipewire;
|
||||||
plasmaCfg = osConfig.modules.plasma;
|
plasmaCfg = osConfig.modules.plasma;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
@ -20,6 +21,12 @@ in
|
||||||
++ (if hyprlandCfg.enable
|
++ (if hyprlandCfg.enable
|
||||||
then [ pkgs.xdg-desktop-portal-hyprland ]
|
then [ pkgs.xdg-desktop-portal-hyprland ]
|
||||||
else [])
|
else [])
|
||||||
|
++ (if pipewireCfg.enable
|
||||||
|
then [
|
||||||
|
pkgs.xdg-desktop-portal-wlr
|
||||||
|
pkgs.xdg-desktop-portal-gtk
|
||||||
|
]
|
||||||
|
else [])
|
||||||
++ (if plasmaCfg.enable
|
++ (if plasmaCfg.enable
|
||||||
then [ pkgs.kdePackages.xdg-desktop-portal-kde ]
|
then [ pkgs.kdePackages.xdg-desktop-portal-kde ]
|
||||||
else []);
|
else []);
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
imports = [
|
imports = [
|
||||||
./displayManager.nix
|
./displayManager.nix
|
||||||
./hyprland.nix
|
./hyprland.nix
|
||||||
|
./pipewire.nix
|
||||||
./plasma.nix
|
./plasma.nix
|
||||||
./shell.nix
|
./shell.nix
|
||||||
./system.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