feat(nixos): add Bambu Studio Flatpak

Manage the user Flatpak through nix-flatpak and enable printer discovery through the host firewall.
This commit is contained in:
alexion committed 2026-10-31 14:47:45 -04:00
1 parent 45f7e280d3
commit c7e3c093b4
4 files changed
+57

No files matched your search

@@ -0,0 +1,36 @@
{
config,
inputs,
lib,
util,
...
}:
# Bambu Studio for preparing and monitoring Bambu Lab prints.
let
user = config.user.name;
in
{
options.modules.desktop.apps.bambu-studio.enable =
lib.mkEnableOption "Bambu Studio for preparing and monitoring Bambu Lab prints";
config = lib.mkIf config.modules.desktop.apps.bambu-studio.enable {
services.flatpak.enable = true;
home-manager.sharedModules = [ inputs.nix-flatpak.homeManagerModules.nix-flatpak ];
home-manager.users.${user}.services.flatpak = {
enable = true;
packages = [ "com.bambulab.BambuStudio" ];
};
# Bambu printers announce themselves with SSDP multicast or broadcast traffic.
networking.firewall.allowedUDPPorts = [
1990
2021
];
registry.window-icon.${config.networking.hostName}.bambu-studio = {
class = "[Bb]ambu[Ss]tudio";
icon = util.glyph "f1b2";
};
};
}