63 lines
1.4 KiB
Nix
63 lines
1.4 KiB
Nix
{
|
|
inputs,
|
|
config,
|
|
lib,
|
|
...
|
|
}:
|
|
{
|
|
nixpkgs.hostPlatform = {
|
|
system = "x86_64-linux";
|
|
};
|
|
system.stateVersion = "25.11";
|
|
clan.core.sops.defaultGroups = [ "admins" ];
|
|
clan.core.networking.targetHost = "root@[${config.clan.core.vars.generators.zerotier.files.zerotier-ip.value}]";
|
|
|
|
networking.interfaces.enx00e04c106368.useDHCP = true; # recovery
|
|
|
|
clan.core.vars.generators.wireless-credentials = {
|
|
files = {
|
|
essid.secret = false;
|
|
psk.secret = true;
|
|
};
|
|
prompts = {
|
|
essid.persist = true;
|
|
psk.persist = true;
|
|
};
|
|
script = ''
|
|
cat "$prompts"/essid > $out/essid
|
|
prompt_psk=$(cat "$prompts"/psk)
|
|
echo "psk=$prompt_psk" > $out/psk
|
|
'';
|
|
};
|
|
|
|
networking.wireless =
|
|
let
|
|
credentials = config.clan.core.vars.generators.wireless-credentials.files;
|
|
in
|
|
{
|
|
enable = true;
|
|
secretsFile = credentials.psk.path;
|
|
networks.${credentials.essid.value}.pskRaw = "ext:psk";
|
|
};
|
|
|
|
networking.interfaces.wlp1s0 = {
|
|
useDHCP = false;
|
|
ipv4.addresses = [
|
|
{
|
|
address = "10.0.0.9";
|
|
prefixLength = 24;
|
|
}
|
|
];
|
|
};
|
|
|
|
services.yggdrasil.settings.Peers = lib.mkForce [
|
|
"tcp://newt.barry.town:1337"
|
|
"tls://yg-hkg.magicum.net:32333"
|
|
"tls://astrra.space:55535"
|
|
];
|
|
|
|
clan.meta.name = "neptune";
|
|
clan.meta.description = "Radxa SBC board for testing. (With vi)";
|
|
|
|
}
|