Files
nix-config/modules/packages/flatpak.org
T
phundrak 216065c4f2 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-08 15:18:56 +02:00

40 lines
1006 B
Org Mode
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#+title: Flatpak
#+setupfile: ../headers
* 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.
#+begin_src nix :tangle yes
{
flake.modules.nixos.flatpak = {
pkgs,
lib,
config,
...
}:
with lib; let
cfg = config.mySystem.packages.flatpak;
in {
<<enable-flatpak>>
<<builder>>
};
}
#+end_src
** Enabling Flatpak
Flatpak support itself is always on once this module is imported.
#+name: enable-flatpak
#+begin_src nix
config.services.flatpak.enable = true;
#+end_src
** 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.
#+name: builder
#+begin_src nix
options.mySystem.packages.flatpak.builder.enable = mkEnableOption "Enable Flatpak builder";
config.environment.systemPackages = lists.optional cfg.builder.enable pkgs.flatpak-builder;
#+end_src