mirror of
https://forge.katzen.cafe/schrottkatze/nix-configs.git
synced 2024-11-29 07:58:45 +01:00
81 lines
1.9 KiB
Nix
81 lines
1.9 KiB
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}: let
|
|
addNuShebang = path:
|
|
builtins.concatStringsSep "\n\n" [
|
|
"#!${pkgs.nushellFull}/bin/nu"
|
|
(builtins.readFile path)
|
|
];
|
|
in {
|
|
config = {
|
|
networking = {
|
|
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"
|
|
|
|
"tiktok.com"
|
|
"twitter.com"
|
|
"instagram.com"
|
|
"facebook.com"
|
|
"snapchat.com"
|
|
|
|
"google-analytics.com"
|
|
"stats.g.doubleclick.net"
|
|
"googleadservices.com"
|
|
"googletagmanager.com"
|
|
"googletagservices.com"
|
|
"googlesyndication.com"
|
|
];
|
|
"91.107.221.11" = [
|
|
"katzen.cafe"
|
|
"matrix.katzen.cafe"
|
|
"design.katzen.cafe"
|
|
"ck.katzen.cafe"
|
|
"forge.katzen.cafe"
|
|
"pad.katzen.cafe"
|
|
"mail.katzen.cafe"
|
|
"wolke.katzen.cafe"
|
|
"auth.katzen.cafe"
|
|
];
|
|
};
|
|
};
|
|
environment.etc = with builtins; (
|
|
listToAttrs (
|
|
map (v: {
|
|
name = "networkhooks/${v}";
|
|
value = {
|
|
text = addNuShebang ../../other/scripts/networkhooks/${v};
|
|
mode = "0755";
|
|
};
|
|
})
|
|
(attrNames (readDir ../../other/scripts/networkhooks))
|
|
)
|
|
);
|
|
systemd.services."NetworkManager-wait-online".enable = false;
|
|
services.mullvad-vpn.enable = true;
|
|
home-manager.users.jade = {pkgs, ...}: {
|
|
home.packages = with pkgs; [
|
|
networkmanagerapplet
|
|
mullvad-vpn
|
|
speedtest-cli
|
|
];
|
|
};
|
|
};
|
|
}
|