mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 04:19:19 -08:00
refactor: get rid of config folder
This commit is contained in:
parent
2606e1d874
commit
cb3ae5f434
254 changed files with 79 additions and 101 deletions
59
profiles/hardware/networkmanager.nix
Normal file
59
profiles/hardware/networkmanager.nix
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
{ config, lib, pkgs, ... }: with lib; {
|
||||
options = {
|
||||
home-manager.users = let
|
||||
applets = { config, nixos, ... }: {
|
||||
xsession.preferStatusNotifierItems = true;
|
||||
services = {
|
||||
network-manager-applet.enable = true;
|
||||
blueman-applet.enable = true;
|
||||
};
|
||||
};
|
||||
in mkOption {
|
||||
type = types.attrsOf (types.submoduleWith {
|
||||
modules = singleton applets;
|
||||
});
|
||||
};
|
||||
};
|
||||
config = {
|
||||
systemd.services.NetworkManager-wait-online = {
|
||||
serviceConfig.ExecStart = [ "" "${pkgs.networkmanager}/bin/nm-online -q" ];
|
||||
};
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
settings = {
|
||||
General = {
|
||||
Enable = "Source,Sink,Media,Socket";
|
||||
};
|
||||
};
|
||||
};
|
||||
services.blueman.enable = true;
|
||||
services.pipewire.media-session.config.bluez-monitor = {
|
||||
properties = { };
|
||||
rules = [
|
||||
{
|
||||
actions = {
|
||||
update-props = {
|
||||
"bluez5.a2dp-source-role" = "input";
|
||||
"bluez5.auto-connect" = [ "hfp_hf" "hsp_hs" "a2dp_sink" "a2dp_source" "hsp_ag" "hfp_ag" ];
|
||||
};
|
||||
};
|
||||
matches = [ { "device.name" = "~bluez_card.*"; } ];
|
||||
}
|
||||
{
|
||||
actions = {
|
||||
update-props = { "node.pause-on-idle" = false; };
|
||||
};
|
||||
matches = [ { "node.name" = "~bluez_input.*"; } { "node.name" = "~bluez_output.*"; } ];
|
||||
}
|
||||
];
|
||||
};
|
||||
networking = {
|
||||
networkmanager = {
|
||||
enable = true;
|
||||
connectionConfig = {
|
||||
"ipv6.ip6-privacy" = mkForce 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue