fix: bluetooth and tailscale

This commit is contained in:
Jet 2026-05-12 10:22:32 -07:00
parent 57f73dbb50
commit e9371a503e
No known key found for this signature in database
2 changed files with 100 additions and 4 deletions

View file

@ -17,6 +17,7 @@
settings = { settings = {
General = { General = {
Experimental = true; # Show battery charge of Bluetooth devices Experimental = true; # Show battery charge of Bluetooth devices
MultiProfile = "multiple";
}; };
}; };
}; };
@ -47,6 +48,7 @@
requires = [ "tailscaled.service" ]; requires = [ "tailscaled.service" ];
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
serviceConfig.Type = "oneshot"; serviceConfig.Type = "oneshot";
serviceConfig.RemainAfterExit = true;
path = [ pkgs.tailscale ]; path = [ pkgs.tailscale ];
script = '' script = ''
tailscale set --operator=jet tailscale set --operator=jet
@ -66,14 +68,30 @@
"tailscale-set-operator.service" "tailscale-set-operator.service"
]; ];
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
path = [
pkgs.tailscale
pkgs.coreutils
pkgs.gnugrep
];
preStart = ''
for attempt in {1..60}; do
if tailscale status --json --peers=false | grep -q '"BackendState": *"Running"'; then
tailscale serve --bg 4096
exit 0
fi
sleep 1
done
echo "Timed out waiting for Tailscale to reach Running state"
exit 1
'';
serviceConfig = { serviceConfig = {
Type = "simple"; Type = "simple";
User = "jet"; User = "jet";
Restart = "always"; Restart = "always";
RestartSec = 5; RestartSec = 5;
ExecStartPre = [ TimeoutStartSec = 75;
"${pkgs.tailscale}/bin/tailscale serve --bg 4096"
];
ExecStart = "/etc/profiles/per-user/jet/bin/opencode serve --hostname 127.0.0.1 --port 4096"; ExecStart = "/etc/profiles/per-user/jet/bin/opencode serve --hostname 127.0.0.1 --port 4096";
WorkingDirectory = config.users.users.jet.home; WorkingDirectory = config.users.users.jet.home;
}; };
@ -270,6 +288,24 @@
alsa.enable = true; alsa.enable = true;
alsa.support32Bit = true; alsa.support32Bit = true;
pulse.enable = true; pulse.enable = true;
wireplumber.extraConfig."10-bluez" = {
"monitor.bluez.properties" = {
"bluez5.roles" = [
"a2dp_sink"
"a2dp_source"
"hsp_hs"
"hsp_ag"
"hfp_hf"
"hfp_ag"
];
"bluez5.enable-sbc-xq" = true;
"bluez5.enable-msbc" = true;
};
"wireplumber.settings" = {
"bluetooth.autoswitch-to-headset-profile" = false;
};
};
}; };
users.users.jet = { users.users.jet = {
isNormalUser = true; isNormalUser = true;

View file

@ -67,6 +67,60 @@ let
"${homeLib.zulipStartup}/share/applications/zulip-startup.desktop" "${homeLib.zulipStartup}/share/applications/zulip-startup.desktop"
] ]
); );
vlcDesktop = "vlc.desktop";
vlcVideoMimeTypes = [
"application/mxf"
"application/x-extension-mp4"
"application/x-matroska"
"application/x-quicktime-media-link"
"application/x-quicktimeplayer"
"video/3gp"
"video/3gpp"
"video/3gpp2"
"video/avi"
"video/divx"
"video/dv"
"video/fli"
"video/flv"
"video/mp2t"
"video/mp4"
"video/mp4v-es"
"video/mpeg"
"video/mpeg-system"
"video/msvideo"
"video/ogg"
"video/quicktime"
"video/vnd.divx"
"video/vnd.mpegurl"
"video/vnd.rn-realvideo"
"video/webm"
"video/x-anim"
"video/x-avi"
"video/x-flc"
"video/x-fli"
"video/x-flv"
"video/x-m4v"
"video/x-matroska"
"video/x-mpeg"
"video/x-mpeg-system"
"video/x-mpeg2"
"video/x-ms-asf"
"video/x-ms-asf-plugin"
"video/x-ms-asx"
"video/x-ms-wm"
"video/x-ms-wmv"
"video/x-ms-wmx"
"video/x-ms-wvx"
"video/x-msvideo"
"video/x-nsv"
"video/x-ogm"
"video/x-ogm+ogg"
"video/x-theora"
"video/x-theora+ogg"
"x-content/video-dvd"
"x-content/video-svcd"
"x-content/video-vcd"
];
in in
{ {
@ -266,6 +320,12 @@ in
"application/x-7z-compressed" = "org.gnome.FileRoller.desktop"; "application/x-7z-compressed" = "org.gnome.FileRoller.desktop";
"application/x-rar" = "org.gnome.FileRoller.desktop"; "application/x-rar" = "org.gnome.FileRoller.desktop";
"application/x-rar-compressed" = "org.gnome.FileRoller.desktop"; "application/x-rar-compressed" = "org.gnome.FileRoller.desktop";
}; }
// builtins.listToAttrs (
map (mimeType: {
name = mimeType;
value = vlcDesktop;
}) vlcVideoMimeTypes
);
}; };
} }