diff --git a/configuration.nix b/configuration.nix index 783f0fe..1985f8d 100644 --- a/configuration.nix +++ b/configuration.nix @@ -17,6 +17,7 @@ settings = { General = { Experimental = true; # Show battery charge of Bluetooth devices + MultiProfile = "multiple"; }; }; }; @@ -47,6 +48,7 @@ requires = [ "tailscaled.service" ]; wantedBy = [ "multi-user.target" ]; serviceConfig.Type = "oneshot"; + serviceConfig.RemainAfterExit = true; path = [ pkgs.tailscale ]; script = '' tailscale set --operator=jet @@ -66,14 +68,30 @@ "tailscale-set-operator.service" ]; 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 = { Type = "simple"; User = "jet"; Restart = "always"; RestartSec = 5; - ExecStartPre = [ - "${pkgs.tailscale}/bin/tailscale serve --bg 4096" - ]; + TimeoutStartSec = 75; ExecStart = "/etc/profiles/per-user/jet/bin/opencode serve --hostname 127.0.0.1 --port 4096"; WorkingDirectory = config.users.users.jet.home; }; @@ -270,6 +288,24 @@ alsa.enable = true; alsa.support32Bit = 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 = { isNormalUser = true; diff --git a/home-modules/desktop.nix b/home-modules/desktop.nix index 38a6215..32dafd1 100644 --- a/home-modules/desktop.nix +++ b/home-modules/desktop.nix @@ -67,6 +67,60 @@ let "${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 { @@ -266,6 +320,12 @@ in "application/x-7z-compressed" = "org.gnome.FileRoller.desktop"; "application/x-rar" = "org.gnome.FileRoller.desktop"; "application/x-rar-compressed" = "org.gnome.FileRoller.desktop"; - }; + } + // builtins.listToAttrs ( + map (mimeType: { + name = mimeType; + value = vlcDesktop; + }) vlcVideoMimeTypes + ); }; }