diff --git a/flake.nix b/flake.nix index e1c2d0a..9fc6e02 100644 --- a/flake.nix +++ b/flake.nix @@ -24,6 +24,10 @@ system = "aarch64-linux"; modules = [ ./machines/storage/s0/configuration.nix ]; }; + "n1" = nixpkgs.lib.nixosSystem { + system = "aarch64-linux"; + modules = [ ./machines/compute/n1/configuration.nix ]; + }; }; }; } diff --git a/machines/compute/common.nix b/machines/compute/common.nix new file mode 100644 index 0000000..8130a71 --- /dev/null +++ b/machines/compute/common.nix @@ -0,0 +1,16 @@ +{ config, ... }: + +{ + imports = [ + ../../common/common.nix + ]; + + nix.flakes.enable = true; + + networking.interfaces.eth0.useDHCP = true; + + hardware.deviceTree.enable = true; + hardware.deviceTree.overlays = [ + ./sopine-baseboard-ethernet.dtbo # fix pine64 clusterboard ethernet + ]; +} \ No newline at end of file diff --git a/machines/compute/n1/configuration.nix b/machines/compute/n1/configuration.nix new file mode 100644 index 0000000..0803930 --- /dev/null +++ b/machines/compute/n1/configuration.nix @@ -0,0 +1,9 @@ +{ config, ... }: + +{ + imports = [ + ../common.nix + ]; + + networking.hostName = "n1"; +} \ No newline at end of file diff --git a/machines/compute/sopine-baseboard-ethernet.dtbo b/machines/compute/sopine-baseboard-ethernet.dtbo new file mode 100644 index 0000000..aad9bc9 Binary files /dev/null and b/machines/compute/sopine-baseboard-ethernet.dtbo differ diff --git a/machines/compute/sopine-baseboard-ethernet.dts b/machines/compute/sopine-baseboard-ethernet.dts new file mode 100644 index 0000000..0644c18 --- /dev/null +++ b/machines/compute/sopine-baseboard-ethernet.dts @@ -0,0 +1,15 @@ +/dts-v1/; + +/ { + model = "SoPine with baseboard"; + compatible = "pine64,sopine-baseboard\0pine64,sopine\0allwinner,sun50i-a64"; + + fragment@0 { +/* target = <ðernet@1c30000>; */ + target-path = "/soc/ethernet@1c30000"; + __overlay__ { + allwinner,tx-delay-ps = <500>; + }; + }; + +};