aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/services/nixos/audio.nix2
-rw-r--r--modules/services/nixos/bluetooth.nix25
-rw-r--r--modules/services/options.nix15
3 files changed, 19 insertions, 23 deletions
diff --git a/modules/services/nixos/audio.nix b/modules/services/nixos/audio.nix
index 8f2f23e..9de6787 100644
--- a/modules/services/nixos/audio.nix
+++ b/modules/services/nixos/audio.nix
@@ -17,5 +17,5 @@ in
boot.blacklistedKernelModules = ["snd_seq_dummy"]; # remove extraneous alsa midi devices
- environment.systemPackages = [pkgs.pwvucontrol];
+ environment.systemPackages = with pkgs; [pwvucontrol qpwgraph];
}
diff --git a/modules/services/nixos/bluetooth.nix b/modules/services/nixos/bluetooth.nix
index bdcaa00..acf628c 100644
--- a/modules/services/nixos/bluetooth.nix
+++ b/modules/services/nixos/bluetooth.nix
@@ -1,5 +1,4 @@
{
- pkgs,
lib,
config,
...
@@ -10,22 +9,32 @@ in
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
+
+ settings.General = {
+ FastConnectable = true;
+ ControllerMode = "bredr";
+ JustWorksRepairing = "always";
+ };
+ };
+
+ systemd.user.services."mpris-proxy" = {
+ unitConfig = {
+ BindsTo = ["bluetooth.target"];
+ After = ["bluetooth.target"];
+ };
+
+ wantedBy = ["bluetooth.target"];
+
+ # serviceConfig already exists (?)
};
# hardening (down to 2.1 OK)
systemd.services."bluetooth".serviceConfig = {
IPAddressDeny = "any";
- ProtectHostname = true;
- ProtectKernelTunables = lib.mkForce true;
ProtectKernelLogs = true;
ProtectKernelModules = lib.mkForce true;
RestrictAddressFamilies = ["AF_UNIX" "AF_BLUETOOTH"];
ProtectClock = true;
ProcSubset = "pid";
};
-
- environment.systemPackages = [
- (lib.mkIf cfg.blueman.enable pkgs.blueman)
- (lib.mkIf cfg.bluetuith.enable pkgs.bluetuith)
- ];
}
diff --git a/modules/services/options.nix b/modules/services/options.nix
index b2cc24e..9a1f662 100644
--- a/modules/services/options.nix
+++ b/modules/services/options.nix
@@ -59,11 +59,7 @@ in {
audio.enable = mkEnableOption "pipewire and wireplumber";
- bluetooth = {
- enable = mkEnableOption "bluetooth";
- blueman.enable = mkEnableOption "graphical bluetooth manager";
- bluetuith.enable = mkEnableOption "terminal bluetooth manager";
- };
+ bluetooth.enable = mkEnableOption "bluetooth";
selfhost = let
selfhostOptions = {
@@ -125,13 +121,4 @@ in {
};
};
};
-
- config = {
- assertions = [
- {
- assertion = with config.collinux.services.networking; (iwd.enable && !networkmanager.enable && !networkd.enable) || (!iwd.enable && networkmanager.enable && !networkd.enable) || (!iwd.enable && !networkmanager.enable && networkd.enable);
- message = "only one networking method (iwd, networkmanager, networkd) can be active";
- }
- ];
- };
}