Files
dev/configs/nixos/modules/desktop/apps/bambu-studio.nix
T
alexion c7e3c093b4 feat(nixos): add Bambu Studio Flatpak
Manage the user Flatpak through nix-flatpak and enable printer discovery through the host firewall.
2026-10-31 14:47:45 -04:00

37 lines
918 B
Nix

{
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";
};
};
}