lib: Fix nftables

This commit is contained in:
PapaTutuWawa 2021-11-04 17:19:50 +01:00
parent e9b8d91559
commit f85c7db354
2 changed files with 16 additions and 3 deletions

View File

@ -4,6 +4,9 @@ let
network = import ./network.nix;
isVM = config.ptw.system.isVM;
wireless = config.ptw.system.wireless;
wifiInterface = config.ptw.system.wifi.wifiInterface;
primaryInterface = config.ptw.system.primaryInterface;
primaryInterfaceWrapper = if wifiInterface != "" && primaryInterface == "" then wifiInterface else primaryInterface;
in {
time.timeZone = "Europe/Berlin";
ostylk.nftables = {
@ -25,8 +28,7 @@ in {
ct state { established, related } accept
iif lo accept
# TODO
#iif {primaryInterfaceWrapper} goto non-libvirt
iif ${primaryInterfaceWrapper} goto non-libvirt
'';
};
};

View File

@ -1,5 +1,17 @@
{ inputs, config, lib, nur, emacs, ... }:
/*
TODO: Make these arguments unneccessary
Idea: Make miku.nix, mashu.nix, ... have the following structure
{
architecture: "x86_64-linux";
config = { ... }: {
# ...
};
}
*/
{
hostConfigFile
, architecture ? "x86_64-linux"
@ -12,7 +24,6 @@
inherit inputs config lib;
};
#primaryInterfaceWrapper = if wifiInterface != "" && primaryInterface == "" then wifiInterface else primaryInterface;
in inputs.nixpkgs.lib.nixosSystem {
system = architecture;