Files
nix-config/modules/packages/flatpak.org
T
phundrak 0cb44b51e7 refactor: change to litterate config
Configuration is now held by the `.org` files. All `.nix` files are
tangled from the org-mode files.
2026-10-11 16:55:06 +02:00

1006 B
Raw Blame History

Flatpak

Flatpak

Here’s the nixos.flatpak module, enabling Flatpak itself and optionally pulling in its builder for the rare occasion I want to build a Flatpak myself.

{
  flake.modules.nixos.flatpak = {
    pkgs,
    lib,
    config,
    ...
  }:
    with lib; let
      cfg = config.mySystem.packages.flatpak;
    in {
      <<enable-flatpak>>
      <<builder>>
    };
}

Enabling Flatpak

Flatpak support itself is always on once this module is imported.

config.services.flatpak.enable = true;

Flatpak Builder

flatpak-builder is only worth installing on the machines where I actually build Flatpaks, if any, so it stays behind its own toggle.

options.mySystem.packages.flatpak.builder.enable = mkEnableOption "Enable Flatpak builder";
config.environment.systemPackages = lists.optional cfg.builder.enable pkgs.flatpak-builder;