Regenerated
This commit is contained in:
+51
-5
@@ -816,6 +816,57 @@ in
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
** =generated/modules/system/apps/packages.nix=
|
||||
This installs a list of apps
|
||||
#+BEGIN_SRC nix :tangle generated/modules/system/apps/packages.nix :noweb tangle :mkdirp yes :eval never-html
|
||||
|
||||
{ config, lib, pkgs, flakeRoot, ... }:
|
||||
|
||||
let
|
||||
packagesConfPath = "${flakeRoot}/assets/system/apps/packages.conf";
|
||||
raw = builtins.readFile packagesConfPath;
|
||||
|
||||
# Split lines safely, keep guard against splitting into characters
|
||||
rawLines = lib.splitString "\n" raw;
|
||||
_guard =
|
||||
assert !(builtins.stringLength raw > 1 && builtins.length rawLines == builtins.stringLength raw);
|
||||
true;
|
||||
|
||||
# Clean each line: remove CRs, remove comments, trim
|
||||
cleanLine = line:
|
||||
let
|
||||
noCR = lib.replaceStrings [ "\r" ] [ "" ] line;
|
||||
noInlineComment = lib.head (lib.splitString "#" noCR);
|
||||
in
|
||||
lib.strings.trim noInlineComment;
|
||||
|
||||
# Filter out empty lines
|
||||
entries = builtins.filter (l: l != "") (map cleanLine rawLines);
|
||||
|
||||
# Resolve attribute path in pkgs
|
||||
resolvePkg = name:
|
||||
let
|
||||
parts = lib.splitString "." name;
|
||||
found = lib.attrByPath parts null pkgs;
|
||||
in
|
||||
if found == null then
|
||||
throw ''
|
||||
packages.nix: package not found in pkgs
|
||||
Token : ${builtins.toJSON name}
|
||||
packages.conf : ${packagesConfPath}
|
||||
Hint : check the attribute name on search.nixos.org/packages
|
||||
''
|
||||
else
|
||||
found;
|
||||
|
||||
# Final system-wide package list
|
||||
packages = builtins.seq _guard (map resolvePkg entries);
|
||||
|
||||
in
|
||||
{
|
||||
environment.systemPackages = packages;
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
** =generated/parked/apps/zenbrowser.nix=
|
||||
This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder
|
||||
@@ -824,8 +875,6 @@ This is top file of this level which contains just an import statement for all r
|
||||
{ lib, config, pkgs, ... }:
|
||||
|
||||
let
|
||||
# --- Program definition ---
|
||||
programName = "zenbrowser";
|
||||
|
||||
# Assets (optional, empty if no config)
|
||||
assetPath =
|
||||
@@ -840,9 +889,6 @@ let
|
||||
src = "${assetPath}/${name}";
|
||||
});
|
||||
|
||||
# Top-level toggle for this module
|
||||
enableProgram = config.enableZenBrowser or false;
|
||||
|
||||
# Default user fallback
|
||||
username = config.defaultUser or "henrov";
|
||||
in
|
||||
|
||||
Reference in New Issue
Block a user