Compare commits

...

2 Commits

Author SHA1 Message Date
henrov cd8196d859 Working on reshuffling 2026-03-19 13:26:35 +00:00
henrov 6243a94d21 deleted generated files 2026-03-19 13:26:34 +00:00
2 changed files with 38 additions and 28 deletions
+19 -14
View File
@@ -777,19 +777,24 @@ This will import all packages listed in ../../assets/system/apps/flatpaks.conf
{ lib, pkgs, config, ... }:
let
moduleName = "flatpaks";
username = config.defaultUser or "henrov";
moduleName = "flatpaks";
# Toggle for this module
enableProgram = config.enableFlatpaks or false;
# Default username
username = config.defaultUser or "henrov";
# Path to the flatpaks.conf (no reading at eval time!)
flatpakConfPath = ../../../assets/system/apps/flatpaks.conf;
enableProgram = config.enableFlatpaks or false;
in
{
# Top-level toggle for this module
in {
# Top-level toggle option
options.enableFlatpaks = lib.mkEnableOption "Enable automatic Flatpak installation";
config = lib.mkIf enableProgram {
# Assign myApps.flatpaks inside config only
# Place Flatpaks under myApps (do not declare nested options)
myApps = {
flatpaks = {
enable = true;
@@ -799,14 +804,14 @@ in
};
};
# Deploy the conf file
# Deploy the conf file to /etc
environment.etc."flatpak/flatpaks.conf".source = flatpakConfPath;
# Enable flatpak
# Enable flatpak service
services.flatpak.enable = true;
xdg.portal.enable = true;
xdg.portal.enable = true;
# Systemd service to sync flatpaks
# Systemd service for installing listed Flatpaks
systemd.services.flatpak-sync = {
description = "Install Flatpak apps listed in flatpaks.conf";
wantedBy = [ "multi-user.target" ];
@@ -824,10 +829,10 @@ in
flatpak remote-add --system --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
fi
# Install apps from conf
while read -r app; do
# Read apps safely (ignore empty lines and comments)
while IFS= read -r app || [ -n "$app" ]; do
app=$(echo "$app" | sed 's/#.*//;s/^[[:space:]]*//;s/[[:space:]]*$//')
if [[ -n "$app" ]]; then
if [ -n "$app" ]; then
if ! flatpak info --system "$app" >/dev/null 2>&1; then
flatpak install --system -y --noninteractive flathub "$app"
fi
+19 -14
View File
@@ -1,19 +1,24 @@
{ lib, pkgs, config, ... }:
let
moduleName = "flatpaks";
username = config.defaultUser or "henrov";
moduleName = "flatpaks";
# Toggle for this module
enableProgram = config.enableFlatpaks or false;
# Default username
username = config.defaultUser or "henrov";
# Path to the flatpaks.conf (no reading at eval time!)
flatpakConfPath = ../../../assets/system/apps/flatpaks.conf;
enableProgram = config.enableFlatpaks or false;
in
{
# Top-level toggle for this module
in {
# Top-level toggle option
options.enableFlatpaks = lib.mkEnableOption "Enable automatic Flatpak installation";
config = lib.mkIf enableProgram {
# Assign myApps.flatpaks inside config only
# Place Flatpaks under myApps (do not declare nested options)
myApps = {
flatpaks = {
enable = true;
@@ -23,14 +28,14 @@ in
};
};
# Deploy the conf file
# Deploy the conf file to /etc
environment.etc."flatpak/flatpaks.conf".source = flatpakConfPath;
# Enable flatpak
# Enable flatpak service
services.flatpak.enable = true;
xdg.portal.enable = true;
xdg.portal.enable = true;
# Systemd service to sync flatpaks
# Systemd service for installing listed Flatpaks
systemd.services.flatpak-sync = {
description = "Install Flatpak apps listed in flatpaks.conf";
wantedBy = [ "multi-user.target" ];
@@ -48,10 +53,10 @@ in
flatpak remote-add --system --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
fi
# Install apps from conf
while read -r app; do
# Read apps safely (ignore empty lines and comments)
while IFS= read -r app || [ -n "$app" ]; do
app=$(echo "$app" | sed 's/#.*//;s/^[[:space:]]*//;s/[[:space:]]*$//')
if [[ -n "$app" ]]; then
if [ -n "$app" ]; then
if ! flatpak info --system "$app" >/dev/null 2>&1; then
flatpak install --system -y --noninteractive flathub "$app"
fi