mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
nix: refactor modules pass 2
This commit is contained in:
parent
ec7246e524
commit
1716faf2cd
19 changed files with 11 additions and 11 deletions
71
nix/configurations/vanadium/nixos/connectivity.nix
Normal file
71
nix/configurations/vanadium/nixos/connectivity.nix
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
# helps calibre detect kindle
|
||||
services.gvfs.enable = true;
|
||||
|
||||
# iOS
|
||||
services.usbmuxd.enable = true;
|
||||
environment.systemPackages = [pkgs.libimobiledevice];
|
||||
|
||||
# Wireless Regulatory Domain
|
||||
# https://community.frame.work/t/framework-nixos-linux-users-self-help/31426/77
|
||||
hardware.wirelessRegulatoryDatabase = true;
|
||||
boot.extraModprobeConfig = ''
|
||||
options cfg80211 ieee80211_regdom="FR"
|
||||
'';
|
||||
|
||||
networking = {
|
||||
networkmanager.enable = lib.mkForce false;
|
||||
|
||||
firewall.allowedTCPPorts = [8080];
|
||||
|
||||
wireless = {
|
||||
enable = true;
|
||||
userControlled.enable = true;
|
||||
secretsFile = config.age.secrets.wpa_password.path;
|
||||
networks = let
|
||||
ordered = nss:
|
||||
lib.pipe nss [
|
||||
lib.lists.reverseList
|
||||
(lib.lists.imap0 (i: lib.mapAttrs (_: n: n // {priority = i;})))
|
||||
lib.mergeAttrsList
|
||||
];
|
||||
in
|
||||
ordered [
|
||||
# first in list is tried first
|
||||
{
|
||||
"HiddenParadize@Earth2077".pskRaw = "ext:HOME";
|
||||
"Pei’s Wifi".pskRaw = "ext:PEI";
|
||||
}
|
||||
{
|
||||
"_SNCF_WIFI_INOUI" = {};
|
||||
"EurostarTrainsWiFi" = {};
|
||||
}
|
||||
{
|
||||
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"
|
||||
'';
|
||||
};
|
||||
}
|
||||
{"iPhone de Léana 江".pskRaw = "ext:PHONE";}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
hardware.bluetooth.enable = true;
|
||||
services.blueman.enable = true;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue