Regenerated
This commit is contained in:
+350
-350
File diff suppressed because it is too large
Load Diff
@@ -1,47 +0,0 @@
|
|||||||
# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. ---
|
|
||||||
{ lib, pkgs, flakeRoot,... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
aliasFile = "${flakeRoot}/generated/assets/aliases.conf";
|
|
||||||
|
|
||||||
content = builtins.readFile aliasFile;
|
|
||||||
|
|
||||||
lines =
|
|
||||||
lib.filter (l: l != "")
|
|
||||||
(map (l:
|
|
||||||
let
|
|
||||||
noComment = builtins.head (lib.splitString "#" l);
|
|
||||||
in lib.trim noComment
|
|
||||||
) (lib.splitString "\n" content));
|
|
||||||
|
|
||||||
parseLine = line:
|
|
||||||
let
|
|
||||||
parts = lib.splitString "=" line;
|
|
||||||
in
|
|
||||||
if lib.length parts < 2 then null else {
|
|
||||||
name = lib.head parts;
|
|
||||||
value = lib.concatStringsSep "=" (lib.tail parts);
|
|
||||||
};
|
|
||||||
|
|
||||||
parsed =
|
|
||||||
lib.filter (x: x != null)
|
|
||||||
(map parseLine lines);
|
|
||||||
|
|
||||||
functions =
|
|
||||||
lib.concatStringsSep "\n"
|
|
||||||
(map (x: ''
|
|
||||||
${x.name}() {
|
|
||||||
${x.value} "$@"
|
|
||||||
}
|
|
||||||
'') parsed);
|
|
||||||
|
|
||||||
in
|
|
||||||
{
|
|
||||||
environment.etc."profile.d/99-alias-functions.sh".text = ''
|
|
||||||
# system-wide functions generated from aliases.conf
|
|
||||||
${functions}
|
|
||||||
'';
|
|
||||||
environment.shellInit = ''
|
|
||||||
source /etc/profile
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user