2023-11-26 20:26:49 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
addNuShebang = path:
|
|
|
|
builtins.concatStringsSep "\n\n" [
|
|
|
|
"#!${pkgs.nushellFull}/bin/nu"
|
|
|
|
(builtins.readFile path)
|
|
|
|
];
|
2023-10-28 20:25:06 +00:00
|
|
|
in {
|
2023-02-13 11:54:21 +00:00
|
|
|
config = {
|
|
|
|
networking = {
|
2023-10-28 20:25:06 +00:00
|
|
|
networkmanager = {
|
|
|
|
wifi.backend = "wpa_supplicant";
|
|
|
|
dispatcherScripts = [
|
|
|
|
{
|
|
|
|
type = "basic";
|
|
|
|
source = pkgs.writeText "dispatcher" (addNuShebang ../../other/scripts/dispatcher.nu);
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
hosts = {
|
|
|
|
"127.0.0.1" = [
|
|
|
|
"www.tiktok.com"
|
|
|
|
"www.twitter.com"
|
|
|
|
"www.instagram.com"
|
|
|
|
"www.facebook.com"
|
|
|
|
"www.snapchat.com"
|
2023-02-13 11:54:21 +00:00
|
|
|
|
2023-10-28 20:25:06 +00:00
|
|
|
"tiktok.com"
|
|
|
|
"twitter.com"
|
|
|
|
"instagram.com"
|
|
|
|
"facebook.com"
|
|
|
|
"snapchat.com"
|
2023-02-13 11:54:21 +00:00
|
|
|
|
2023-10-28 20:25:06 +00:00
|
|
|
"google-analytics.com"
|
|
|
|
"stats.g.doubleclick.net"
|
|
|
|
"googleadservices.com"
|
|
|
|
"googletagmanager.com"
|
|
|
|
"googletagservices.com"
|
|
|
|
"googlesyndication.com"
|
|
|
|
];
|
|
|
|
};
|
2023-02-13 11:54:21 +00:00
|
|
|
};
|
2023-11-26 20:26:49 +00:00
|
|
|
environment.etc = with builtins; (
|
2023-10-28 20:25:06 +00:00
|
|
|
listToAttrs (
|
|
|
|
map (v: {
|
2023-11-26 20:26:49 +00:00
|
|
|
name = "networkhooks/${v}";
|
2023-10-28 20:25:06 +00:00
|
|
|
value = {
|
2023-11-26 20:26:49 +00:00
|
|
|
text = addNuShebang ../../other/scripts/networkhooks/${v};
|
2023-10-28 20:25:06 +00:00
|
|
|
mode = "0755";
|
|
|
|
};
|
2023-11-26 20:26:49 +00:00
|
|
|
})
|
2023-10-28 20:25:06 +00:00
|
|
|
(attrNames (readDir ../../other/scripts/networkhooks))
|
|
|
|
)
|
2023-11-26 20:26:49 +00:00
|
|
|
);
|
2023-02-13 11:54:21 +00:00
|
|
|
systemd.services."NetworkManager-wait-online".enable = false;
|
|
|
|
services.mullvad-vpn.enable = true;
|
2023-11-26 20:26:49 +00:00
|
|
|
home-manager.users.jade = {pkgs, ...}: {
|
2023-02-13 11:54:21 +00:00
|
|
|
home.packages = with pkgs; [
|
2023-11-26 20:26:49 +00:00
|
|
|
networkmanagerapplet
|
2023-02-13 11:54:21 +00:00
|
|
|
mullvad-vpn
|
2023-11-26 20:26:49 +00:00
|
|
|
speedtest-cli
|
2024-04-03 15:55:47 +00:00
|
|
|
macchanger
|
2023-02-13 11:54:21 +00:00
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|