deleted generated files
This commit is contained in:
+12
-5
@@ -763,26 +763,31 @@ This will import all packages listed in ../../assets/system/apps/flatpaks.conf
|
||||
{ lib, pkgs, config, ... }:
|
||||
|
||||
let
|
||||
flatpakConfPath = ../../../assets/system/apps/flatpaks.conf;
|
||||
enableProgram = config.enableFlatpaks or false;
|
||||
flatpakConfPath = ../../../assets/system/apps/flatpaks.conf;
|
||||
enableProgram = config.enableFlatpaks or false;
|
||||
in
|
||||
{
|
||||
# Top-level toggle
|
||||
options.enableFlatpaks = lib.mkEnableOption "Enable automatic Flatpak installation";
|
||||
|
||||
# Config assignments
|
||||
config = lib.mkIf enableProgram {
|
||||
|
||||
myApps.flatpaks = {
|
||||
# Use programs.flatpaks instead of myApps.flatpaks
|
||||
programs.flatpaks = {
|
||||
enable = true;
|
||||
user = config.defaultUser or "henrov";
|
||||
assetsDir = flatpakConfPath;
|
||||
files = [];
|
||||
files = []; # handled at runtime
|
||||
};
|
||||
|
||||
# Deploy the conf file
|
||||
environment.etc."flatpak/flatpaks.conf".source = flatpakConfPath;
|
||||
|
||||
# Enable system flatpak service
|
||||
services.flatpak.enable = true;
|
||||
xdg.portal.enable = true;
|
||||
|
||||
# Systemd service for installing listed flatpaks
|
||||
systemd.services.flatpak-sync = {
|
||||
description = "Install Flatpak apps listed in flatpaks.conf";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
@@ -794,9 +799,11 @@ in
|
||||
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 IFS= read -r app || [ -n "$app" ]; do
|
||||
app=$(echo "$app" | sed 's/#.*//;s/^[[:space:]]*//;s/[[:space:]]*$//')
|
||||
if [ -n "$app" ]; then
|
||||
|
||||
Reference in New Issue
Block a user