{ config, lib, pkgs, inputs, ... }: { imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix ../../modules/common.nix ../../modules/re.nix ]; boot.loader.grub = { enable = true; device = "nodev"; efiSupport = true; }; boot.loader.efi.canTouchEfiVariables = false; boot.loader.efi.efiSysMountPoint = "/boot/efi"; networking.hostName = "laptop"; networking.wireless.iwd.enable = true; networking.wireless.iwd.settings = { General.EnableNetworkConfiguration = true; }; networking.nameservers = [ "1.1.1.1" "8.8.8.8" ]; programs.light.enable = true; programs.bash.shellAliases = { battery = "echo $(($(cat /sys/class/power_supply/BAT0/charge_now)*100/$(cat /sys/class/power_supply/BAT0/charge_full)))%"; hibernate = "systemctl hibernate"; vpn-up = "sudo systemctl start wg-quick-wg0"; vpn-down = "sudo systemctl stop wg-quick-wg0"; }; programs.fish.shellAliases = { battery = "echo (math (cat /sys/class/power_supply/BAT0/charge_now) * 100 / (cat /sys/class/power_supply/BAT0/charge_full))%"; hibernate = "systemctl hibernate"; vpn-up = "sudo systemctl start wg-quick-wg0"; vpn-down = "sudo systemctl stop wg-quick-wg0"; }; services.logind = { powerKey = "ignore"; powerKeyLongPress = "ignore"; }; services.keyd = { enable = true; keyboards.default = { ids = [ "*" ]; settings.main.capslock = "overload(control, esc)"; }; }; home-manager.users.christian.custom.xmobarBattery = true; home-manager.users.christian.custom.xmobarVpn = true; # WireGuard — not started on boot, use `wg-quick up wg0` / `wg-quick down wg0` # Private key must be placed at /etc/wireguard/wg0.key (mode 600, owned by root) networking.wg-quick.interfaces.wg0 = { autostart = false; address = [ "10.67.40.2/32" ]; privateKeyFile = "/etc/wireguard/wg0.key"; peers = [ { publicKey = "wg37lctIxY4qbcyjVDrEI4mahH2Bhgv+73djEjJSyww="; endpoint = "vpn.soltermann.xyz:51820"; allowedIPs = [ "10.67.40.0/24" ]; persistentKeepalive = 25; } ]; }; swapDevices = [ { device = "/swapfile"; size = 8192; # 8GB in MiB } ]; boot.resumeDevice = "/dev/disk/by-uuid/56ae0488-d952-41d8-8128-60a46e979d91"; boot.kernelParams = [ "resume_offset=12832768" ]; system.stateVersion = "25.11"; }