mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 06:39:14 +00:00
94 lines
2.9 KiB
Nix
94 lines
2.9 KiB
Nix
{
|
||
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";
|
||
"Pei’s 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";
|
||
"CAT.jpgcafe".pskRaw = "ext:CAT.jpgcafe";
|
||
|
||
# TODO: Figure out how to configure networks of "same password, different ssid".
|
||
#
|
||
# In the following documentation, bssid can be used to match
|
||
# Besides, is it possible to have duplicated SSID?
|
||
# https://man.freebsd.org/cgi/man.cgi?wpa_supplicant.conf%285%29
|
||
"LOUISA".pskRaw = "ext:LOUISA"; # 七張
|
||
|
||
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;
|
||
}
|