Compare commits
7
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4d0977c482 | ||
|
|
4f2c93d2b0 | ||
|
|
0c3b0a26e1 | ||
|
|
ccd58b62ce | ||
|
|
657be047ec | ||
|
|
062321ee7f | ||
|
|
951428e7a1 |
No files matched your search
@@ -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
|
||||||
|
|||||||
@@ -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";
|
||||||
|
|||||||
@@ -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; }
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
@@ -30,6 +30,8 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
|
tmp.cleanOnBoot = true;
|
||||||
|
|
||||||
loader = {
|
loader = {
|
||||||
systemd-boot = {
|
systemd-boot = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -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";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -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.
@@ -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 ];
|
||||||
|
|||||||
Reference in new issue
Block a user