2023-02-03 05:37:18 +00:00
|
|
|
{
|
|
|
|
withSystem,
|
|
|
|
lib,
|
|
|
|
inputs,
|
|
|
|
...
|
|
|
|
}: {
|
2023-02-11 14:14:51 +00:00
|
|
|
flake = {
|
|
|
|
nixosConfigurations = withSystem "x86_64-linux" ({
|
|
|
|
system,
|
|
|
|
self',
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
machines = builtins.attrNames (builtins.readDir ./machines);
|
|
|
|
makeSystem = name:
|
|
|
|
pkgs.nixos {
|
|
|
|
imports = [
|
2023-02-03 05:37:18 +00:00
|
|
|
(import (./. + "/machines/${name}/configuration.nix") inputs)
|
2023-02-04 00:43:09 +00:00
|
|
|
inputs.secrets.nixosModules.default
|
2023-02-11 14:14:51 +00:00
|
|
|
inputs.self.nixosModules.unstableNFTables
|
|
|
|
];
|
|
|
|
};
|
|
|
|
in
|
|
|
|
lib.genAttrs machines makeSystem);
|
|
|
|
nixosModules.unstableNFTables = _: {
|
|
|
|
disabledModules = [
|
|
|
|
"services/networking/firewall.nix"
|
|
|
|
"services/networking/nftables.nix"
|
|
|
|
"services/networking/nat.nix"
|
|
|
|
"services/networking/redsocks.nix"
|
|
|
|
"services/networking/miniupnpd.nix"
|
|
|
|
"services/audio/roon-server.nix"
|
|
|
|
"services/audio/roon-bridge.nix"
|
|
|
|
];
|
|
|
|
imports = let
|
|
|
|
networkingModule = name: "${inputs.nixos-unstable}/nixos/modules/services/networking/${name}.nix";
|
|
|
|
in [
|
|
|
|
# nftables using module not available in 22.11.
|
|
|
|
(networkingModule "firewall-iptables")
|
|
|
|
(networkingModule "firewall-nftables")
|
|
|
|
(networkingModule "firewall")
|
|
|
|
(networkingModule "nat-iptables")
|
|
|
|
(networkingModule "nat-nftables")
|
|
|
|
(networkingModule "nat")
|
|
|
|
(networkingModule "nftables")
|
|
|
|
];
|
2023-02-02 03:58:37 +00:00
|
|
|
};
|
2023-02-11 14:14:51 +00:00
|
|
|
};
|
2023-02-03 05:37:18 +00:00
|
|
|
}
|