1773679041

This commit is contained in:
2026-03-16 10:37:21 -06:00
parent 26acc77288
commit 1ba22e0ca5
3 changed files with 44 additions and 2 deletions
+1
View File
@@ -13,6 +13,7 @@
./modules/programs.nix
./modules/hardware.nix
./modules/services.nix
./modules/flatpak.nix
./modules/home.nix
];
+43
View File
@@ -0,0 +1,43 @@
{ pkgs, lib, ... }:
let
# Format: "<remote>:<app-id>"
flatpakApps = [
"flathub:in.cinny.Cinny"
];
installScript = pkgs.writeShellScript "flatpak-setup" ''
${pkgs.flatpak}/bin/flatpak remote-add --if-not-exists flathub \
https://dl.flathub.org/repo/flathub.flatpakrepo
${lib.concatMapStringsSep "\n" (
entry:
let
parts = lib.splitString ":" entry;
remote = lib.elemAt parts 0;
appId = lib.elemAt parts 1;
in
''
${pkgs.flatpak}/bin/flatpak install --assumeyes --noninteractive \
${remote} ${appId} || true
''
) flatpakApps}
'';
in
{
services.flatpak.enable = true;
environment.sessionVariables = {
XDG_DATA_DIRS = [
"/var/lib/flatpak/exports/share"
"\${HOME}/.local/share/flatpak/exports/share"
];
};
system.activationScripts.flatpakSetup = {
text = ''
${installScript}
'';
deps = [ ];
};
}
-2
View File
@@ -54,6 +54,4 @@
services.avahi.publish.enable = true;
services.avahi.publish.userServices = true;
services.flatpak.enable = true;
}