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