nixos: zsh for every account, security summary on login, XMPP over IPv6
All checks were successful
nixos / nixos (push) Successful in 1m3s
All checks were successful
nixos / nixos (push) Successful in 1m3s
Every account now logs in with zsh, including ones added later, except deploy and git: the app CI and Forgejo run commands through their login shells. root gets the same zsh with a red prompt ending in #. Interactive SSH logins show, under fastfetch, the host's security state as the Grafana alerts see it, read from the local metrics files: anything unexpected (peers, devices, accounts, ports, containers), who is logged in, the last good backup per repository, the bucket replica, failed units and fail2ban bans. XMPP gets a Podman network of its own with IPv6. xmpp.asxp.io has an AAAA record, and Podman's default network forwards published ports over IPv4 only, where Docker on Debian did both: since the conversion, XMPP over IPv6 was refused. Tried on the rehearsal host with a published port on the new network, reached over IPv6 and IPv4. Assisted-by: Claude:opus-5-5
This commit is contained in:
parent
8c7e725463
commit
72a14a1b1b
2 changed files with 129 additions and 12 deletions
|
|
@ -28,7 +28,8 @@ in
|
|||
isSystemUser = true;
|
||||
group = "git";
|
||||
home = cfg.stateDir;
|
||||
useDefaultShell = true;
|
||||
# Forgejo's SSH commands run through it; not the zsh default
|
||||
shell = pkgs.bashInteractive;
|
||||
};
|
||||
users.groups.git = { };
|
||||
# Anyone may try a key against git; Forgejo decides what it may do
|
||||
|
|
|
|||
|
|
@ -25,6 +25,28 @@ in
|
|||
options.asxpio.publicIPv4 = lib.mkOption { type = lib.types.str; };
|
||||
|
||||
config = {
|
||||
# A network of its own with IPv6: xmpp.asxp.io has an AAAA record,
|
||||
# and Podman's default network forwards published ports over IPv4
|
||||
# only (Docker on Debian did both).
|
||||
systemd.services.podman-network-xmpp = {
|
||||
description = "Podman network xmpp (IPv4 and IPv6)";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
before = [ "podman-xmpp-ejabberd.service" ];
|
||||
path = [ config.virtualisation.podman.package ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
};
|
||||
script = ''
|
||||
podman network exists xmpp \
|
||||
|| podman network create --ipv6 --subnet 10.90.0.0/24 --subnet fd69:90::/64 xmpp
|
||||
'';
|
||||
};
|
||||
systemd.services.podman-xmpp-ejabberd = {
|
||||
requires = [ "podman-network-xmpp.service" ];
|
||||
after = [ "podman-network-xmpp.service" ];
|
||||
};
|
||||
|
||||
virtualisation.oci-containers.containers = {
|
||||
xmpp-ejabberd = {
|
||||
image = ejabberd;
|
||||
|
|
@ -37,6 +59,7 @@ in
|
|||
EJABBERD_MACRO_ACME_URL = "https://acme-v02.api.letsencrypt.org/directory";
|
||||
};
|
||||
environmentFiles = [ "${state}/secrets.env" ];
|
||||
extraOptions = [ "--network=xmpp" ];
|
||||
ports = [
|
||||
"5222:5222" # clients, STARTTLS
|
||||
"5223:5223" # clients, direct TLS
|
||||
|
|
|
|||
Loading…
Reference in a new issue