formatting, big time

This commit is contained in:
Schrottkatze 2025-04-11 09:20:46 +02:00
parent 38d96c9f52
commit 509320c115
Signed by: schrottkatze
SSH key fingerprint: SHA256:FPOYVeBy3QP20FEM42uWF1Wa/Qhlk+L3S2+Wuau/Auo
64 changed files with 1293 additions and 990 deletions

View file

@ -1,4 +1,5 @@
{...}: {
{ ... }:
{
imports = [
./firewall.nix
./hosts.nix
@ -10,11 +11,13 @@
systemd.services."NetworkManager-wait-online".enable = false;
services.mullvad-vpn.enable = true;
home-manager.users.jade = {pkgs, ...}: {
home.packages = with pkgs; [
networkmanagerapplet
mullvad-vpn
macchanger
];
};
home-manager.users.jade =
{ pkgs, ... }:
{
home.packages = with pkgs; [
networkmanagerapplet
mullvad-vpn
macchanger
];
};
}

View file

@ -1,10 +1,13 @@
{pkgs, ...}: let
addNuShebang = path:
{ pkgs, ... }:
let
addNuShebang =
path:
builtins.concatStringsSep "\n\n" [
"#!${pkgs.nushell}/bin/nu"
(builtins.readFile path)
];
in {
in
{
networking.networkmanager.dispatcherScripts = [
{
type = "basic";
@ -12,16 +15,15 @@ in {
}
];
environment.etc = with builtins; (
listToAttrs (
environment.etc =
with builtins;
(listToAttrs (
map (v: {
name = "networkhooks/${v}";
value = {
text = addNuShebang ./hooks/${v};
mode = "0755";
};
})
(attrNames (readDir ./hooks))
)
);
}) (attrNames (readDir ./hooks))
));
}

View file

@ -1,13 +1,19 @@
# Thanks @ kloenk (@kloenk@catcatnya.com) for making this for me at MRMCD 2024 :33
{pkgs-stable, ...}: let
{ pkgs-stable, ... }:
let
caDir = "/var/lib/easyroam";
uuid = "821ad781-76a3-447f-a2e8-c7f18a1df3bc";
in {
in
{
systemd.services.easyroam = {
requires = ["NetworkManager.service"];
after = ["NetworkManager.service"];
requiredBy = ["network-online.target"];
path = with pkgs-stable; [networkmanager openssl gnused];
requires = [ "NetworkManager.service" ];
after = [ "NetworkManager.service" ];
requiredBy = [ "network-online.target" ];
path = with pkgs-stable; [
networkmanager
openssl
gnused
];
script = ''
set -x
openssl pkcs12 -password pass: -in ${caDir}/my_easyroam_cert.p12 -legacy -nokeys | openssl x509 > ${caDir}/easyroam_client_cert.pem
@ -44,7 +50,7 @@ in {
addr-gen-mode = "default";
method = "auto";
};
proxy = {};
proxy = { };
wifi = {
mode = "infrastructure";
ssid = "eduroam";

View file

@ -3,7 +3,8 @@
lib,
pkgs,
...
}: {
}:
{
config = {
networking = {
firewall = {

View file

@ -1,4 +1,5 @@
{...}: {
{ ... }:
{
networking.hosts = {
"127.0.0.1" = [
"www.tiktok.com"