back to building state
This commit is contained in:
parent
1eeceb742b
commit
ad816fe171
14 changed files with 207 additions and 140 deletions
|
@ -1,30 +1,30 @@
|
|||
{
|
||||
config,
|
||||
options,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.modules) mkDefault mkIf mkMerge;
|
||||
{ config, options, lib, pkgs, ... }: let
|
||||
inherit (lib.modules) mkDefault;
|
||||
inherit (lib.options) mkOption;
|
||||
|
||||
cfg = config.modules.networking;
|
||||
in {
|
||||
options.modules.networking = let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
in {
|
||||
enable = mkEnableOption "network manager";
|
||||
options.modules.networking = {
|
||||
wifi.backend = mkOption {
|
||||
type = with lib.types; enum [ "wpa_supplicant" "iwd" ];
|
||||
default = "wpa_supplicant";
|
||||
example = "wpa_supplicant";
|
||||
description = "set the backend used for wifi wpa_supplicant by default";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
config = {
|
||||
systemd.services.NetworkManager-wait-online.enable = false;
|
||||
|
||||
networking = {
|
||||
enableIPv6 = true;
|
||||
useDHCP = mkDefault true;
|
||||
|
||||
firewall.enable = true;
|
||||
|
||||
networkmanager = {
|
||||
enable = mkDefault true;
|
||||
wifi.backend = "wpa_supplicant";
|
||||
wifi.backend = mkDefault config.modules.networking.wifi.backend;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -24,7 +24,6 @@ in
|
|||
enable = true;
|
||||
wireplumber.enable = true;
|
||||
pulse.enable = true;
|
||||
# jack.enable = true;
|
||||
|
||||
alsa = {
|
||||
enable = true;
|
||||
|
|
33
modules/system/system/bluetooth.nix
Normal file
33
modules/system/system/bluetooth.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
{ config, options, lib, pkgs, ... }:
|
||||
let
|
||||
inherit (lib.attrsets) attrValues;
|
||||
inherit (lib.modules) mkIf;
|
||||
|
||||
cfg = config.modules.system.bluetooth;
|
||||
in
|
||||
{
|
||||
options.modules.system.bluetooth = let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
in
|
||||
{
|
||||
enable = mkEnableOption "enable bluetooth";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
hardware = {
|
||||
bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
};
|
||||
};
|
||||
|
||||
services.pipewire.wireplumber.extraConfig.bluetoothEnhancements = {
|
||||
"monitor.bluez.properties" = {
|
||||
"bluez5.enable-sbc-xq" = true;
|
||||
"bluez5.enable-msbc" = true;
|
||||
"bluez5.enable-hw-volume" = true;
|
||||
"bluez5.roles" = [ "hsp_hs" "hsp_ag" "hfp_hf" "hfp_ag" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue