fix: remove trusted-users escalation, restore comments, move man-db to core
- Remove alex from nix.settings.trusted-users in core.nix (was not in the original base.nix and widens attack surface by allowing arbitrary binary cache configuration without sudo) - Restore useful comments in base.nix (zram explanation, earlyoom purpose, avahi/systemd-resolved notes) - Move documentation.man.man-db.enable = false into core.nix so all hosts get it, remove redundant setting from wintermute and nightcity Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
4c5a639720
commit
265a299f24
4 changed files with 11 additions and 10 deletions
|
|
@ -2,14 +2,15 @@
|
||||||
{
|
{
|
||||||
imports = [ ./core.nix ];
|
imports = [ ./core.nix ];
|
||||||
|
|
||||||
services.udev.packages = [ pkgs.rtl-sdr ];
|
# zram creates a compressed swap device backed by RAM, so swap pages are
|
||||||
|
# compressed in memory rather than written to disk.
|
||||||
zramSwap.enable = true;
|
zramSwap.enable = true;
|
||||||
|
|
||||||
boot.kernel.sysctl = {
|
boot.kernel.sysctl = {
|
||||||
"vm.swappiness" = 10;
|
"vm.swappiness" = 10;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# stop the system becoming unresponsive when out of ram
|
||||||
services.earlyoom = {
|
services.earlyoom = {
|
||||||
enable = true;
|
enable = true;
|
||||||
freeMemThreshold = 10;
|
freeMemThreshold = 10;
|
||||||
|
|
@ -37,7 +38,7 @@
|
||||||
|
|
||||||
services.avahi = {
|
services.avahi = {
|
||||||
enable = true;
|
enable = true;
|
||||||
nssmdns4 = true;
|
nssmdns4 = true; # enable mDNS NSS lookups (.local resolution)
|
||||||
nssmdns6 = true;
|
nssmdns6 = true;
|
||||||
publish = {
|
publish = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -45,6 +46,9 @@
|
||||||
workstation = true;
|
workstation = true;
|
||||||
};
|
};
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
|
# if using systemd-resolved alongside avahi, also enable:
|
||||||
|
# services.resolved.enable = true;
|
||||||
|
# services.resolved.extraConfig = "MulticastDNS=yes";
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,11 @@
|
||||||
|
|
||||||
programs.fish.enable = true;
|
programs.fish.enable = true;
|
||||||
|
|
||||||
|
# generating man caches is very slow when fish is enabled and may not
|
||||||
|
# complete during activation. disabling breaks fish man completion and
|
||||||
|
# apropos but is otherwise harmless.
|
||||||
documentation.man.generateCaches = false;
|
documentation.man.generateCaches = false;
|
||||||
|
documentation.man.man-db.enable = false;
|
||||||
|
|
||||||
time.timeZone = "Australia/Brisbane";
|
time.timeZone = "Australia/Brisbane";
|
||||||
|
|
||||||
|
|
@ -45,7 +49,6 @@
|
||||||
nix.settings = {
|
nix.settings = {
|
||||||
experimental-features = [ "nix-command" "flakes" ];
|
experimental-features = [ "nix-command" "flakes" ];
|
||||||
auto-optimise-store = true;
|
auto-optimise-store = true;
|
||||||
trusted-users = [ "root" "alex" ];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
nix.gc = {
|
nix.gc = {
|
||||||
|
|
|
||||||
|
|
@ -19,10 +19,6 @@
|
||||||
privileged = true;
|
privileged = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
documentation.man = {
|
|
||||||
man-db.enable = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [
|
networking.firewall.allowedTCPPorts = [
|
||||||
8000
|
8000
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,5 @@
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
documentation.man.man-db.enable = false;
|
|
||||||
|
|
||||||
system.stateVersion = "25.11";
|
system.stateVersion = "25.11";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue