Regenerated

This commit is contained in:
2026-03-30 11:56:29 +00:00
parent 8e61b4cd12
commit 698bffbe00
4 changed files with 538 additions and 383 deletions
+359 -326
View File
File diff suppressed because it is too large Load Diff
+75 -42
View File
@@ -288,24 +288,22 @@ in
* generated/traveldroid/modules/apps * generated/traveldroid/modules/apps
** =generated/modules/traveldroid/apps/packages.nix= ** =generated/modules/traveldroid/apps/2_b_installed.nix=
This installs a list of apps This installs a list of apps
#+BEGIN_SRC nix :tangle generated/modules/traveldroid/apps/packages.nix :noweb yes :mkdirp yes :eval never #+BEGIN_SRC nix :tangle generated/modules/traveldroid/apps/2_b_installed.nix :noweb yes :mkdirp yes :eval never
{ lib, config, pkgs, flakeRoot, ... }: { lib, config, pkgs, flakeRoot, ... }:
let let
################################# #################################
# Read package list from config file # FILE
################################# #################################
packagesConfPath = "${flakeRoot}/generated/assets/packages.conf"; confPath = "${flakeRoot}/generated/assets/packages.conf";
raw = builtins.readFile packagesConfPath; raw = builtins.readFile confPath;
lines = lib.splitString "\n" raw;
rawLines = lib.splitString "\n" raw; #################################
# CLEAN LINE
# Guard against splitting into characters accidentally #################################
_guard = assert !(builtins.stringLength raw > 1 && builtins.length rawLines == builtins.stringLength raw); true;
# Clean each line: remove CRs, comments, trim whitespace
cleanLine = line: cleanLine = line:
let let
noCR = lib.replaceStrings [ "\r" ] [ "" ] line; noCR = lib.replaceStrings [ "\r" ] [ "" ] line;
@@ -313,52 +311,94 @@ let
in in
lib.strings.trim noInlineComment; lib.strings.trim noInlineComment;
# Filter out empty lines #################################
entries = builtins.filter (l: l != "") (map cleanLine rawLines); # PARSE SECTION
#################################
parseSection = section:
let
result =
builtins.foldl'
(acc: line:
let
l = lib.strings.trim line;
in
if l == section then
acc // { active = true; }
else if lib.hasPrefix "#" l then
acc // { active = false; }
else if acc.active then
acc // { entries = acc.entries ++ [ l ]; }
else
acc
)
{ active = false; entries = []; }
lines;
in
builtins.filter (l: l != "") (map cleanLine result.entries);
#################################
# NIX PACKAGES
#################################
packageEntries = parseSection "#packages";
# Resolve attribute paths in pkgs
resolvePkg = name: resolvePkg = name:
let let
parts = lib.splitString "." name; parts = lib.splitString "." name;
found = lib.attrByPath parts null pkgs; found = lib.attrByPath parts null pkgs;
in in
if found == null then if found == null then
(throw '' throw ''
packages.nix: package not found in pkgs packages.nix: package not found
Token : ${builtins.toJSON name} Token: ${name}
packages.conf : ${packagesConfPath} File : ${confPath}
Hint : check the attribute name on search.nixos.org/packages ''
'')
else else
found; found;
# Final system-wide package list packages = map resolvePkg packageEntries;
packages = builtins.seq _guard (map resolvePkg entries);
#################################
# FLATPAKS
#################################
flatpakEntries = parseSection "#flatpaks";
in { in {
################################# #################################
# Allow unfree packages globally # Allow unfree
################################# #################################
nixpkgs.config = { allowUnfree = true; }; nixpkgs.config.allowUnfree = true;
################################# #################################
# System packages # System packages (Nix)
################################# #################################
environment.systemPackages = packages; environment.systemPackages = packages;
#################################
# Flatpak setup
#################################
services.flatpak.enable = true;
services.flatpak.remotes = [
{
name = "flathub";
location = "https://flathub.org/repo/flathub.flatpakrepo";
}
];
#################################
# Flatpak apps
#################################
services.flatpak.packages = flatpakEntries;
} }
#+END_SRC #+END_SRC
** =generated/assets/packages.conf= ** =generated/assets/2_b_installed.conf=
This is a list of additional apps to install This is a list of additional apps to install
#+BEGIN_SRC conf :tangle generated/assets/packages.conf :noweb yes :mkdirp yes :eval never #+BEGIN_SRC conf :tangle generated/assets/2_b_installed.conf :noweb yes :mkdirp yes :eval never
#productivity #packages
todoist todoist
# browsers
brave brave
chromium chromium
# utils
git git
direnv direnv
ripgrep ripgrep
@@ -379,30 +419,23 @@ zed-editor
eza eza
z-lua z-lua
qdirstat qdirstat
# office
obsidian obsidian
onlyoffice-desktopeditors onlyoffice-desktopeditors
# development
postman postman
tea tea
#jetbrains.pycharm
python3 python3
# communication
nextcloud-client nextcloud-client
nextcloud-talk-desktop nextcloud-talk-desktop
signal-desktop signal-desktop
openssl openssl
# multimedia
audacity audacity
handbrake handbrake
spotify spotify
vlc vlc
#flatpaks
eu.betterbird.Betterbird
com.todoist.Todoist
#+END_SRC #+END_SRC
** =generated/modules/traveldroid/apps/kitty.nix= ** =generated/modules/traveldroid/apps/kitty.nix=
@@ -1,11 +1,7 @@
#productivity #packages
todoist todoist
# browsers
brave brave
chromium chromium
# utils
git git
direnv direnv
ripgrep ripgrep
@@ -26,26 +22,20 @@ zed-editor
eza eza
z-lua z-lua
qdirstat qdirstat
# office
obsidian obsidian
onlyoffice-desktopeditors onlyoffice-desktopeditors
# development
postman postman
tea tea
#jetbrains.pycharm
python3 python3
# communication
nextcloud-client nextcloud-client
nextcloud-talk-desktop nextcloud-talk-desktop
signal-desktop signal-desktop
openssl openssl
# multimedia
audacity audacity
handbrake handbrake
spotify spotify
vlc vlc
#flatpaks
eu.betterbird.Betterbird
com.todoist.Todoist
@@ -0,0 +1,99 @@
{ lib, config, pkgs, flakeRoot, ... }:
let
#################################
# FILE
#################################
confPath = "${flakeRoot}/generated/assets/packages.conf";
raw = builtins.readFile confPath;
lines = lib.splitString "\n" raw;
#################################
# CLEAN LINE
#################################
cleanLine = line:
let
noCR = lib.replaceStrings [ "\r" ] [ "" ] line;
noInlineComment = lib.head (lib.splitString "#" noCR);
in
lib.strings.trim noInlineComment;
#################################
# PARSE SECTION
#################################
parseSection = section:
let
result =
builtins.foldl'
(acc: line:
let
l = lib.strings.trim line;
in
if l == section then
acc // { active = true; }
else if lib.hasPrefix "#" l then
acc // { active = false; }
else if acc.active then
acc // { entries = acc.entries ++ [ l ]; }
else
acc
)
{ active = false; entries = []; }
lines;
in
builtins.filter (l: l != "") (map cleanLine result.entries);
#################################
# NIX PACKAGES
#################################
packageEntries = parseSection "#packages";
resolvePkg = name:
let
parts = lib.splitString "." name;
found = lib.attrByPath parts null pkgs;
in
if found == null then
throw ''
packages.nix: package not found
Token: ${name}
File : ${confPath}
''
else
found;
packages = map resolvePkg packageEntries;
#################################
# FLATPAKS
#################################
flatpakEntries = parseSection "#flatpaks";
in {
#################################
# Allow unfree
#################################
nixpkgs.config.allowUnfree = true;
#################################
# System packages (Nix)
#################################
environment.systemPackages = packages;
#################################
# Flatpak setup
#################################
services.flatpak.enable = true;
services.flatpak.remotes = [
{
name = "flathub";
location = "https://flathub.org/repo/flathub.flatpakrepo";
}
];
#################################
# Flatpak apps
#################################
services.flatpak.packages = flatpakEntries;
}