hswaw/machines: add tv2
Change-Id: I657c316bcc663c79b6886d5843b9de5cbf17f1c3
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1333
Reviewed-by: informatic <informatic@hackerspace.pl>
diff --git a/hswaw/machines/customs.hackerspace.pl/dhcpd.conf b/hswaw/machines/customs.hackerspace.pl/dhcpd.conf
index e6bb6e1..4aa0fca 100644
--- a/hswaw/machines/customs.hackerspace.pl/dhcpd.conf
+++ b/hswaw/machines/customs.hackerspace.pl/dhcpd.conf
@@ -143,6 +143,10 @@
hardware ethernet dc:a6:32:b1:68:d7;
fixed-address 10.8.1.53;
}
+ host tv2 {
+ hardware ethernet dc:a6:32:b1:68:83;
+ fixed-address 10.8.1.54;
+ }
}
diff --git a/hswaw/machines/customs.hackerspace.pl/zones/waw.hackerspace.pl b/hswaw/machines/customs.hackerspace.pl/zones/waw.hackerspace.pl
index c8e1791..240fe0f 100644
--- a/hswaw/machines/customs.hackerspace.pl/zones/waw.hackerspace.pl
+++ b/hswaw/machines/customs.hackerspace.pl/zones/waw.hackerspace.pl
@@ -1,7 +1,7 @@
$ORIGIN .
$TTL 180
waw.hackerspace.pl IN SOA customs.hackerspace.pl. bofh.hackerspace.pl. (
- 1657053618; serial
+ 1657149584; serial
1800 ; refresh (30 minutes)
1800 ; retry (30 minutes)
604800 ; expire (1 week)
@@ -68,6 +68,7 @@
blitzloop A 10.8.1.51
tronxy A 10.8.1.52
tv1 A 10.8.1.53
+tv2 A 10.8.1.54
dht01api A 94.240.35.98
diff --git a/hswaw/machines/tv1.waw.hackerspace.pl/configuration.nix b/hswaw/machines/tv/common.nix
similarity index 88%
rename from hswaw/machines/tv1.waw.hackerspace.pl/configuration.nix
rename to hswaw/machines/tv/common.nix
index 9e103c4..c1b8e7c 100644
--- a/hswaw/machines/tv1.waw.hackerspace.pl/configuration.nix
+++ b/hswaw/machines/tv/common.nix
@@ -1,8 +1,4 @@
-# TV next to acr1. Raspberry Pi 4 with PoE hat.
-#
-# This is an aarch64 machine. You'll probably have to use a remote builder to
-# cross compile for it. See //ops/README.md for information about how to set
-# that up.
+# RPi4 as TV kiosk.
{ config, pkgs, ... }:
@@ -13,16 +9,26 @@
};
in {
- imports =
- [ # Include the results of the hardware scan.
- ./hardware-configuration.nix
- "${nixos-hardware}/raspberry-pi/4"
- ];
+ imports = [
+ "${nixos-hardware}/raspberry-pi/4"
+ ];
+ boot.initrd.availableKernelModules = [ "xhci_pci" "usbhid" ];
+ boot.initrd.kernelModules = [ ];
+ boot.kernelModules = [ ];
+ boot.extraModulePackages = [ ];
boot.loader.grub.enable = false;
boot.loader.generic-extlinux-compatible.enable = true;
+ powerManagement.cpuFreqGovernor = "ondemand";
- networking.hostName = "tv1";
+ networking.useDHCP = true;
+
+ swapDevices = [ ];
+ fileSystems."/" =
+ { device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888";
+ fsType = "ext4";
+ };
+
networking.domain = "waw.hackerspace.pl";
time.timeZone = "Europe/Warsaw";
@@ -32,7 +38,6 @@
})
];
- # Enable sound.
sound.enable = true;
services.pipewire = {
enable = true;
@@ -66,7 +71,6 @@
};
};
-
users.users.root = {
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG599UildOrAq+LIOQjKqtGMwjgjIxozI1jtQQRKHtCP q3k@mimeomia"
@@ -108,7 +112,7 @@
firefox foot wayvnc
vim rxvt-unicode-unwrapped.terminfo
- alacritty
+ alacritty foot
wayland glib dracula-theme gnome3.adwaita-icon-theme
swaylock swayidle grim slurp wl-clipboard bemenu mako
];
@@ -116,6 +120,4 @@
services.openssh.enable = true;
system.stateVersion = "22.05"; # Did you read the comment?
-
}
-
diff --git a/hswaw/machines/tv1.waw.hackerspace.pl/signage.nix b/hswaw/machines/tv/signage.nix
similarity index 100%
rename from hswaw/machines/tv1.waw.hackerspace.pl/signage.nix
rename to hswaw/machines/tv/signage.nix
diff --git a/hswaw/machines/tv/tv1.nix b/hswaw/machines/tv/tv1.nix
new file mode 100644
index 0000000..171c30b
--- /dev/null
+++ b/hswaw/machines/tv/tv1.nix
@@ -0,0 +1,13 @@
+# TV next to acr1. Raspberry Pi 4 with PoE hat.
+#
+# This is an aarch64 machine. You'll probably have to use a remote builder to
+# cross compile for it. See //ops/README.md for information about how to set
+# that up.
+
+{ config, pkgs, ... }: {
+ imports = [
+ ./common.nix
+ ];
+
+ networking.hostName = "tv1";
+}
diff --git a/hswaw/machines/tv/tv2.nix b/hswaw/machines/tv/tv2.nix
new file mode 100644
index 0000000..607747d
--- /dev/null
+++ b/hswaw/machines/tv/tv2.nix
@@ -0,0 +1,13 @@
+# TV next to kitchen. Raspberry Pi 4 with PoE hat.
+#
+# This is an aarch64 machine. You'll probably have to use a remote builder to
+# cross compile for it. See //ops/README.md for information about how to set
+# that up.
+
+{ config, pkgs, ... }: {
+ imports = [
+ ./common.nix
+ ];
+
+ networking.hostName = "tv2";
+}
diff --git a/hswaw/machines/tv1.waw.hackerspace.pl/hardware-configuration.nix b/hswaw/machines/tv1.waw.hackerspace.pl/hardware-configuration.nix
deleted file mode 100644
index 29f0ae7..0000000
--- a/hswaw/machines/tv1.waw.hackerspace.pl/hardware-configuration.nix
+++ /dev/null
@@ -1,32 +0,0 @@
-# Do not modify this file! It was generated by ‘nixos-generate-config’
-# and may be overwritten by future invocations. Please make changes
-# to /etc/nixos/configuration.nix instead.
-{ config, lib, pkgs, modulesPath, ... }:
-
-{
- imports =
- [ (modulesPath + "/installer/scan/not-detected.nix")
- ];
-
- boot.initrd.availableKernelModules = [ "xhci_pci" "usbhid" ];
- boot.initrd.kernelModules = [ ];
- boot.kernelModules = [ ];
- boot.extraModulePackages = [ ];
-
- fileSystems."/" =
- { device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888";
- fsType = "ext4";
- };
-
- swapDevices = [ ];
-
- # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
- # (the default) this is the recommended approach. When using systemd-networkd it's
- # still possible to use this option, but it's recommended to use it in conjunction
- # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
- networking.useDHCP = lib.mkDefault true;
- # networking.interfaces.eth0.useDHCP = lib.mkDefault true;
- # networking.interfaces.wlan0.useDHCP = lib.mkDefault true;
-
- powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
-}
diff --git a/ops/machines.nix b/ops/machines.nix
index 5a7d3d7..6a95573 100644
--- a/ops/machines.nix
+++ b/ops/machines.nix
@@ -157,7 +157,10 @@
../hswaw/machines/customs.hackerspace.pl/configuration.nix
];
"tv1.waw.hackerspace.pl" = mkMachine self pkgsArm [
- ../hswaw/machines/tv1.waw.hackerspace.pl/configuration.nix
+ ../hswaw/machines/tv/tv1.nix
+ ];
+ "tv2.waw.hackerspace.pl" = mkMachine self pkgsArm [
+ ../hswaw/machines/tv/tv2.nix
];
};