From d8538e9d52fb11372792ab36a73e71e554f56230 Mon Sep 17 00:00:00 2001 From: twoneis Date: Thu, 25 Apr 2024 03:06:42 +0200 Subject: [PATCH] who needs atomic commits? --- modules/system/audio.nix | 5 ++++- modules/system/bluetooth.nix | 5 +---- modules/system/default.nix | 10 +++++++--- modules/system/home/media/default.nix | 2 +- modules/system/home/niri-setup/default.nix | 7 +++---- modules/system/niri/default.nix | 6 ++++-- 6 files changed, 20 insertions(+), 15 deletions(-) diff --git a/modules/system/audio.nix b/modules/system/audio.nix index 3d387d0..1045fed 100644 --- a/modules/system/audio.nix +++ b/modules/system/audio.nix @@ -1,4 +1,4 @@ -{ ... }: { +{ pkgs, ... }: { # Enable sound with pipewire. sound.enable = false; hardware.pulseaudio.enable = false; @@ -9,4 +9,7 @@ pulse.enable = true; #jack.enable = true; }; + environment.systemPackages = with pkgs; [ + pamixer + ]; } diff --git a/modules/system/bluetooth.nix b/modules/system/bluetooth.nix index 68b065b..e09abc7 100644 --- a/modules/system/bluetooth.nix +++ b/modules/system/bluetooth.nix @@ -1,6 +1,3 @@ -{ pkgs, ... }: { +{ ... }: { services.blueman.enable = true; - environment.systemPackages = with pkgs; [ - blueman - ]; } diff --git a/modules/system/default.nix b/modules/system/default.nix index e9ec38e..a1f6ab8 100644 --- a/modules/system/default.nix +++ b/modules/system/default.nix @@ -15,12 +15,16 @@ ./virt.nix ]; + # Needed for some nautilus features like auto-mount and trash + services.gvfs.enable = true; + + # 57621: spotifyd networking.firewall.allowedTCPPorts = [ 57621 ]; # Auto-mount new devices - services.udev.extraRules = '' - ACTION=="add", SUBSYSTEMS=="usb", SUBSYSTEM=="block", ENV{ID_FS_USAGE}=="filesystem", RUN{program}+="${pkgs.systemd}/bin/systemd-mount --no-block --automount=yes --collect $devnode /media" - ''; + # services.udev.extraRules = '' + # ACTION=="add", SUBSYSTEMS=="usb", SUBSYSTEM=="block", ENV{ID_FS_USAGE}=="filesystem", RUN{program}+="${pkgs.systemd}/bin/systemd-mount --no-block --automount=yes --collect $devnode /media" + # ''; services.xserver.displayManager.gdm.enable = true; diff --git a/modules/system/home/media/default.nix b/modules/system/home/media/default.nix index 80587ba..7842ddb 100644 --- a/modules/system/home/media/default.nix +++ b/modules/system/home/media/default.nix @@ -9,13 +9,13 @@ services.spotifyd = { enable = true; - package = (pkgs.spotifyd.override {withKeyring = true; }); settings = { global = { device_name = "desktop"; bitrate = 160; volume_normalisation = true; autoplay = false; + zeroconf_port = 57621; }; }; }; diff --git a/modules/system/home/niri-setup/default.nix b/modules/system/home/niri-setup/default.nix index b19efde..b08b6ef 100644 --- a/modules/system/home/niri-setup/default.nix +++ b/modules/system/home/niri-setup/default.nix @@ -2,8 +2,9 @@ theme = import ../../../../colors.nix; in lib.mkIf (osConfig.withNiri) { home.packages = with pkgs; [ - polkit_gnome swaybg + iwgtk + blueberry ]; programs.fuzzel= { @@ -34,9 +35,7 @@ in lib.mkIf (osConfig.withNiri) { "clock" ]; modules-right = [ - "temperature" - "cpu" - "memory" + "wireplumber" "battery" ]; }; diff --git a/modules/system/niri/default.nix b/modules/system/niri/default.nix index 52a8430..ecfcc94 100644 --- a/modules/system/niri/default.nix +++ b/modules/system/niri/default.nix @@ -75,6 +75,8 @@ spawn-at-startup = [ { command = ["waybar"]; } { command = ["swaybg" "-i" "${../../../wallpaper/wallpaper.png}" "-m" "fill"]; } + { command = ["pamixer" "--set-volume" "0"]; } + { command = ["systemctl" "--user" "restart" "spotifyd.service"]; } ]; binds = { @@ -82,8 +84,8 @@ "Mod+B".action.spawn = "firefox"; "Mod+S".action.spawn = ["fuzzel" "-I" "-T" "alacritty"]; - "XF86AudioRaiseVolume".action.spawn = "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1+"; - "XF86AudioLowerVolume".action.spawn = "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1-"; + "XF86AudioRaiseVolume".action.spawn = "pamixer -i 5"; + "XF86AudioLowerVolume".action.spawn = "pamixer -d 5"; "Mod+Backspace".action.close-window = [];