From 013ea36d254e0676318fa0ca7ffdf97876565d5b Mon Sep 17 00:00:00 2001 From: Dario48 Date: Tue, 14 Apr 2026 14:20:31 +0200 Subject: [PATCH 1/6] add fake secrets file --- secrets/flake.nix | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 secrets/flake.nix diff --git a/secrets/flake.nix b/secrets/flake.nix new file mode 100644 index 0000000..1938640 --- /dev/null +++ b/secrets/flake.nix @@ -0,0 +1,7 @@ +{ + outputs = + { ... }: + { + private-key-password = "..."; + }; +} From d1ed5e96fb83d17b4b1e6823cda2384dc58b9661 Mon Sep 17 00:00:00 2001 From: Dario48 Date: Tue, 14 Apr 2026 14:23:58 +0200 Subject: [PATCH 2/6] get secrets from secrets --- flake.nix | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 7351379..30532e5 100644 --- a/flake.nix +++ b/flake.nix @@ -28,6 +28,7 @@ }; assets.url = "git+https://dario48.site/git/Dario48/NixOs.git?ref=assets"; + secrets.url = "./secrets"; }; outputs = { @@ -189,7 +190,39 @@ # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; # Enable networking - networking.networkmanager.enable = true; + networking.networkmanager = { + enable = true; + ensureProfiles.profiles = { + eduroam = { + connection = { + id = "eduroam"; + type = "wifi"; + interface-name = "wlo1"; # # replace with your interface-name as displayed by "ip a" + }; + wifi = { + mode = "infrastructure"; + ssid = "eduroam"; + }; + wifi-security = { + key-mgmt = "wpa-eap"; + }; + "802-1x" = { + # # not all or even some additional values may be needed here according to your institution + eap = "PEAP"; # # adapt according to your universities setup + identity = "dario.spinnato@studenti.unimi.it"; + client-cert = "/etc/ssl/certs/eduroam/cert.pem"; + private-key-password = inputs.secrets.private-key-password; + ca-cert = "/etc/ssl/certs/certs.pem"; + }; + ipv4 = { + method = "auto"; + }; + ipv6 = { + method = "auto"; + }; + }; + }; + }; # Set your time zone. time.timeZone = "Europe/Rome"; From e99b236818014981b6238d483d159a5c1a70d931 Mon Sep 17 00:00:00 2001 From: Dario48 Date: Tue, 14 Apr 2026 14:52:57 +0200 Subject: [PATCH 3/6] add eduroam stuff --- flake.lock | 12 ++++++++++++ flake.nix | 12 +++++++++--- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 1934bff..0861055 100644 --- a/flake.lock +++ b/flake.lock @@ -166,9 +166,21 @@ "neovim-dotfiles": "neovim-dotfiles", "nixpkgs": "nixpkgs", "plasma-manager": "plasma-manager", + "secrets": "secrets", "zen-browser": "zen-browser" } }, + "secrets": { + "locked": { + "path": "./secrets", + "type": "path" + }, + "original": { + "path": "./secrets", + "type": "path" + }, + "parent": [] + }, "systems": { "locked": { "lastModified": 1681028828, diff --git a/flake.nix b/flake.nix index 30532e5..2e2c372 100644 --- a/flake.nix +++ b/flake.nix @@ -204,15 +204,21 @@ ssid = "eduroam"; }; wifi-security = { + group = "ccmp"; + pairwise = "ccmp"; + proto = "rsn"; key-mgmt = "wpa-eap"; }; "802-1x" = { + altsubject_match = "DNS:eduroam.unimi.it"; # # not all or even some additional values may be needed here according to your institution eap = "PEAP"; # # adapt according to your universities setup - identity = "dario.spinnato@studenti.unimi.it"; - client-cert = "/etc/ssl/certs/eduroam/cert.pem"; - private-key-password = inputs.secrets.private-key-password; + anonimous-identity = inputs.secrets.eduroam.username; + identity = inputs.secrets.eduroam.username; + password = inputs.secrets.eduroam.password; + phase2-auth = "mschapv2"; ca-cert = "/etc/ssl/certs/certs.pem"; + ca-path = "/etc/ssl/certs/certs.pem"; }; ipv4 = { method = "auto"; From bc44187c2396c80b44cca8756dbbe75d5a2d0589 Mon Sep 17 00:00:00 2001 From: Dario48 Date: Tue, 14 Apr 2026 14:54:23 +0200 Subject: [PATCH 4/6] fix eduroam no. 1 --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 2e2c372..666ba14 100644 --- a/flake.nix +++ b/flake.nix @@ -212,7 +212,7 @@ "802-1x" = { altsubject_match = "DNS:eduroam.unimi.it"; # # not all or even some additional values may be needed here according to your institution - eap = "PEAP"; # # adapt according to your universities setup + eap = "peap"; # # adapt according to your universities setup anonimous-identity = inputs.secrets.eduroam.username; identity = inputs.secrets.eduroam.username; password = inputs.secrets.eduroam.password; From b33173ebf47303d9ad636c1e70622c2077fd7a34 Mon Sep 17 00:00:00 2001 From: Dario48 Date: Tue, 14 Apr 2026 14:55:37 +0200 Subject: [PATCH 5/6] fix eduroam no.2 --- flake.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 666ba14..ddb7048 100644 --- a/flake.nix +++ b/flake.nix @@ -217,8 +217,8 @@ identity = inputs.secrets.eduroam.username; password = inputs.secrets.eduroam.password; phase2-auth = "mschapv2"; - ca-cert = "/etc/ssl/certs/certs.pem"; - ca-path = "/etc/ssl/certs/certs.pem"; + ca-cert = "/etc/ssl/certs/eduroam/certs.pem"; + ca-path = "/etc/ssl/certs/eduroam/"; }; ipv4 = { method = "auto"; From f3787cdc755ba024b4dcecdced0f16508ef801d0 Mon Sep 17 00:00:00 2001 From: Dario48 Date: Tue, 14 Apr 2026 14:57:17 +0200 Subject: [PATCH 6/6] fix eduroam no.3 --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index ddb7048..18fbffe 100644 --- a/flake.nix +++ b/flake.nix @@ -217,7 +217,7 @@ identity = inputs.secrets.eduroam.username; password = inputs.secrets.eduroam.password; phase2-auth = "mschapv2"; - ca-cert = "/etc/ssl/certs/eduroam/certs.pem"; + ca-cert = "/etc/ssl/certs/eduroam/cert.pem"; ca-path = "/etc/ssl/certs/eduroam/"; }; ipv4 = {