.files/nix/configurations/vanadium/nixos/connectivity.nix

85 lines
2.4 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
config,
pkgs,
lib,
...
}: {
# For nautilius and iOS
services.gvfs.enable = true;
# iOS
services.usbmuxd.enable = true;
environment.systemPackages = with pkgs; [libimobiledevice idevicerestore];
users.users.root.openssh.authorizedKeys.keys = let
ids = import ../../../identities.nix;
in
builtins.concatMap builtins.attrValues (builtins.attrValues ids);
networking = {
networkmanager.enable = lib.mkForce false;
firewall.allowedTCPPorts = [
8080
# For 'localsend'
# https://github.com/localsend/localsend?tab=readme-ov-file#setup
53317
];
wireless = {
enable = true;
userControlled.enable = true;
secretsFile = config.age.secrets.wpa_password.path;
networks = let
orderedByGroups = networkGroups: let
groupsCount = builtins.length networkGroups;
withPriority =
lib.lists.imap0
(i: lib.mapAttrs (_: n: n // {priority = groupsCount - i;}))
networkGroups;
in
lib.mkMerge withPriority;
in
orderedByGroups [
{
"HiddenParadize@Earth2077".pskRaw = "ext:HOME";
"Peis Wifi".pskRaw = "ext:PEI";
"girlypop-net".pskRaw = "ext:GIRLYPOP";
"annapurna".pskRaw = "ext:ANNAPURNA";
"5526-1".pskRaw = "ext:5526-1";
}
{
"A-WAY".pskRaw = "ext:A-WAY";
eduroam = {
authProtocols = ["WPA-EAP"];
auth = ''
pairwise=CCMP
group=CCMP TKIP
eap=PEAP
ca_cert="${./certs/universite_de_rennes.pem}"
identity="ychiang@etudiant.univ-rennes.fr"
altsubject_match="DNS:radius.univ-rennes1.fr;DNS:radius1.univ-rennes1.fr;DNS:radius2.univ-rennes1.fr;DNS:vmradius-psf1.univ-rennes1.fr;DNS:vmradius-psf2.univ-rennes1.fr"
phase2="auth=MSCHAPV2"
password=ext:EDUROAM
anonymous_identity="anonymous@univ-rennes.fr"
'';
};
}
{
"_SNCF_WIFI_INOUI" = {};
"_WIFI_LYRIA" = {};
"EurostarTrainsWiFi" = {};
"SBB-FREE" = {};
"AOT Airport Free Wi-Fi by NT" = {};
}
{
"iPhone de Léana ".pskRaw = "ext:PHONE";
}
];
};
};
services.mullvad-vpn.enable = true;
hardware.bluetooth.enable = true;
}