First commit
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
pipewire
|
||||
wireplumber
|
||||
alsa-utils
|
||||
pulseaudio
|
||||
pamixer
|
||||
pavucontrol
|
||||
];
|
||||
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
wireplumber.enable = true;
|
||||
};
|
||||
|
||||
security.rtkit.enable = true;
|
||||
|
||||
# Helps on many laptops (Intel SOF etc.)
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
||||
# Prefer analog over HDMI/DP in a machine-agnostic way
|
||||
services.pipewire.wireplumber.extraConfig."51-audio-priorities" = {
|
||||
"monitor.alsa.rules" = [
|
||||
# De-prioritize HDMI / DisplayPort sinks
|
||||
{
|
||||
matches = [
|
||||
{ "node.name" = "~alsa_output\\..*HDMI.*"; }
|
||||
{ "node.name" = "~alsa_output\\..*DisplayPort.*"; }
|
||||
];
|
||||
actions.update-props = {
|
||||
"priority.session" = 100;
|
||||
"priority.driver" = 100;
|
||||
};
|
||||
}
|
||||
|
||||
# Prefer analog sinks (speakers/headphones)
|
||||
{
|
||||
matches = [
|
||||
{ "node.name" = "~alsa_output\\..*analog.*"; }
|
||||
{ "node.name" = "~alsa_output\\..*Headphones.*"; }
|
||||
{ "node.name" = "~alsa_output\\..*Speaker.*"; }
|
||||
];
|
||||
actions.update-props = {
|
||||
"priority.session" = 2000;
|
||||
"priority.driver" = 2000;
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
# Optional: clear "sticky" user-selected defaults so priority rules win
|
||||
systemd.user.services.wireplumber-clear-default-nodes = {
|
||||
description = "Clear WirePlumber saved default nodes (avoid HDMI becoming sticky)";
|
||||
|
||||
after = [ "wireplumber.service" ];
|
||||
partOf = [ "wireplumber.service" ];
|
||||
wantedBy = [ "default.target" ];
|
||||
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
ExecStart = "${pkgs.coreutils}/bin/rm -f %h/.local/state/wireplumber/default-nodes";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
nix.settings = {
|
||||
substituters = [ "https://hyprland.cachix.org" ];
|
||||
trusted-public-keys = [
|
||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||
];
|
||||
};
|
||||
services.dbus.enable = true;
|
||||
security.polkit.enable = true;
|
||||
services.flatpak.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
wireplumber.enable = true;
|
||||
};
|
||||
services.gvfs.enable = true;
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
extraPortals = with pkgs; [
|
||||
xdg-desktop-portal-hyprland
|
||||
xdg-desktop-portal-gtk
|
||||
];
|
||||
config.common.default = [ "hyprland" "gtk" ];
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
walker
|
||||
uwsm
|
||||
hyprland-qtutils
|
||||
hyprpolkitagent
|
||||
grimblast
|
||||
];
|
||||
programs = {
|
||||
uwsm.enable = true;
|
||||
uwsm.waylandCompositors.hyprland = {
|
||||
prettyName = "Hyprland";
|
||||
comment = "Hyprland compositor managed by UWSM";
|
||||
binPath = "/run/current-system/sw/bin/Hyprland";
|
||||
};
|
||||
hyprland = {
|
||||
withUWSM = true;
|
||||
enable = true;
|
||||
xwayland.enable = true;
|
||||
};
|
||||
};
|
||||
environment.sessionVariables = {
|
||||
XDG_SESSION_TYPE = "wayland";
|
||||
XDG_CURRENT_DESKTOP = "Hyprland";
|
||||
XDG_SESSION_DESKTOP = "Hyprland";
|
||||
NIXOS_OZONE_WL = "1";
|
||||
XCURSOR_SIZE = "24";
|
||||
};
|
||||
security.pam.services.hyprlock = { };
|
||||
# Optional; GNOME-specific (keep only if you really use gnome-keyring integration)
|
||||
security.pam.services.gdm.enableGnomeKeyring = true;
|
||||
}
|
||||
Reference in New Issue
Block a user