2024-10-07 14:31:33 +00:00
|
|
|
{ lib
|
|
|
|
, fish
|
|
|
|
, writeScript
|
|
|
|
, writeTextDir
|
|
|
|
, prependRc ? ""
|
|
|
|
, appendRc ? ""
|
|
|
|
, ...
|
|
|
|
}:
|
2024-10-07 12:30:47 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
source-pwd = writeScript "source-pwd" ''
|
|
|
|
#!/usr/bin/env ${lib.getExe fish}
|
|
|
|
|
|
|
|
${builtins.readFile ./source-pwd.fish}
|
|
|
|
'';
|
|
|
|
in
|
|
|
|
writeTextDir "share/kak/kakrc.local" ''
|
2024-10-07 14:31:33 +00:00
|
|
|
${prependRc}
|
2024-10-07 12:30:47 +00:00
|
|
|
${builtins.readFile ./kakrc}
|
2024-10-07 14:31:33 +00:00
|
|
|
${appendRc}
|
2024-10-07 12:30:47 +00:00
|
|
|
|
|
|
|
# Source any settings in the current working directory,
|
|
|
|
# recursive upwards
|
|
|
|
evaluate-commands %sh{
|
|
|
|
${source-pwd}
|
|
|
|
}
|
|
|
|
''
|