From 5784dff94fb18883350d82e0b33b8e5fd414d68f Mon Sep 17 00:00:00 2001 From: victor Date: Mon, 26 Sep 2022 13:52:32 +0200 Subject: [PATCH] switch network configuration --- flake.lock | 101 +++++++++++++++++--- flake.nix | 3 + nixos/common/default.nix | 1 + nixos/common/users/default.nix | 7 +- nixos/hosts/thalassa/null/configuration.nix | 23 ++++- nixos/hosts/thalassa/null/home/default.nix | 3 + 6 files changed, 117 insertions(+), 21 deletions(-) diff --git a/flake.lock b/flake.lock index 1359fff..bf5f9c8 100644 --- a/flake.lock +++ b/flake.lock @@ -64,6 +64,29 @@ "type": "github" } }, + "comma": { + "inputs": { + "flake-compat": "flake-compat_2", + "naersk": "naersk", + "nixpkgs": [ + "nixpkgs" + ], + "utils": "utils_2" + }, + "locked": { + "lastModified": 1663284638, + "narHash": "sha256-rXAX14yB8v9BOG4ZsdGEedpZAnNqhQ4DtjQwzFX/TLY=", + "owner": "nix-community", + "repo": "comma", + "rev": "c83ff3839983b3cb8deb407ff618ca12179de588", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "comma", + "type": "github" + } + }, "crane": { "flake": false, "locked": { @@ -82,9 +105,9 @@ }, "deploy-rs": { "inputs": { - "flake-compat": "flake-compat_2", + "flake-compat": "flake-compat_3", "nixpkgs": "nixpkgs_3", - "utils": "utils_5" + "utils": "utils_6" }, "locked": { "lastModified": 1648475189, @@ -207,6 +230,22 @@ } }, "flake-compat_2": { + "flake": false, + "locked": { + "lastModified": 1650374568, + "narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "b4a34015c698c7793d592d66adbab377907a2be8", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_3": { "flake": false, "locked": { "lastModified": 1648199409, @@ -222,7 +261,7 @@ "type": "github" } }, - "flake-compat_3": { + "flake-compat_4": { "flake": false, "locked": { "lastModified": 1627913399, @@ -237,7 +276,7 @@ "type": "indirect" } }, - "flake-compat_4": { + "flake-compat_5": { "flake": false, "locked": { "lastModified": 1627913399, @@ -378,7 +417,7 @@ "nixpkgs": [ "nixpkgs" ], - "utils": "utils_2" + "utils": "utils_3" }, "locked": { "lastModified": 1664146938, @@ -487,7 +526,7 @@ "nixpkgs" ], "nixpkgs-22_05": "nixpkgs-22_05", - "utils": "utils_3" + "utils": "utils_4" }, "locked": { "lastModified": 1658267644, @@ -508,7 +547,7 @@ "nixpkgs": [ "nixpkgs" ], - "utils": "utils_4" + "utils": "utils_5" }, "locked": { "lastModified": 1664157405, @@ -525,6 +564,28 @@ } }, "naersk": { + "inputs": { + "nixpkgs": [ + "comma", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1662220400, + "narHash": "sha256-9o2OGQqu4xyLZP9K6kNe1pTHnyPz0Wr3raGYnr9AIgY=", + "owner": "nix-community", + "repo": "naersk", + "rev": "6944160c19cb591eb85bbf9b2f2768a935623ed3", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "master", + "repo": "naersk", + "type": "github" + } + }, + "naersk_2": { "inputs": { "nixpkgs": [ "riff", @@ -759,7 +820,7 @@ "riff": { "inputs": { "fenix": "fenix", - "naersk": "naersk", + "naersk": "naersk_2", "nixpkgs": [ "nixpkgs" ] @@ -781,6 +842,7 @@ "root": { "inputs": { "colmena": "colmena", + "comma": "comma", "home-manager": "home-manager", "hyprland": "hyprland", "hyprpaper": "hyprpaper", @@ -830,7 +892,7 @@ "serokell-nix": { "inputs": { "deploy-rs": "deploy-rs", - "flake-compat": "flake-compat_3", + "flake-compat": "flake-compat_4", "flake-utils": "flake-utils_3", "gitignore-nix": "gitignore-nix", "nix": "nix", @@ -899,6 +961,21 @@ } }, "utils_3": { + "locked": { + "lastModified": 1659877975, + "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "utils_4": { "locked": { "lastModified": 1605370193, "narHash": "sha256-YyMTf3URDL/otKdKgtoMChu4vfVL3vCMkRqpGifhUn0=", @@ -913,7 +990,7 @@ "type": "github" } }, - "utils_4": { + "utils_5": { "inputs": { "flake-utils": "flake-utils_2" }, @@ -931,7 +1008,7 @@ "type": "github" } }, - "utils_5": { + "utils_6": { "locked": { "lastModified": 1648297722, "narHash": "sha256-W+qlPsiZd8F3XkzXOzAoR+mpFqzm3ekQkJNa+PIh1BQ=", @@ -948,7 +1025,7 @@ }, "vault-secrets": { "inputs": { - "flake-compat": "flake-compat_4", + "flake-compat": "flake-compat_5", "flake-utils": "flake-utils_4", "nix": "nix_2", "nixpkgs": [ diff --git a/flake.nix b/flake.nix index ce1b0e3..9b2e501 100644 --- a/flake.nix +++ b/flake.nix @@ -32,6 +32,9 @@ webcord.url = "github:fufexan/webcord-flake"; + comma.url = "github:nix-community/comma"; + comma.inputs.nixpkgs.follows = "nixpkgs"; + mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver"; mailserver.inputs.nixpkgs.follows = "nixpkgs"; }; diff --git a/nixos/common/default.nix b/nixos/common/default.nix index a0fa94f..4f2d53a 100644 --- a/nixos/common/default.nix +++ b/nixos/common/default.nix @@ -16,6 +16,7 @@ # Nix Settings nix = { + nixPath = [ "nixpkgs=${nixpkgs}" ]; package = pkgs.nixUnstable; registry.nixpkgs.flake = inputs.nixpkgs; settings = { diff --git a/nixos/common/users/default.nix b/nixos/common/users/default.nix index a79906b..8bb57e7 100644 --- a/nixos/common/users/default.nix +++ b/nixos/common/users/default.nix @@ -1,9 +1,4 @@ -# common/users/default.nix - -# Inputs to this NixOS module, in this case we are -# using `pkgs` so we can have some user specific packages and config -# to configure the root ssh key. -{ config, pkgs, lib, ... }: +{ config, pkgs, lib, inputs, ... }: { # Setup ZSH to use grml config diff --git a/nixos/hosts/thalassa/null/configuration.nix b/nixos/hosts/thalassa/null/configuration.nix index cf33328..62127ec 100644 --- a/nixos/hosts/thalassa/null/configuration.nix +++ b/nixos/hosts/thalassa/null/configuration.nix @@ -83,10 +83,27 @@ in services.gnome.gnome-keyring.enable = true; # Enable networking - networking.networkmanager = { + networking.networkmanager.enable = false; + networking.wireless = { enable = true; - # wifi.backend = "iwd"; - firewallBackend = "nftables"; + environmentFile = "/var/lib/secrets/wireless.env"; + userControlled.enable = true; + networks = { + eduroam = { + auth = '' + proto=RSN + key_mgmt=WPA-EAP + eap=PEAP + identity="vroest@tudelft.nl" + password=hash:@EDUROAM_PASSWORD_HASH@ + domain_suffix_match="radius.tudelft.nl" + anonymous_identity="anonymous@tudelft.nl" + phase1="peaplabel=0" + phase2="auth=MSCHAPV2" + ca_cert="/etc/ssl/certs/ca-bundle.crt" + ''; + }; + }; }; fileSystems."/".options = [ "compress=zstd" ]; diff --git a/nixos/hosts/thalassa/null/home/default.nix b/nixos/hosts/thalassa/null/home/default.nix index c7c9953..4e370db 100644 --- a/nixos/hosts/thalassa/null/home/default.nix +++ b/nixos/hosts/thalassa/null/home/default.nix @@ -26,6 +26,7 @@ gnome.gnome-font-viewer gnome.nautilus grim # Screenshot tool + inputs.comma.packages.${pkgs.system}.default inputs.riff.packages.${pkgs.system}.riff inputs.webcord.packages.${pkgs.system}.default k9s @@ -57,6 +58,8 @@ programs.foot = { enable = true; }; + + programs.nix-index.enable = true; programs.exa = { enable = true;