core.nix is the new minimal layer: user, SSH, fish, nix flakes/gc, locale, and a handful of essential packages. Suitable for any headless host that just needs to be SSHable and manageable. base.nix now imports core.nix and adds the day-to-day quality-of-life layer: avahi, mosh, direnv, nix-ld, earlyoom, zramSwap, CLI tools, and build toolchains. All existing hosts that import base.nix are unchanged. bootstrap is updated to import core.nix directly instead of duplicating the config inline. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
88 lines
1.3 KiB
Nix
88 lines
1.3 KiB
Nix
{ config, pkgs, inputs, ... }:
|
|
{
|
|
imports = [ ./core.nix ];
|
|
|
|
services.udev.packages = [ pkgs.rtl-sdr ];
|
|
|
|
zramSwap.enable = true;
|
|
|
|
boot.kernel.sysctl = {
|
|
"vm.swappiness" = 10;
|
|
};
|
|
|
|
services.earlyoom = {
|
|
enable = true;
|
|
freeMemThreshold = 10;
|
|
freeSwapThreshold = 90;
|
|
};
|
|
|
|
networking.firewall.allowedTCPPorts = [ 8000 8080 ];
|
|
|
|
programs.direnv = {
|
|
enable = true;
|
|
package = pkgs.direnv;
|
|
silent = false;
|
|
loadInNixShell = true;
|
|
direnvrcExtra = "";
|
|
nix-direnv = {
|
|
enable = true;
|
|
package = pkgs.nix-direnv;
|
|
};
|
|
};
|
|
|
|
programs.nix-ld.enable = true;
|
|
programs.nix-ld.libraries = with pkgs; [];
|
|
|
|
programs.mosh.enable = true;
|
|
|
|
services.avahi = {
|
|
enable = true;
|
|
nssmdns4 = true;
|
|
nssmdns6 = true;
|
|
publish = {
|
|
enable = true;
|
|
addresses = true;
|
|
workstation = true;
|
|
};
|
|
openFirewall = true;
|
|
};
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
avahi
|
|
bat
|
|
borgbackup
|
|
cifs-utils
|
|
duf
|
|
dust
|
|
entr
|
|
fd
|
|
gocryptfs
|
|
mosh
|
|
python314
|
|
ripgrep
|
|
rsync
|
|
silver-searcher
|
|
tldr
|
|
unzip
|
|
uv
|
|
wireguard-tools
|
|
zip
|
|
|
|
# maths
|
|
bc
|
|
libqalculate
|
|
|
|
# build tools
|
|
binutils
|
|
cmake
|
|
gcc
|
|
clang
|
|
gnumake
|
|
libtool
|
|
nodejs_24
|
|
|
|
# rust
|
|
cargo
|
|
rustc
|
|
];
|
|
}
|