From 7fd9a1e646b44b6334e5da0cbf1f11d075493471 Mon Sep 17 00:00:00 2001 From: Adrian Gunnar Lauterer Date: Sun, 7 Jan 2024 01:21:11 +0100 Subject: [PATCH] started on bikkje container for new loginbox - work in progress --- hosts/bikkje/configuration.nix | 44 ++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 hosts/bikkje/configuration.nix diff --git a/hosts/bikkje/configuration.nix b/hosts/bikkje/configuration.nix new file mode 100644 index 0000000..160a42a --- /dev/null +++ b/hosts/bikkje/configuration.nix @@ -0,0 +1,44 @@ +{ config, pkgs, values, ... }: +{ + networking.nat = { + enable = true; + internalInterfaces = ["ve-+"]; + externalInterface = "ens3"; + # Lazy IPv6 connectivity for the container + enableIPv6 = true; + }; + + containers.bikkje = { + autoStart = true; + config = { config, pkgs, ... }: { + #import packages + packages = with pkgs; [ + alpine + mutt + mutt-ics + mutt-wizard + weechat + weechatScripts.edit + hexchat + irssi + pidgin + ]; + + networking = { + firewall = { + enable = true; + # Allow SSH and HTTP and ports for email and irc + allowedTCPPorts = [ 80 22 194 994 6665 6666 6667 6668 6669 6697 995 993 25 465 587 110 143 993 995 ]; + allowedUDPPorts = [ 80 22 194 994 6665 6666 6667 6668 6669 6697 995 993 25 465 587 110 143 993 995 ]; + }; + # Use systemd-resolved inside the container + # Workaround for bug https://github.com/NixOS/nixpkgs/issues/162686 + useHostResolvConf = mkForce false; + }; + + system.stateVersion = "23.11"; + services.resolved.enable = true; + }; + }; + +}; \ No newline at end of file