2024-09-09 00:22:14 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
inputs,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
2024-09-13 01:50:53 +00:00
|
|
|
with lib; let
|
2024-09-09 00:22:14 +00:00
|
|
|
cfg = config.custom.services.flatpak;
|
2024-09-13 01:50:53 +00:00
|
|
|
in {
|
|
|
|
options.custom.services.flatpak.enable = mkOption {default = false;};
|
2024-09-09 00:22:14 +00:00
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
# https://wiki.nixos.org/wiki/Flatpak
|
|
|
|
# https://github.com/gmodena/nix-flatpak
|
|
|
|
services.flatpak = {
|
|
|
|
enable = true;
|
|
|
|
uninstallUnmanaged = true; # Immutable flatpaks
|
|
|
|
update.auto.enable = true; # Auto update flatpaks weekly
|
|
|
|
|
|
|
|
#!! Installation occurs in background as a oneshot service
|
|
|
|
#?? flatpak search NAME
|
2024-09-18 13:41:22 +00:00
|
|
|
packages =
|
|
|
|
optionals config.custom.default [
|
|
|
|
"com.github.tchx84.Flatseal"
|
|
|
|
]
|
|
|
|
++ optionals config.custom.minimal [
|
|
|
|
"net.retrodeck.retrodeck"
|
|
|
|
]
|
|
|
|
++ optionals config.custom.full [
|
|
|
|
"app.drey.Biblioteca"
|
|
|
|
];
|
2024-09-09 00:22:14 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# Theme packages must be installed system-wide for flatpaks
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
adw-gtk3
|
|
|
|
google-cursor
|
|
|
|
papirus-icon-theme
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|