flatpak: Move to common instead of being machine-specific

This commit is contained in:
OatmealDome
2024-11-10 23:32:36 -05:00
parent b1a5aed1ee
commit cb30e86014
4 changed files with 21 additions and 13 deletions

View File

@@ -5,6 +5,7 @@
agenix.nixosModules.default
./backup.nix
./flatpak.nix
./http.nix
./mail.nix
./monitoring.nix

18
common/flatpak.nix Normal file
View File

@@ -0,0 +1,18 @@
{ config, lib, pkgs, ... }:
let
cfg = config.my.flatpak;
in {
options.my.flatpak.enable = lib.mkEnableOption "Flatpak";
config = lib.mkIf cfg.enable {
# Needed for Flatpak.
xdg.portal = {
enable = true;
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
config.common.default = "gtk";
};
services.flatpak.enable = true;
};
}

View File

@@ -7,7 +7,6 @@ in {
my.modules
./emulation.nix
./flatpak.nix
./hypervisor.nix
./hardware.nix
./postgres.nix
@@ -34,6 +33,8 @@ in {
networking.domain = "dolphin-emu.org";
networking.search = [ "dolphin-emu.org" ];
my.flatpak.enable = true;
my.roles = {
analytics.enable = true;
android-updater.enable = true;

View File

@@ -1,12 +0,0 @@
{ pkgs, ... }:
{
# Needed for Flatpak.
xdg.portal = {
enable = true;
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
config.common.default = "gtk";
};
services.flatpak.enable = true;
}