lib: move lib extensions into its own module argument

This commit is contained in:
2022-11-19 16:14:18 +01:00
parent 9bc5d2e85d
commit b3aa6cad81
13 changed files with 70 additions and 83 deletions

View File

@@ -1,6 +1,5 @@
{ pkgs, inputs, machineVars, colors, ... } @ args: let
inherit (pkgs) lib;
inherit (pkgs.lib) mkForce mkIf optionals;
{ pkgs, lib, extendedLib, inputs, machineVars, colors, ... } @ args: let
inherit (lib) mkForce mkIf optionals;
graphics = !machineVars.headless;
in {
inherit machineVars;
@@ -54,7 +53,7 @@ in {
homeDirectory = "/home/h7x4";
file = {
".ghci".text = ''
:set prompt "${lib.termColors.front.magenta "[GHCi]λ"} ".
:set prompt "${extendedLib.termColors.front.magenta "[GHCi]λ"} ".
'';
".pyrc".text = ''
@@ -63,7 +62,7 @@ in {
# You also need \x01 and \x02 to separate escape sequence, due to:
# https://stackoverflow.com/a/9468954/1147688
sys.ps1='\x01\x1b${lib.termColors.front.blue "[Python]> "}\x02>>>\x01\x1b[0m\x02 ' # bright yellow
sys.ps1='\x01\x1b${extendedLib.termColors.front.blue "[Python]> "}\x02>>>\x01\x1b[0m\x02 ' # bright yellow
sys.ps2='\x01\x1b[1;49;31m\x02...\x01\x1b[0m\x02 ' # bright red
'';
};