nftables: import module and init config

This commit is contained in:
hexchen 2021-01-15 22:45:34 +00:00
parent d86418307f
commit c0efd41e74
4 changed files with 11 additions and 2 deletions

View file

@ -7,6 +7,7 @@ in {
../modules ../modules
./users.nix ./users.nix
(sources.home-manager + "/nixos") (sources.home-manager + "/nixos")
(sources.pbb-nixfiles + "/modules/nftables")
]; ];
boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_latest; boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
@ -77,4 +78,6 @@ in {
services.nginx.appendHttpConfig = '' services.nginx.appendHttpConfig = ''
access_log off; access_log off;
''; '';
petabyte.nftables.enable = true;
} }

View file

@ -7,7 +7,7 @@
localAddress = "192.168.100.3"; localAddress = "192.168.100.3";
autoStart = true; autoStart = true;
config = { config, lib, pkgs, ... }: { config = { config, lib, pkgs, ... }: {
networking.firewall.allowedTCPPorts = [ 3000 ]; networking.firewall.enable = false;
services.coredns = { services.coredns = {
enable = true; enable = true;
config = '' config = ''

View file

@ -11,7 +11,7 @@ in {
config = {config, pkgs, ... }: { config = {config, pkgs, ... }: {
networking.hosts."::1" = [ "wiki.lantifa.org" ]; networking.hosts."::1" = [ "wiki.lantifa.org" ];
networking.firewall.allowedTCPPorts = [ 80 ]; networking.firewall.enable = false;
users.users.mediawiki.extraGroups = [ "keys" ]; users.users.mediawiki.extraGroups = [ "keys" ];
services.mediawiki = { services.mediawiki = {

View file

@ -67,5 +67,11 @@
"type": "tarball", "type": "tarball",
"url": "https://github.com/hexchen/nixpkgs/archive/b5f7683f8d7f99186dd4232f233d17ce1abd4e17.tar.gz", "url": "https://github.com/hexchen/nixpkgs/archive/b5f7683f8d7f99186dd4232f233d17ce1abd4e17.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"pbb-nixfiles": {
"ref": "main",
"repo": "https://git.petabyte.dev/petabyteboy/nixfiles.git",
"rev": "0720c5dba283d782f2f887bf97aad339137d95dc",
"type": "git"
} }
} }