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
@@ -1,11 +1,7 @@
#productivity
#packages
todoist
# browsers
brave
chromium
# utils
git
direnv
ripgrep
@@ -26,26 +22,20 @@ zed-editor
eza
z-lua
qdirstat
# office
obsidian
onlyoffice-desktopeditors
# development
postman
tea
#jetbrains.pycharm
python3
# communication
nextcloud-client
nextcloud-talk-desktop
signal-desktop
openssl
# multimedia
audacity
handbrake
spotify
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;
}