Skip to content

Commit

Permalink
Replace pulse audio with pipewire. Enable bluetooth services.
Browse files Browse the repository at this point in the history
  • Loading branch information
kczulko committed Nov 8, 2021
1 parent c0c0d40 commit d8ec1de
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 9 deletions.
51 changes: 50 additions & 1 deletion common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,59 @@ in
config.services.avahi.enable = true;
config.services.avahi.nssmdns = true;

config.services.blueman.enable = true; #bluetooth

config.services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
# If you want to use JACK applications, uncomment this
#jack.enable = true;

# use the example session manager (no others are packaged yet so this is enabled by default,
# no need to redefine it in your config for now)
#media-session.enable = true;
media-session.config.bluez-monitor.rules = [
{
# Matches all cards
matches = [ { "device.name" = "~bluez_card.*"; } ];
actions = {
"update-props" = {
"bluez5.reconnect-profiles" = [ "hfp_hf" "hsp_hs" "a2dp_sink" ];
# mSBC is not expected to work on all headset + adapter combinations.
"bluez5.msbc-support" = true;
# SBC-XQ is not expected to work on all headset + adapter combinations.
"bluez5.sbc-xq-support" = true;
};
};
}
{
matches = [
# Matches all sources
{ "node.name" = "~bluez_input.*"; }
# Matches all outputs
{ "node.name" = "~bluez_output.*"; }
];
actions = {
"node.pause-on-idle" = false;
};
}
];
};

# Enable sound.
config.sound.enable = true;
config.hardware = {
pulseaudio.enable = true;

bluetooth = {
enable = true;
settings = {
General = {
Enable = "Source,Sink,Media,Socket";
};
};
};

sane = {
enable = true;
Expand Down
9 changes: 8 additions & 1 deletion desktops/default-desktop.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ let
fetchTarball https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz
){ config = { allowUnfree = true; }; };

i3lock-pixeled-fixed = pkgs.i3lock-pixeled.overrideDerivation (oldAttrs: rec {
patchPhase = oldAttrs.patchPhase + ''
substituteInPlace i3lock-pixeled \
--replace '# take the actual screenshot' 'rm $IMGFILE 2> /dev/null'
'';
});

in {
services = {
# For checking power status
Expand All @@ -23,8 +30,8 @@ in {
extraPackages = with pkgs; [
dmenu
feh
i3lock-pixeled-fixed
i3status
i3lock-pixeled-fixed
polybarFull
rofi
];
Expand Down
2 changes: 2 additions & 0 deletions users/kczulko/config-files/.config/i3/config
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ exec --no-startup-id sh ~/.screenlayout/setup.sh
# NetworkManager is the most popular way to manage wireless networks on Linux,
# and nm-applet is a desktop environment-independent system tray GUI for it.
exec --no-startup-id nm-applet
# blueman-applet for bluetooth devices mgmt
exec --no-startup-id blueman-applet

# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
Expand Down
9 changes: 2 additions & 7 deletions users/kczulko/user-profile.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,6 @@ let

sbtJava8 = pkgs.sbt.override { jre = pkgs.openjdk8; };

i3lock-pixeled-fixed = pkgs.i3lock-pixeled.overrideDerivation (oldAttrs: rec {
patchPhase = oldAttrs.patchPhase + ''
substituteInPlace i3lock-pixeled \
--replace '# take the actual screenshot' 'rm $IMGFILE 2> /dev/null'
'';
});

# cannot build derivation unstable.metals due to hash issues
metalsJava8 = pkgs.metals.override { jdk = pkgs.openjdk8; jre = pkgs.openjdk8; };
bloopJava8 = pkgs.bloop.override { jre = pkgs.openjdk8; };
Expand Down Expand Up @@ -69,11 +62,13 @@ in {
customizations.polybar-launcher
customizations.setup-resolution
evince
noisetorch
gnome3.gnome-screenshot
gscan2pdf
ispell
metalsJava8
nix-prefetch-git
openconnect
openjdk8
sbtJava8
slack-dark
Expand Down
4 changes: 4 additions & 0 deletions workstation.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
boot.zfs.requestEncryptionCredentials = true;
boot.supportedFilesystems = [ "zfs" ];

# enable virtualisation
#virtualisation.virtualbox.host.enable = true;
#users.extraGroups.vboxusers.members = [ "kczulko" ];

networking = {

useDHCP = false;
Expand Down

0 comments on commit d8ec1de

Please sign in to comment.