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 7351379..18fbffe 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,45 @@ # 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 = { + 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 + anonimous-identity = inputs.secrets.eduroam.username; + identity = inputs.secrets.eduroam.username; + password = inputs.secrets.eduroam.password; + phase2-auth = "mschapv2"; + ca-cert = "/etc/ssl/certs/eduroam/cert.pem"; + ca-path = "/etc/ssl/certs/eduroam/"; + }; + ipv4 = { + method = "auto"; + }; + ipv6 = { + method = "auto"; + }; + }; + }; + }; # Set your time zone. time.timeZone = "Europe/Rome"; 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 = "..."; + }; +}