laptop stuff
This commit is contained in:
parent
57ad1d09f7
commit
b0461e98a7
|
@ -53,14 +53,6 @@ in
|
|||
type = lib.types.submodule {
|
||||
freeformType = settingsFormat.type;
|
||||
};
|
||||
# example = ''
|
||||
# global:
|
||||
# scrape_interval: 5s
|
||||
# scrape_configs:
|
||||
# - job_name: 'apache'
|
||||
# static_configs:
|
||||
# - targets: ['apache-exporter:9117']
|
||||
# '';
|
||||
description = ''
|
||||
Config for prometheus style metrics
|
||||
'';
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -75,7 +75,6 @@
|
|||
|
||||
programs.mako = {
|
||||
enable = true;
|
||||
# makoctl mode -a do-not-disturb will hide all notifications, makoctl mode -r do-not-disturb will show them again.
|
||||
extraConfig = ''
|
||||
[mode=do-not-disturb]
|
||||
invisible=1
|
||||
|
@ -92,9 +91,6 @@
|
|||
programs.firefox = {
|
||||
enable = true;
|
||||
package = pkgs.firefox-devedition-bin;
|
||||
# profiles.dev-edition-default = {
|
||||
# isDefault = true;
|
||||
# };
|
||||
};
|
||||
|
||||
programs.vscode = {
|
||||
|
@ -104,6 +100,7 @@
|
|||
catppuccin.catppuccin-vsc
|
||||
codezombiech.gitignore
|
||||
editorconfig.editorconfig
|
||||
foxundermoon.shell-format
|
||||
james-yu.latex-workshop
|
||||
jnoortheen.nix-ide
|
||||
matklad.rust-analyzer
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#! nix-shell -p jq -i bash
|
||||
|
||||
if makoctl mode | grep -Fxq "do-not-disturb"; then
|
||||
if makoctl mode | rg -q "do-not-disturb"; then
|
||||
eww update dnd=""
|
||||
makoctl mode -r do-not-disturb > /dev/null
|
||||
else
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
per="$(pamixer --get-volume)"
|
||||
|
||||
if pamixer --get-mute | grep -q true; then
|
||||
if pamixer --get-mute | rg -q true; then
|
||||
icon="婢"
|
||||
elif [ "$per" -gt 66 ]; then
|
||||
icon="墳" # high
|
||||
|
|
|
@ -1,13 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
if nmcli g | rg -q "\bconnected\b"; then
|
||||
if wpa_cli status | rg -q "wpa_state=COMPLETED"; then
|
||||
icon="直"
|
||||
ssid=$(nmcli -t -f name connection show --active | sed -z 's/\n/,/g;s/,$/\n/')
|
||||
if echo $ssid | rg -q "Wired"; then
|
||||
status="Connected via cable"
|
||||
else
|
||||
status="Connected to ${ssid}"
|
||||
fi
|
||||
status="Connected"
|
||||
else
|
||||
icon="睊"
|
||||
status="offline"
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
#!/bin/sh
|
||||
workspaces() {
|
||||
./scripts/workspaces.lua
|
||||
./scripts/workspaces.lua
|
||||
}
|
||||
|
||||
workspaces
|
||||
|
||||
tail -f /tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/hyprland.log | grep --line-buffered "Changed to workspace" | while read -r; do
|
||||
workspaces
|
||||
workspaces
|
||||
done
|
||||
|
|
|
@ -68,6 +68,9 @@
|
|||
bind=SUPER,S,togglefloating,
|
||||
bind=SUPER,P,pseudo,
|
||||
|
||||
bindm=SUPER,mouse:272,movewindow
|
||||
bindm=SUPER,mouse:273,resizewindow
|
||||
|
||||
bind=SUPER,left,movefocus,l
|
||||
bind=SUPER,right,movefocus,r
|
||||
bind=SUPER,up,movefocus,u
|
||||
|
@ -114,6 +117,8 @@
|
|||
|
||||
bind=SUPER,g,togglegroup
|
||||
bind=SUPER,tab,changegroupactive
|
||||
bind=SUPER,m,fullscreen,1
|
||||
bind=SUPERSHIFT,m,fullscreen,0
|
||||
|
||||
bind=,XF86MonBrightnessUp,exec,brightnessctl -q s +5%
|
||||
bind=,XF86MonBrightnessDown,exec,brightnessctl -q s 5%-
|
||||
|
|
45
nixos/hosts/thalassa/null/networking.nix
Normal file
45
nixos/hosts/thalassa/null/networking.nix
Normal file
|
@ -0,0 +1,45 @@
|
|||
{ ... }@a:
|
||||
{
|
||||
networking = {
|
||||
networkmanager.enable = false;
|
||||
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"
|
||||
'';
|
||||
};
|
||||
"Pikachu 5G" = {
|
||||
psk = "@PIKACHU_PASSWORD@";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Allow reverse path for wireguard
|
||||
# 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
|
||||
# '';
|
||||
# };
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue