From f85c7db354f909b826979fb76a14be7ec4b99ba0 Mon Sep 17 00:00:00 2001 From: "Alexander \"PapaTutuWawa" Date: Thu, 4 Nov 2021 17:19:50 +0100 Subject: [PATCH] lib: Fix nftables --- lib/baseSystem.nix | 6 ++++-- lib/mkSystem.nix | 13 ++++++++++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/lib/baseSystem.nix b/lib/baseSystem.nix index da6a692..b9dab8f 100644 --- a/lib/baseSystem.nix +++ b/lib/baseSystem.nix @@ -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 ''; }; }; diff --git a/lib/mkSystem.nix b/lib/mkSystem.nix index e6cf7fc..5ea38da 100644 --- a/lib/mkSystem.nix +++ b/lib/mkSystem.nix @@ -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;