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
|
|
|
|
packages = [
|
|
|
|
"app.drey.Biblioteca"
|
|
|
|
"com.github.tchx84.Flatseal"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
# Theme packages must be installed system-wide for flatpaks
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
adw-gtk3
|
|
|
|
google-cursor
|
|
|
|
papirus-icon-theme
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|