Skip to content

Install fail2ban using system manager#2072

Draft
picnoir wants to merge 7 commits intosystem-manager-basefrom
system-manager-fail2ban-rebased
Draft

Install fail2ban using system manager#2072
picnoir wants to merge 7 commits intosystem-manager-basefrom
system-manager-fail2ban-rebased

Conversation

@picnoir
Copy link
Collaborator

@picnoir picnoir commented Feb 27, 2026

Introducing a system manager fail2ban module. This module introduce
two extra filters and fails on top of the builtin ones adapted from
the current ansible deployment for postgresql and pgbouncer.

NOTE: this PR targets #2063

jfroche and others added 6 commits February 23, 2026 16:28
* Create default system manager configuration

* chores: add nix run .#check-system-module to github actions workflows

* feat: replace Docker-based system-manager tests with container test framework

Switch from building Docker images and running pytest+testinfra externally
to using system-manager's built-in makeContainerTest API backed by
systemd-nspawn. The test is now a Nix check derivation that runs inside
the build sandbox.

It requires auto-allocating UIDs in the ephemeral Nix installation,
which is now enabled by default in the GitHub Action.

Rebased from #2010

Co-authored-by: Yvan Sraka <yvan@sraka.xyz>
system-manager's userborn service rewrites /etc/passwd entries:
- root shell: /bin/bash -> /run/system-manager/sw/bin/bash
- nobody shell: /usr/sbin/nologin -> /run/system-manager/sw/bin/nologin
The check should be part of the regular nix-build workflow
Enabling the nginx service in the system configuration was a good start,
but it had implications for the test suite verifying that the AMI was
correctly configured.

We change the configuration to set up a basic ssh config file that
matches the expected configuration for the AMI, and update the tests to
verify that the file is created with the correct content and
permissions.
@picnoir picnoir requested review from a team as code owners February 27, 2026 17:28
@picnoir picnoir marked this pull request as draft February 27, 2026 17:28
Introducing a system manager fail2ban module. This module introduce
two extra filters and fails on top of the builtin ones adapted from
the current ansible deployment for postgresql and pgbouncer.
@picnoir picnoir force-pushed the system-manager-fail2ban-rebased branch from cb19c78 to 742fa3a Compare February 27, 2026 18:06
@samrose samrose force-pushed the system-manager-base branch from fa57ba5 to 9fb8bdf Compare March 13, 2026 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants