add obs, etc
This commit is contained in:
parent
746b703d70
commit
f367c42651
16 changed files with 844 additions and 31 deletions
|
|
@ -10,6 +10,49 @@
|
|||
# Session variables
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
|
||||
# === Lid close behavior ===
|
||||
# Don't suspend when lid closes — external display stays active
|
||||
services.logind = {
|
||||
lidSwitch = "ignore";
|
||||
lidSwitchExternalPower = "ignore";
|
||||
lidSwitchDocked = "ignore";
|
||||
};
|
||||
|
||||
# Fallback ACPI handler for lid events outside Hyprland session
|
||||
# Primary handling is done via Hyprland bindl in hyprland.conf
|
||||
services.acpid = {
|
||||
enable = true;
|
||||
handlers.lid = {
|
||||
event = "button/lid.*";
|
||||
action = ''
|
||||
${pkgs.bash}/bin/bash -c '
|
||||
LID_STATE=$(cat /proc/acpi/button/lid/LID0/state 2>/dev/null || cat /proc/acpi/button/lid/LID/state 2>/dev/null || echo "open")
|
||||
if echo "$LID_STATE" | grep -qi "closed"; then
|
||||
EVENT="close"
|
||||
else
|
||||
EVENT="open"
|
||||
fi
|
||||
for user_dir in /run/user/*/hypr/; do
|
||||
[ -d "$user_dir" ] || continue
|
||||
SIG=$(ls "$user_dir" 2>/dev/null | head -1)
|
||||
[ -z "$SIG" ] && continue
|
||||
UID=$(basename $(dirname "$user_dir"))
|
||||
USER=$(id -nu $UID 2>/dev/null || echo "sscoble")
|
||||
HOME_DIR=$(getent passwd "$USER" | cut -d: -f6)
|
||||
USER_SCRIPT="$HOME_DIR/.config/hypr/scripts/lid-handler.sh"
|
||||
if [ -x "$USER_SCRIPT" ]; then
|
||||
sudo -u "$USER" \
|
||||
XDG_RUNTIME_DIR="/run/user/$UID" \
|
||||
HYPRLAND_INSTANCE_SIGNATURE="$SIG" \
|
||||
"$USER_SCRIPT" "$EVENT"
|
||||
fi
|
||||
break
|
||||
done
|
||||
'
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
# Security — required for hyprlock
|
||||
security.pam.services.hyprlock = {};
|
||||
|
||||
|
|
@ -82,6 +125,15 @@
|
|||
hardware.bluetooth.enable = true;
|
||||
hardware.bluetooth.powerOnBoot = true;
|
||||
|
||||
# Bluetooth manager (GUI pairing, tray applet)
|
||||
# Note: using manual setup instead of services.blueman.enable to avoid
|
||||
# a systemd unit bug (duplicate ExecStart in blueman-applet.service).
|
||||
# The applet is launched via exec-once in hyprland.conf instead.
|
||||
environment.systemPackages = with pkgs; [ blueman ];
|
||||
services.dbus.packages = with pkgs; [ blueman ];
|
||||
systemd.user.services.blueman-applet = { enable = false; };
|
||||
systemd.user.services.blueman-manager = { enable = false; };
|
||||
|
||||
# NetworkManager applet
|
||||
programs.nm-applet.enable = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,8 +43,15 @@
|
|||
wineWow64Packages.stable
|
||||
];
|
||||
|
||||
# DNS fallback (Tailscale MagicDNS sometimes blocks public resolvers)
|
||||
networking.nameservers = [ "1.1.1.1" "8.8.8.8" ];
|
||||
# === WiFi / NetworkManager (imperative — not idempotent) ===
|
||||
# We move between SSIDs regularly, so NO declarative wifi networks here.
|
||||
# Use nm-applet (tray) or nmcli (CLI) to connect to any SSID at runtime.
|
||||
# Connections persist across reboots via /etc/NetworkManager/system-connections/
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# DNS handed out by NM to each connection; Tailscale MagicDNS can interfere
|
||||
# with public resolvers, so we inject Cloudflare + Google as fallbacks.
|
||||
networking.networkmanager.insertNameservers = [ "1.1.1.1" "8.8.8.8" ];
|
||||
|
||||
# Passwordless sudo for sscoble
|
||||
security.sudo.extraRules = [
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
# Enable network printer discovery via mDNS/Bonjour
|
||||
services.avahi = {
|
||||
enable = true;
|
||||
nssmdns = true;
|
||||
nssmdns4 = true;
|
||||
publish = {
|
||||
enable = true;
|
||||
addresses = true;
|
||||
|
|
|
|||
|
|
@ -63,7 +63,51 @@
|
|||
# === powertop ===
|
||||
powerManagement.powertop.enable = true;
|
||||
|
||||
# Skip thermald — conflicts with throttled (enabled by nixos-hardware)
|
||||
# === throttled — undervolt + raise trip temp for better sustained perf ===
|
||||
services.throttled = {
|
||||
extraConfig = ''
|
||||
[GENERAL]
|
||||
Enabled: True
|
||||
Sysfs_Power_Path: /sys/class/power_supply/AC*/online
|
||||
Autoreload: True
|
||||
|
||||
[BATTERY]
|
||||
Update_Rate_s: 30
|
||||
PL1_Tdp_W: 29
|
||||
PL1_Duration_s: 28
|
||||
PL2_Tdp_W: 29
|
||||
PL2_Duration_S: 0.002
|
||||
Trip_Temp_C: 85
|
||||
cTDP: 0
|
||||
Disable_BDPROCHOT: False
|
||||
|
||||
[AC]
|
||||
Update_Rate_s: 5
|
||||
PL1_Tdp_W: 44
|
||||
PL1_Duration_s: 28
|
||||
PL2_Tdp_W: 44
|
||||
PL2_Duration_S: 0.002
|
||||
Trip_Temp_C: 97
|
||||
cTDP: 0
|
||||
Disable_BDPROCHOT: False
|
||||
|
||||
[UNDERVOLT.BATTERY]
|
||||
CORE: -70
|
||||
GPU: -50
|
||||
CACHE: -70
|
||||
UNCORE: -40
|
||||
ANALOGIO: -40
|
||||
|
||||
[UNDERVOLT.AC]
|
||||
CORE: -80
|
||||
GPU: -50
|
||||
CACHE: -80
|
||||
UNCORE: -50
|
||||
ANALOGIO: -50
|
||||
'';
|
||||
};
|
||||
|
||||
# Skip thermald — conflicts with throttled
|
||||
services.thermald.enable = false;
|
||||
|
||||
# === zram swap (faster + saves NVMe writes) ===
|
||||
|
|
@ -135,11 +179,14 @@
|
|||
# === Tailscale (consistent cluster access from any network) ===
|
||||
services.tailscale.enable = true;
|
||||
|
||||
# === Proton Mail Bridge (local IMAP/SMTP for Proton Mail) ===
|
||||
# The systemd user service is defined in home/desktop.nix
|
||||
|
||||
# === NVMe tools ===
|
||||
environment.systemPackages = with pkgs; [ nvme-cli ];
|
||||
environment.systemPackages = with pkgs; [ nvme-cli protonmail-bridge ];
|
||||
|
||||
# === Touchpad & TrackPoint ===
|
||||
services.xserver.libinput = {
|
||||
services.libinput = {
|
||||
enable = true;
|
||||
touchpad = {
|
||||
tapping = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue