forked from thelegy/nixos-nftables-firewall
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
48 lines (41 loc) · 1.27 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
dependencyDagOfSubmodule = {
url = "github:thelegy/nix-dependencyDagOfSubmodule";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = flakes @ {nixpkgs, ...}: {
nixosModules = let
module = file: {
_file = file;
imports = [(import file flakes)];
};
in rec {
nftables = module ./modules/nftables.nix;
chains = module ./modules/chains.nix;
zoned = module ./modules/zoned.nix;
snippets = module ./modules/snippets.nix;
default = snippets;
full = with nixpkgs.lib; let
msg = concatStringsSep " " [
"The nixos-nftables-firewall 'full' module has been deprecated,"
"please use the 'default' module instead."
];
in
{...}: warn msg {imports = [default];};
};
checks.x86_64-linux = import ./checks "x86_64-linux" flakes;
formatter = nixpkgs.lib.mapAttrs (_: x: x.alejandra) nixpkgs.legacyPackages;
packages = with nixpkgs.lib;
genAttrs systems.flakeExposed (system: let
pkgs = import nixpkgs {
inherit system;
overlays = [(import ./docs flakes)];
};
in {
docs = pkgs.nixos-nftables-firewall-docs;
});
};
}