fix: pipewire module and other minor fixes

This commit is contained in:
jacekpoz 2023-10-13 23:18:35 +02:00
parent 0cb9f263bd
commit 7a098a90cd
No known key found for this signature in database
GPG key ID: 94E812A8B12AAE3C
9 changed files with 43 additions and 82 deletions

View file

@ -233,7 +233,19 @@
myOptions = {
services = {
greetd.enable = true;
dunst.enable = true;
greetd = {
enable = true;
greeter = "gtkgreet";
launchOptions = [
"Hyprland"
"zsh"
"reboot"
"shutdown now"
];
};
mpd.enable = true;
pipewire.enable = true;
};
};

View file

@ -1,9 +1,7 @@
_: {
imports = [
./configuration.nix
./greetd.nix
./hardware-configuration.nix
./home-manager.nix
./pipewire.nix
];
}

View file

@ -1,9 +1,9 @@
{
lib,
config',
inputs,
lib,
pkgs,
self,
config',
...
}: {
home-manager = {
@ -11,17 +11,6 @@
useGlobalPkgs = true;
extraSpecialArgs = {inherit inputs self config';};
users.${config'.username} = {
imports = [
inputs.hyprland.homeManagerModules.default
inputs.anyrun.homeManagerModules.default
inputs.neovim-flake.homeManagerModules.default
../../modules/cli
../../modules/gui
../../modules/tui
../../modules/other
../../modules/services
];
programs = {
home-manager.enable = true;
direnv = {
@ -36,7 +25,6 @@
packages = let
hyprcontrib = inputs.hyprcontrib.packages.${pkgs.system};
shadower = inputs.shadower.packages.${pkgs.system};
nix-gaming = inputs.nix-gaming.packages.${pkgs.system};
fenix = inputs.fenix.packages.${pkgs.system};
nixpkgs-wayland = inputs.nixpkgs-wayland.packages.${pkgs.system};
agenix = inputs.agenix.packages.${pkgs.system};

View file

@ -1,13 +0,0 @@
_: {
hardware.pulseaudio.enable = false;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
wireplumber.enable = true;
};
security.rtkit.enable = true;
}

View file

@ -475,6 +475,7 @@
};
};
};
pipewire.enable = true;
};
};

View file

@ -1,49 +0,0 @@
{
pkgs,
...
}: {
hardware.pulseaudio.enable = false;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
wireplumber.enable = true;
};
security.rtkit.enable = true;
#environment.etc = let
# json = pkgs.formats.json {};
# rate = "48000";
# quantum = "256";
#in {
# "pipewire/pipewire.conf.d/92-low-latency.conf".text = ''
# context.properties = {
# default.clock.rate = ${rate}
# default.clock.quantum = ${quantum}
# default.clock.min-quantum = ${quantum}
# default.clock.max-quantum = ${quantum}
# }
# '';
# "pipewire/pipewire-pulse.d/92-low-latency.conf".source = json.generate "92-low-latency.conf" {
# context.modules = [
# {
# name = "libpipewire-module-protocol-pulse";
# args.pulse = {
# min.req = "${quantum}/${rate}";
# default.req = "${quantum}/${rate}";
# max.req = "${quantum}/${rate}";
# min.quantum = "${quantum}/${rate}";
# max.quantum = "${quantum}/${rate}";
# };
# }
# ];
# stream.properties = {
# node.latency = "${quantum}/${rate}";
# resample.quality = 1;
# };
# };
#};
}

View file

@ -4,6 +4,7 @@ _: {
./dunst.nix
./greetd.nix
./mpd.nix
./pipewire.nix
./ssh.nix
];
}

View file

@ -0,0 +1,23 @@
{
config,
lib,
...
}: with lib; let
cfg = config.myOptions.services.pipewire;
in {
options.myOptions.services.pipewire.enable = mkEnableOption "enable pipewire";
config = mkIf cfg.enable {
hardware.pulseaudio.enable = false;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
wireplumber.enable = true;
};
security.rtkit.enable = true;
};
}

View file

@ -97,9 +97,9 @@ in {
wantedBy = [ "default.target" ];
};
#environment.sessionVariables = {
# SSH_AUTH_SOCK = "\$XDG_RUNTIME_DIR/ssh-agent.socket";
#};
environment.sessionVariables = {
SSH_AUTH_SOCK = "\$XDG_RUNTIME_DIR/ssh-agent.socket";
};
})
];
}