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:
1 parent
45f7e280d3
commit
c7e3c093b4
4 files changed
+57
No files matched your search
@@ -43,6 +43,7 @@
|
||||
modules.shell.omp.enable = true;
|
||||
|
||||
modules.desktop.enable = true;
|
||||
modules.desktop.apps.bambu-studio.enable = true;
|
||||
modules.desktop.apps.obsidian.enable = true;
|
||||
modules.desktop.apps.r2modman.enable = true;
|
||||
modules.desktop.emulation.enable = true;
|
||||
|
||||
@@ -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";
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user