Files
NAHO a2ed7e8d88 nixos: remove optional builtins prefixes from prelude functions
Remove optional builtins prefixes from prelude functions by running:

    builtins=(
      abort
      baseNameOf
      break
      derivation
      derivationStrict
      dirOf
      false
      fetchGit
      fetchMercurial
      fetchTarball
      fetchTree
      fromTOML
      import
      isNull
      map
      null
      placeholder
      removeAttrs
      scopedImport
      throw
      toString
      true
    )

    fd \
      --exclude doc/manual/release-notes \
      --type file \
      . \
      nixos \
      --exec-batch sed --in-place --regexp-extended "
        s/\<builtins\.($(
          printf '%s\n' "${builtins[@]}" |
            paste --delimiter '|' --serial -
        ))\>/\1/g
      "

    nix fmt
2026-01-15 16:07:55 +01:00

46 lines
975 B
Nix

{
lib,
pkgs,
...
}:
let
mainPort = 9445;
webPort = 9446;
in
{
name = "meshtasticd";
meta.maintainers = [ lib.maintainers.drupol ];
nodes.machine = {
services.meshtasticd = {
enable = true;
port = mainPort;
settings = {
Lora = {
Module = "sim";
DIO2_AS_RF_SWITCH = false;
spiSpeed = "2000000";
};
Webserver = {
Port = webPort;
RootPath = pkgs.meshtastic-web;
};
General = {
MaxNodes = 200;
MaxMessageQueue = 100;
MACAddressSource = "eth0";
};
};
};
};
testScript = ''
with subtest("Test meshtasticd service"):
machine.wait_for_unit("meshtasticd.service")
machine.wait_for_open_port(${toString mainPort})
machine.wait_for_open_port(${toString webPort})
machine.succeed("curl -fvvv -Ls http://localhost:${toString webPort} | grep -q 'Meshtastic Web Client'")
'';
}