summaryrefslogtreecommitdiff
path: root/nixos/modules
diff options
context:
space:
mode:
authorseraphim <18ycm9tx@anonaddy.me>2026-08-08 17:21:01 +0700
committerseraphim <18ycm9tx@anonaddy.me>2026-08-08 17:21:01 +0700
commit1e3def5c7832572877a0f41432bab5655ea4f6bf (patch)
treec2041405fd4dc88e70d389c0e705592857dd5598 /nixos/modules
parente3f90f0362007e01a11addc1cd049c44bf00a70e (diff)
upd
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/features/cli-tools/default.nix2
-rw-r--r--nixos/modules/features/vpn-utils/default.nix32
-rw-r--r--nixos/modules/system/services/default.nix7
-rw-r--r--nixos/modules/system/users/default.nix25
4 files changed, 47 insertions, 19 deletions
diff --git a/nixos/modules/features/cli-tools/default.nix b/nixos/modules/features/cli-tools/default.nix
index 054ddc1..ef13ddd 100644
--- a/nixos/modules/features/cli-tools/default.nix
+++ b/nixos/modules/features/cli-tools/default.nix
@@ -16,6 +16,8 @@
caligula
fetch
smartmontools
+ amneziawg-tools
+ amneziawg-go
];
# Cross-shell prompt; its config lives in the dotfiles repo, not NixOS.
diff --git a/nixos/modules/features/vpn-utils/default.nix b/nixos/modules/features/vpn-utils/default.nix
index 89b92e4..91f2594 100644
--- a/nixos/modules/features/vpn-utils/default.nix
+++ b/nixos/modules/features/vpn-utils/default.nix
@@ -8,24 +8,24 @@
programs.amnezia-vpn.enable = true;
- networking.wireguard.enable = true;
-
- boot.kernelModules = [ "wireguard" ];
-
environment.systemPackages = with pkgs; [
wireguard-tools
];
- systemd.services.wireguard-client = {
- description = "WireGuard client tunnel (wg)";
- after = [ "network-online.target" ];
- wants = [ "network-online.target" ];
- wantedBy = [ "multi-user.target" ];
- serviceConfig = {
- Type = "oneshot";
- RemainAfterExit = true;
- ExecStart = "${pkgs.wireguard-tools}/bin/wg-quick up wg";
- ExecStop = "${pkgs.wireguard-tools}/bin/wg-quick down wg";
- };
- };
+ # Throne's sing-box core resolves its underlying DNS by running
+ # `resolvectl -i <default-iface> dns` and fails to parse the empty
+ # per-link output (enp42s0 has no per-link DNS; ours is global Mullvad
+ # in services.resolved). Push the same Mullvad servers per-link so the
+ # resolvectl parse succeeds and proxy hostnames can be looked up.
+ networking.networkmanager.dispatcherScripts = [
+ {
+ type = "basic";
+ source = pkgs.writeText "link-dns.sh" ''
+ #!/bin/sh
+ if [ "$1" = "enp42s0" ] && { [ "$2" = "up" ] || [ "$2" = "dhcp4-change" ]; }; then
+ ${pkgs.systemd}/bin/resolvectl dns enp42s0 194.242.2.2 194.242.2.4 || true
+ fi
+ '';
+ }
+ ];
} \ No newline at end of file
diff --git a/nixos/modules/system/services/default.nix b/nixos/modules/system/services/default.nix
index 74ac531..571ae3a 100644
--- a/nixos/modules/system/services/default.nix
+++ b/nixos/modules/system/services/default.nix
@@ -14,4 +14,11 @@
SystemMaxUse=50M
MaxRetentionSec=1month
'';
+
+ # Cap core dumps so a crashing app can't fill the root partition with
+ # multi-GB crash dumps (e.g. java/electron segfaults).
+ systemd.coredump.settings.Coredump = {
+ ProcessSizeMax = "512M";
+ Storage = "external";
+ };
}
diff --git a/nixos/modules/system/users/default.nix b/nixos/modules/system/users/default.nix
index d795a64..d9ac254 100644
--- a/nixos/modules/system/users/default.nix
+++ b/nixos/modules/system/users/default.nix
@@ -24,7 +24,13 @@
];
};
- # ZSH + completion, oh-my-zsh, autosuggestions, and fzf key bindings.
+ # fzf -- proper key bindings + completion for zsh.
+ programs.fzf = {
+ fuzzyCompletion = true;
+ keybindings = true;
+ };
+
+ # ZSH + completion, oh-my-zsh, autosuggestions.
programs.zsh = {
enable = true;
enableCompletion = true;
@@ -35,8 +41,21 @@
strategy = [ "history" "completion" ];
};
interactiveShellInit = ''
- source ${pkgs.fzf}/share/fzf/key-bindings.zsh
- source ${pkgs.fzf}/share/fzf/completion.zsh
+ # Fish-style full-screen Ctrl+R history search.
+ export FZF_CTRL_R_OPTS="
+ --layout=reverse
+ --scheme=history
+ --height=100%
+ --border=sharp
+ --border-label=' Ctrl+R '
+ --highlight-line
+ --pointer=→
+ --info=inline-right
+ --header-first
+ --header='enter: accept · ctrl-/ : toggle preview'
+ --preview='echo {}' --preview-window=down:3:hidden:wrap
+ --bind=ctrl-/:toggle-preview
+ "
'';
shellAliases = {
ls = "eza -al --icons=auto";