1
1
Fork 0
nixos/options/custom/services/flatpak.nix
Myned c24aac623e
flatpak: add optionals and retrodeck
Signed-off-by: Myned <dev@bjork.tech>
2024-09-18 08:41:22 -05:00

42 lines
1 KiB
Nix

{
config,
inputs,
lib,
pkgs,
...
}:
with lib; let
cfg = config.custom.services.flatpak;
in {
options.custom.services.flatpak.enable = mkOption {default = false;};
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 =
optionals config.custom.default [
"com.github.tchx84.Flatseal"
]
++ optionals config.custom.minimal [
"net.retrodeck.retrodeck"
]
++ optionals config.custom.full [
"app.drey.Biblioteca"
];
};
# Theme packages must be installed system-wide for flatpaks
environment.systemPackages = with pkgs; [
adw-gtk3
google-cursor
papirus-icon-theme
];
};
}