Add user-defined ip-patch
This commit is contained in:
parent
2fe1b3c9c4
commit
3faa9516bc
@ -63,6 +63,7 @@
|
||||
./not-os-patches/pr-33.patch
|
||||
./not-os-patches/pr-34.patch
|
||||
./not-os-patches/iproute2.patch
|
||||
./not-os-patches/user_defined_ip_settings.patch
|
||||
];
|
||||
};
|
||||
|
||||
|
42
not-os-patches/user_defined_ip_settings.patch
Normal file
42
not-os-patches/user_defined_ip_settings.patch
Normal file
@ -0,0 +1,42 @@
|
||||
diff --git a/runit.nix b/runit.nix
|
||||
index 14dd437..982823d 100644
|
||||
--- a/runit.nix
|
||||
+++ b/runit.nix
|
||||
@@ -36,6 +36,10 @@ in
|
||||
ip route add 103.206.98.200/29 dev eth0
|
||||
ip route add default via 103.206.98.200 dev eth0
|
||||
''}
|
||||
+
|
||||
+ # Setup IP Address
|
||||
+ /etc/ip_setup
|
||||
+
|
||||
mkdir /bin/
|
||||
ln -s ${pkgs.runtimeShell} /bin/sh
|
||||
|
||||
diff --git a/zynq_image.nix b/zynq_image.nix
|
||||
index 979b760..0be26b2 100644
|
||||
--- a/zynq_image.nix
|
||||
+++ b/zynq_image.nix
|
||||
@@ -33,7 +33,7 @@ in {
|
||||
nixpkgs.system = "armv7l-linux";
|
||||
networking.hostName = "zynq";
|
||||
not-os.sd = true;
|
||||
- not-os.simpleStaticIp = true;
|
||||
+ not-os.simpleStaticIp = false;
|
||||
system.build.zynq_image = pkgs.runCommand "zynq_image" {
|
||||
preferLocalBuild = true;
|
||||
} ''
|
||||
@@ -60,6 +60,13 @@ in {
|
||||
mkdir -p /root/linien-server-log
|
||||
exec svlogd -tt /root/linien-server-log
|
||||
'';
|
||||
+ "ip_setup" = {
|
||||
+ text = ''
|
||||
+ ifconfig eth0 192.168.1.129 netmask 255.255.255.0
|
||||
+ ip link set eth0 up
|
||||
+ '';
|
||||
+ mode = "0762";
|
||||
+ };
|
||||
"pam.d/other".text = ''
|
||||
auth sufficient pam_permit.so
|
||||
account required pam_permit.so
|
Loading…
Reference in New Issue
Block a user