laptop stuff

This commit is contained in:
Vivian 2022-09-26 17:17:27 +02:00
parent 57ad1d09f7
commit b0461e98a7
10 changed files with 62 additions and 65 deletions

View file

@ -36,6 +36,7 @@ in
[
# Include the results of the hardware scan.
./hardware-configuration.nix
./networking.nix
];
# home-manager
@ -79,33 +80,8 @@ in
boot.loader.efi.efiSysMountPoint = "/boot/efi";
boot.kernelPackages = pkgs.linuxPackages_latest;
# networking.wireless.iwd.enable = false;
services.gnome.gnome-keyring.enable = true;
# Enable networking
networking.networkmanager.enable = false;
networking.wireless = {
enable = true;
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" ];
# Filesystem dedup
services.beesd.filesystems = {
@ -231,21 +207,6 @@ in
services.fstrim.enable = true;
# Allow reverse path for wireguard
networking.firewall = {
# if packets are still dropped, they will show up in dmesg
logReversePathDrops = true;
# wireguard trips rpfilter up
extraCommands = ''
ip46tables -t raw -I nixos-fw-rpfilter -p udp -m udp --sport 51820 -j RETURN
ip46tables -t raw -I nixos-fw-rpfilter -p udp -m udp --dport 51820 -j RETURN
'';
extraStopCommands = ''
ip46tables -t raw -D nixos-fw-rpfilter -p udp -m udp --sport 51820 -j RETURN || true
ip46tables -t raw -D nixos-fw-rpfilter -p udp -m udp --dport 51820 -j RETURN || true
'';
};
nix.extraOptions = ''
keep-outputs = true
keep-derivations = true