nixos: add configuration for firewalld#205380
Conversation
|
@lukegb Please help me write tests for |
firewalld applets are Qt-based but they also uses gobject-introspection for libraries like libnm, libnotify so we need to wrap with both.
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/prs-ready-for-review/3032/1813 |
|
Will this get merged or is a new PR necessary? |
|
Some of this was already merged, but it still needs more work. Here's the overlay I apply to get a working firewalld = prev.firewalld.overrideAttrs (old: {
# Patch /usr/lib, and fix typo in nm-connection-editor
postPatch = ''
substituteInPlace src/firewall/config/__init__.py.in \
--replace "/usr/share" "$out/share" \
--replace "/usr/lib/" "/run/current-system/sw/lib/"
for file in config/firewall-{applet,config}.desktop.in; do
substituteInPlace $file \
--replace "/usr/bin/" "$out/bin/"
done
substituteInPlace src/firewall-applet.in \
--replace "/usr/bin/nm-connection-editor" "${final.networkmanagerapplet}/bin/nm-connection-editor"
'';
# Make NM available for gobject-introspection
buildInputs = old.buildInputs ++ [final.networkmanager];
# Fix applet executable
nativeBuildInputs = old.nativeBuildInputs ++ [final.libsForQt5.wrapQtAppsHook];
dontWrapQtApps = true;
preFixup = old.preFixup + ''
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
'';
}); |
|
I'm closing this PR to signal that I'm not planning to work on this anytime soon. If anyone is interested, feel free to make a new PR based off the work done here. |
the modules were merged? i don't see any in nixos options |
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/firewalld-systemd-service/49129/8 |
Description of changes
Add new module to allow for configuration of firewalld.
This PR contains a couple auxiliary fixes:
nftables: Fixed python module default SO import path.firewalld: Fixedfirewall-appletandnetworkmanagerintegration.I can split this into other PRs if that's desired.
TODO (in a future PR, maybe):
firewalldto let it load base config from the default config directory (ie./lib/firewalld/firewalld.conf). This should allow forservices.firewalld.configto be used in tandem with ordinary user configs.Fixes #165882
Fixes #249609
Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)nixos/doc/manual/md-to-db.shto update generated release notes