deleted generated files

This commit is contained in:
2026-03-19 13:16:41 +00:00
parent fbc26bc90d
commit fe6ee940e1
30 changed files with 26 additions and 1408 deletions
@@ -1,66 +0,0 @@
{ lib, pkgs, config, ... }:
let
moduleName = "flatpaks";
# Relative path for assets
flatpakConfPath = ./assets/system/apps/flatpaks.conf;
enableProgram = config.enableFlatpaks or false;
in
{
# Top-level toggle
options.enableFlatpaks = lib.mkEnableOption "Enable automatic Flatpak installation";
config = lib.mkIf enableProgram {
myApps = {
flatpaks = {
enable = true;
assetsDir = flatpakConfPath;
files = []; # don't read at evaluation
user = config.defaultUser or "henrov";
};
};
# Deploy the conf file and systemd script
environment.etc."flatpak/flatpaks.conf".source = flatpakConfPath;
systemd.services.flatpak-sync = {
description = "Install Flatpak apps listed in flatpaks.conf";
wantedBy = [ "multi-user.target" ];
wants = [ "network-online.target" ];
after = [ "network-online.target" ];
serviceConfig = {
Type = "oneshot";
ExecStart = ''
set -euo pipefail
CONF="${flatpakConfPath}"
if ! flatpak remotes --system --columns=name | grep -qx flathub; then
flatpak remote-add --system --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
fi
while read -r app; do
app=$(echo "$app" | sed 's/#.*//;s/^[[:space:]]*//;s/[[:space:]]*$//')
if [[ -n "$app" ]]; then
if ! flatpak info --system "$app" >/dev/null 2>&1; then
flatpak install --system -y --noninteractive flathub "$app"
fi
fi
done < "$CONF"
'';
};
restartTriggers = [ flatpakConfPath ];
path = [
pkgs.flatpak
pkgs.coreutils
pkgs.gnugrep
pkgs.gnused
];
};
services.flatpak.enable = true;
xdg.portal.enable = true;
};
}