Compare commits

...
7 Commits
Author SHA1 Message Date
Alexander Heldt 4d0977c482 backwards/pinwheel: Add SSH key for backwards to access pinwheel
Pinwheel's sshd had no way to accept keys from other hosts. Give it the
same `authorizedKeysCommand` setup as backwards and manatee, and authorize
a new `alex.backwards-pinwheel` key that backwards uses for `ssh pinwheel`.
2026-10-20 21:59:21 +02:00
Alexander Heldt 4f2c93d2b0 backwards: Disable rtw88 power saving 2026-10-20 21:20:31 +02:00
Alexander Heldt 0c3b0a26e1 backwards: Disable i915 display power saving 2026-10-20 21:20:31 +02:00
Alexander Heldt ccd58b62ce backwards: Enable Steam and let it use the 8BitDo pad
`hid_nintendo` claims the pad when it is in Nintendo Switch mode, which
leaves Steam unable to reach it through hidraw. Blacklist the module and
tag the device with `uaccess` so Steam can open it.
2026-10-20 21:20:31 +02:00
Alexander Heldt 657be047ec backwards: Replace nix-gc-env with nh clean
`nix.gc` run as root cannot prune generations under
`~/.local/state/nix/profiles` (NixOS/nix#8508), and `nix-gc-env` only
looks in `/nix/var/nix/profiles`. Home-manager generations therefore
accumulated since August 2024 and filled the disk.

`nh clean all` enumerates users and walks their per-user profiles too.
It replaces `nix.gc.automatic`, which cannot be enabled alongside it.
2026-10-20 21:20:31 +02:00
Alexander Heldt 062321ee7f backwards/manatee/tadpole: Clean /tmp on boot
Only `pinwheel` set this. Elsewhere files in `/tmp` survived reboots,
and leftover `nh` build result symlinks there kept acting as GC roots,
pinning store paths that should have been collected.
2026-10-20 21:20:31 +02:00
Alexander Heldt 951428e7a1 backwards: Add tailscale-qs GNOME extension for switching exit nodes 2026-10-20 21:20:31 +02:00
10 changed files with 94 additions and 10 deletions

No files matched your search

+21 -8
View File
@@ -1,5 +1,4 @@
{ {
inputs,
lib, lib,
config, config,
... ...
@@ -8,8 +7,6 @@ let
configurationLimit = config.mod.gc.configurationLimit; configurationLimit = config.mod.gc.configurationLimit;
in in
{ {
imports = [ inputs.nix-gc-env.nixosModules.default ];
options = { options = {
mod.gc = { mod.gc = {
configurationLimit = lib.mkOption { configurationLimit = lib.mkOption {
@@ -21,15 +18,22 @@ in
}; };
config = { config = {
nix.gc = { # `nix.gc` cannot prune generations under `~/.local/state/nix/profiles`
automatic = true; # when run as root (NixOS/nix#8508), so home-manager generations piled up.
dates = "weekly"; # `nh clean` walks those per-user profiles too.
programs.nh = {
enable = true;
# `delete_generations` added by nix-gc-env clean = {
delete_generations = "+${builtins.toString configurationLimit}"; enable = true;
dates = "weekly";
extraArgs = "--keep ${builtins.toString configurationLimit}";
};
}; };
boot = { boot = {
tmp.cleanOnBoot = true;
loader = { loader = {
systemd-boot = { systemd-boot = {
enable = true; enable = true;
@@ -39,9 +43,18 @@ in
efi.canTouchEfiVariables = true; efi.canTouchEfiVariables = true;
}; };
blacklistedKernelModules = [ "hid_nintendo" ];
kernelParams = [
"i915.enable_dc=0"
"i915.disable_power_well=0"
];
extraModprobeConfig = '' extraModprobeConfig = ''
options snd-intel-dspcfg dsp_driver=1 options snd-intel-dspcfg dsp_driver=1
options snd_hda_intel power_save=0 power_save_controller=N options snd_hda_intel power_save=0 power_save_controller=N
options rtw88_core disable_lps_deep=y
options rtw88_pci disable_aspm=y
''; '';
}; };
}; };
@@ -1,5 +1,13 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
programs.steam.enable = true;
services.udev.extraRules = ''
# 8BitDo in Nintendo Switch mode - allow Steam hidraw access
KERNEL=="hidraw*", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="2009", \
MODE="0660", GROUP="input", TAG+="uaccess"
'';
home-manager.users.alex = { home-manager.users.alex = {
home.packages = [ home.packages = [
pkgs.nethack pkgs.nethack
+20
View File
@@ -31,6 +31,13 @@ in
Port = 1122; Port = 1122;
}; };
"pinwheel" = {
HostName = "pinwheel";
User = "alex";
IdentityFile = "/home/alex/.ssh/alex.backwards-pinwheel";
Port = 1122;
};
"git.ppp.pm" = { "git.ppp.pm" = {
HostName = "git.ppp.pm"; HostName = "git.ppp.pm";
IdentityFile = "/home/alex/.ssh/alex.backwards-git.ppp.pm"; IdentityFile = "/home/alex/.ssh/alex.backwards-git.ppp.pm";
@@ -115,6 +122,19 @@ in
group = "users"; group = "users";
}; };
"alex.backwards-pinwheel" = {
file = ../../../../secrets/backwards/alex.backwards-pinwheel.age;
path = "/home/alex/.ssh/alex.backwards-pinwheel";
owner = "alex";
group = "users";
};
"alex.backwards-pinwheel.pub" = {
file = ../../../../secrets/backwards/alex.backwards-pinwheel.pub.age;
path = "/home/alex/.ssh/alex.backwards-pinwheel.pub";
owner = "alex";
group = "users";
};
"alex.pinwheel-backwards.pub" = { "alex.pinwheel-backwards.pub" = {
file = ../../../../secrets/pinwheel/alex.pinwheel-backwards.pub.age; file = ../../../../secrets/pinwheel/alex.pinwheel-backwards.pub.age;
path = "${authorizedKeysPath}/alex.pinwheel-backwards.pub"; path = "${authorizedKeysPath}/alex.pinwheel-backwards.pub";
+18 -2
View File
@@ -1,9 +1,25 @@
{ ... }: { pkgs, ... }:
{ {
services.tailscale.enable = true; services.tailscale = {
enable = true;
# Required for the GNOME extension to control tailscale without root
extraSetFlags = [ "--operator=alex" ];
};
networking.firewall = { networking.firewall = {
checkReversePath = "loose"; checkReversePath = "loose";
allowedUDPPorts = [ 41641 ]; allowedUDPPorts = [ 41641 ];
}; };
home-manager.users.alex = {
programs.gnome-shell = {
enable = true;
extensions = [
# Tailscale in the GNOME quick settings, including Mullvad exit nodes
{ package = pkgs.gnomeExtensions.tailscale-qs; }
];
};
};
} }
+2
View File
@@ -30,6 +30,8 @@ in
}; };
boot = { boot = {
tmp.cleanOnBoot = true;
loader = { loader = {
systemd-boot = { systemd-boot = {
enable = true; enable = true;
+21
View File
@@ -1,4 +1,7 @@
{ pkgs, ... }: { pkgs, ... }:
let
authorizedKeysPath = "/home/alex/.ssh/authorized-keys";
in
{ {
# Enable gnome-keyring at system level for PAM integration # Enable gnome-keyring at system level for PAM integration
services.gnome.gnome-keyring.enable = true; services.gnome.gnome-keyring.enable = true;
@@ -154,6 +157,21 @@
owner = "alex"; owner = "alex";
group = "users"; group = "users";
}; };
"alex.backwards-pinwheel.pub" = {
file = ../../../../secrets/backwards/alex.backwards-pinwheel.pub.age;
path = "${authorizedKeysPath}/alex.backwards-pinwheel.pub";
};
};
environment.etc."ssh/authorized_keys_command" = {
mode = "0755";
text = ''
#!${pkgs.bash}/bin/bash
for file in ${authorizedKeysPath}/*; do
${pkgs.coreutils}/bin/cat "$file"
done
'';
}; };
services.openssh = { services.openssh = {
@@ -166,5 +184,8 @@
type = "ed25519"; type = "ed25519";
} }
]; ];
authorizedKeysCommand = "/etc/ssh/authorized_keys_command";
authorizedKeysCommandUser = "root";
}; };
} }
+2
View File
@@ -30,6 +30,8 @@ in
}; };
boot = { boot = {
tmp.cleanOnBoot = true;
loader = { loader = {
grub = { grub = {
enable = true; enable = true;
Binary file not shown.
Binary file not shown.
+2
View File
@@ -56,6 +56,8 @@ in {
"backwards/root.backwards.pub.age".publicKeys = [ backwards alex ]; "backwards/root.backwards.pub.age".publicKeys = [ backwards alex ];
"backwards/alex.backwards-manatee.age".publicKeys = [ backwards alex ]; "backwards/alex.backwards-manatee.age".publicKeys = [ backwards alex ];
"backwards/alex.backwards-manatee.pub.age".publicKeys = [ backwards manatee alex ]; "backwards/alex.backwards-manatee.pub.age".publicKeys = [ backwards manatee alex ];
"backwards/alex.backwards-pinwheel.age".publicKeys = [ backwards alex ];
"backwards/alex.backwards-pinwheel.pub.age".publicKeys = [ backwards pinwheel alex ];
"backwards/alex.backwards-git.ppp.pm.age".publicKeys = [ backwards alex ]; "backwards/alex.backwards-git.ppp.pm.age".publicKeys = [ backwards alex ];
"backwards/alex.backwards-git.ppp.pm.pub.age".publicKeys = [ backwards alex ]; "backwards/alex.backwards-git.ppp.pm.pub.age".publicKeys = [ backwards alex ];
"backwards/wireless-network-secrets.age".publicKeys = [ backwards alex ]; "backwards/wireless-network-secrets.age".publicKeys = [ backwards alex ];