.files/nix/configurations/vanadium/nixos/connectivity.nix

82 lines
2.1 KiB
Nix

{
config,
pkgs,
lib,
...
}:
{
# For nautilius and iOS
services.gvfs.enable = true;
# iOS
services.usbmuxd.enable = true;
environment.systemPackages = with pkgs; [
libimobiledevice
idevicerestore
];
# https://unix.stackexchange.com/questions/592775/how-can-i-enable-apple-ios-fast-charge-support
services.udev.extraRules = ''
SUBSYSTEM=="usb", ACTION=="add", DRIVER=="apple-mfi-fastcharge", RUN+="/bin/sh -c 'echo Fast > /sys/class/power_supply/apple_mfi_fastcharge/charge_type'"
'';
users.users.root.openssh.authorizedKeys.keys = import ../../../identities.nix;
networking = {
networkmanager.enable = lib.mkForce false;
firewall.allowedTCPPorts = [
8080
# For 'localsend'
# https://github.com/localsend/localsend?tab=readme-ov-file#setup
53317
];
# To enable roaming https://wiki.archlinux.org/title/Wpa_supplicant#Roaming
wireless = {
enable = true;
userControlled.enable = true;
secretsFile = config.age.secrets.wpa_password.path;
scanOnLowSignal = false;
networks =
let
fromList = import ../../../networks/wpa_supplicant-compat.nix;
networks = import ../../../networks/list.nix;
in
fromList networks;
};
};
networking = {
hostFiles = [
# Prevent building up reliance on chatbots
# Gotta preserve that thinking ability of my smoof bwain
"${pkgs.ai_blocklist}/share/hosts.txt"
"${pkgs.hategroup_blocklist}/share/hosts.txt"
];
extraHosts = ''
#
# Generated from nixos configuartion
#
# This is the fascist one, just block it because I can't tell
0.0.0.0 nixos.wiki
# Gotta purify my smoos brain for a while
0.0.0.0 instagram.com
0.0.0.0 www.instagram.com
0.0.0.0 linkedin.com
0.0.0.0 www.linkedin.com
'';
};
# LAN CONNECTION
# ~~~~~~~~~~~~~~
# Note that when you're corrected to mullvad, you can't ssh into your local machines.
# I wonder if there's an option to turn this off.
services.mullvad-vpn.enable = true;
hardware.bluetooth.enable = true;
}