]> Git — Sourcephile - julm/julm-nix.git/blob - hosts/blackberry/pixiecore.nix
blackberry: wireshark: enable
[julm/julm-nix.git] / hosts / blackberry / pixiecore.nix
1 { pkgs, lib, config, inputs, modulesPath, ... }@args:
2 let
3 pixiecore = config.services.pixiecore;
4 nixos = import ../minimal.nix
5 (args // {
6 modules = [ (modulesPath + "/installer/netboot/netboot-minimal.nix") ];
7 });
8 build = nixos.config.system.build;
9 in
10 {
11 services.pixiecore = {
12 enable = true;
13 mode = "boot";
14 debug = true;
15 dhcpNoBind = false;
16 port = 64172;
17 statusPort = 64172;
18 kernel = "${build.kernel}/bzImage";
19 initrd = "${build.netbootRamdisk}/initrd";
20 cmdLine = "init=${build.toplevel}/init loglevel=4";
21 extraArguments = [];
22 };
23 networking.nftables.ruleset = ''
24 table inet filter {
25 chain input-lan {
26 udp dport 67 counter accept comment "Pixiecore/DHCP"
27 udp dport 69 counter accept comment "Pixiecore/TFTP"
28 udp dport 4011 counter accept comment "Pixiecore/ProxyDHCP"
29 tcp dport ${toString pixiecore.port} counter accept comment "Pixiecore"
30 tcp dport ${toString pixiecore.statusPort} counter accept comment "Pixiecore/status"
31 }
32 chain output-lan {
33 }
34 }
35 '';
36 }