@ -1,21 +1,59 @@
|
|||||||
{
|
{
|
||||||
config,
|
|
||||||
lib,
|
lib,
|
||||||
|
config,
|
||||||
...
|
...
|
||||||
}: {
|
}: let
|
||||||
security.rtkit.enable = lib.mkDefault config.services.pipewire.enable;
|
inherit (lib) mkEnableOption mkIf;
|
||||||
services = {
|
|
||||||
pulseaudio.enable = false;
|
cfg = config.sound.pipewire;
|
||||||
pipewire = {
|
in {
|
||||||
|
options = {
|
||||||
|
sound.pipewire.enable = mkEnableOption "enable pipewire";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
services.pulseaudio.enable = false;
|
||||||
|
services.pipewire = {
|
||||||
enable = true;
|
enable = true;
|
||||||
alsa.enable = true;
|
alsa.enable = true;
|
||||||
pulse.enable = true;
|
pulse.enable = true;
|
||||||
extraConfig.pipewire."92-low-latency" = {
|
|
||||||
context.properties.default.clock = {
|
extraConfig = {
|
||||||
rate = 48000;
|
pipewire = {
|
||||||
quantum = 32;
|
"92-low-latency" = {
|
||||||
min-quantum = 32;
|
"context.properties" = {
|
||||||
max-quantum = 32;
|
"default.clock.rate" = 48000;
|
||||||
|
"default.clock.allowed-rates" = [
|
||||||
|
44100
|
||||||
|
48000
|
||||||
|
88200
|
||||||
|
96000
|
||||||
|
];
|
||||||
|
|
||||||
|
"default.clock.min-quantum" = 512;
|
||||||
|
"default.clock.quantum" = 4096;
|
||||||
|
"default.clock.max-quantum" = 8192;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
"93-no-resampling" = {
|
||||||
|
"context.properties" = {
|
||||||
|
"default.clock.rate" = 48000;
|
||||||
|
"default.clock.allowed-rates" = [
|
||||||
|
44100
|
||||||
|
48000
|
||||||
|
96000
|
||||||
|
192000
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
"94-no-upmixing" = {
|
||||||
|
"stream.properties" = {
|
||||||
|
"channelmix.upmix" = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
cfg = config.desktop.cosmic;
|
cfg = config.desktop.cosmic;
|
||||||
in {
|
in {
|
||||||
imports = with inputs; [
|
imports = with inputs; [
|
||||||
./common/pipewire.nix
|
|
||||||
nixos-cosmic.nixosModules.default
|
nixos-cosmic.nixosModules.default
|
||||||
];
|
];
|
||||||
options = {
|
options = {
|
||||||
@ -16,6 +15,7 @@ in {
|
|||||||
lib.mkEnableOption "enable cosmic desktop";
|
lib.mkEnableOption "enable cosmic desktop";
|
||||||
};
|
};
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
sound.pipewire.enable = true;
|
||||||
nix.settings = {
|
nix.settings = {
|
||||||
substituters = ["https://cosmic.cachix.org/"];
|
substituters = ["https://cosmic.cachix.org/"];
|
||||||
trusted-public-keys = ["cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE="];
|
trusted-public-keys = ["cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE="];
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
./common/pipewire.nix
|
||||||
# ./cosmic.nix
|
# ./cosmic.nix
|
||||||
./gnome.nix
|
./gnome.nix
|
||||||
./hyprland.nix
|
./hyprland.nix
|
||||||
|
@ -1,18 +1,17 @@
|
|||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
pkgs,
|
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib; let
|
with lib; let
|
||||||
cfg = config.desktop.gnome;
|
cfg = config.desktop.gnome;
|
||||||
in {
|
in {
|
||||||
imports = [./common/pipewire.nix];
|
|
||||||
options = {
|
options = {
|
||||||
desktop.gnome.enable =
|
desktop.gnome.enable =
|
||||||
mkEnableOption "enable gnome desktop";
|
mkEnableOption "enable gnome desktop";
|
||||||
};
|
};
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
sound.pipewire.enable = true;
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
enable = true;
|
enable = true;
|
||||||
displayManager.gdm.enable = true;
|
displayManager.gdm.enable = true;
|
||||||
|
@ -8,12 +8,12 @@
|
|||||||
with lib; let
|
with lib; let
|
||||||
cfg = config.desktop.hyprland;
|
cfg = config.desktop.hyprland;
|
||||||
in {
|
in {
|
||||||
imports = [./common/pipewire.nix];
|
|
||||||
options = {
|
options = {
|
||||||
desktop.hyprland.enable =
|
desktop.hyprland.enable =
|
||||||
mkEnableOption "enable hyprland desktop";
|
mkEnableOption "enable hyprland desktop";
|
||||||
};
|
};
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
sound.pipewire.enable = true;
|
||||||
programs.hyprland = {
|
programs.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = perSystem.hyprland.hyprland;
|
package = perSystem.hyprland.hyprland;
|
||||||
|
@ -7,12 +7,12 @@
|
|||||||
with lib; let
|
with lib; let
|
||||||
cfg = config.desktop.niri;
|
cfg = config.desktop.niri;
|
||||||
in {
|
in {
|
||||||
imports = [./common/pipewire.nix];
|
|
||||||
options = {
|
options = {
|
||||||
desktop.niri.enable =
|
desktop.niri.enable =
|
||||||
mkEnableOption "enable niri desktop";
|
mkEnableOption "enable niri desktop";
|
||||||
};
|
};
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
sound.pipewire.enable = true;
|
||||||
programs.niri.enable = true;
|
programs.niri.enable = true;
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
brightnessctl
|
brightnessctl
|
||||||
|
Reference in New Issue
Block a user