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

+1
View File
@@ -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";
};
};
}
Generated
+17
View File
@@ -321,6 +321,22 @@
"type": "github"
}
},
"nix-flatpak": {
"locked": {
"lastModified": 1767983141,
"narHash": "sha256-7ZCulYUD9RmJIDULTRkGLSW1faMpDlPKcbWJLYHoXcs=",
"owner": "gmodena",
"repo": "nix-flatpak",
"rev": "440818969ac2cbd77bfe025e884d0aa528991374",
"type": "github"
},
"original": {
"owner": "gmodena",
"ref": "v0.7.0",
"repo": "nix-flatpak",
"type": "github"
}
},
"nixos-hardware": {
"inputs": {
"nixpkgs": [
@@ -456,6 +472,7 @@
"firefox-addons": "firefox-addons",
"gitea-axi": "gitea-axi",
"home-manager": "home-manager_3",
"nix-flatpak": "nix-flatpak",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_2",
"nixpkgs-stable": "nixpkgs-stable",
+3
View File
@@ -16,6 +16,9 @@
inputs.nixpkgs.follows = "nixpkgs";
};
# Installs Flatpak applications declaratively.
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=v0.7.0";
# Provides signed AMO extensions pinned by version and hash.
firefox-addons = {
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";