Refactor network (port) config

Turns out I can put :22 in admin.nix and it still works, which is more
appropriate.
This commit is contained in:
TEC 2023-12-11 00:45:11 +08:00
parent d4ad6c2961
commit c2dc65583c
Signed by: tec
SSH Key Fingerprint: SHA256:eobz41Mnm0/iYWBvWThftS0ElEs1ftBr6jamutnXc/A
2 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,7 @@
{ config, pkgs, ... }:
{
networking.firewall.allowedTCPPorts = [ 22 ];
users.users.admin = {
name = "admin";
hashedPassword = "$6$ET8BLqODvw77VOmI$oun2gILUqBr/3WonH2FO1L.myMIM80KeyO5W1GrYhJTo./jk7XcG8B3vEEcbpfx3R9h.sR0VV187/MgnsnouB1";

View File

@ -3,8 +3,8 @@
with lib;
{
networking.firewall.allowedTCPPorts = [ 22 80 443 ];
networking.firewall.allowedUDPPortRanges = [ { from=443; to=443; } ];
networking.firewall.allowedTCPPorts = [ 80 443 ];
networking.firewall.allowedUDPPorts = [ 443 ];
# If I end up wanting to add plugins, see:
# https://mdleom.com/blog/2021/12/27/caddy-plugins-nixos/