revert Merge pull request 'Remove clanModules/*' (#4202) from remove-modules into main Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4202 See: https://git.clan.lol/clan/clan-core/issues/4365 Not all modules are migrated. If they are not migrated, we need to write migration docs and please display the link to the migration docs
23 lines
542 B
Nix
23 lines
542 B
Nix
{
|
|
lib,
|
|
writers,
|
|
writeShellScriptBin,
|
|
localsend,
|
|
alias ? null,
|
|
}:
|
|
let
|
|
localsend-ensure-config = writers.writePython3 "localsend-ensure-config" {
|
|
flakeIgnore = [
|
|
# We don't live in the dark ages anymore.
|
|
# Languages like Python that are whitespace heavy will overrun
|
|
# 79 characters..
|
|
"E501"
|
|
];
|
|
} (builtins.readFile ./localsend-ensure-config.py);
|
|
in
|
|
writeShellScriptBin "localsend" ''
|
|
set -xeu
|
|
${localsend-ensure-config} ${lib.optionalString (alias != null) alias}
|
|
${lib.getExe localsend}
|
|
''
|