Skip to content

Commit 2cd5f85

Browse files
hosts.nix
1 parent c156736 commit 2cd5f85

File tree

4 files changed

+25
-0
lines changed

4 files changed

+25
-0
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ hosts:
2424
cp ./modules/hosts.nix ./laptops/t14/hosts.nix
2525

2626
cp ./modules/hosts.nix ./arm/pi5-1-os/hosts.nix
27+
cp ./modules/hosts.nix ./chromebox/chromebox3/hosts.nix
2728

2829
#all: hp0 hp1 hp2 hp3 hp4 hp5
2930

chromebox/chromebox3/Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ rebuild:
2424
sudo nix-channel --update;
2525
sudo nixos-rebuild switch --flake .
2626

27+
try:
28+
#nix run github:nix-community/nixos-anywhere -- --flake '.#chromebox3' --target-host root@chromebox3
29+
nix run github:nix-community/nixos-anywhere -- --flake '.#chromebox3' --target-host root@chromebox3
30+
31+
gen_hardware:
32+
nix run github:numtide/nixos-anywhere -- -f '.#chromebox3' --generate-hardware-config nixos-generate-config ./hardware-configuration.nix
33+
2734
# minutes 10:58
2835
# https://www.youtube.com/watch?v=U_UwzMhixr8
2936
vmtest:

chromebox/chromebox3/configuration.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
./sysctl.nix
2222
./il8n.nix
2323
./systemPackages.nix
24+
./hosts.nix
2425
./nodeExporter.nix
2526
./docker-daemon.nix
2627
#./k8s_master.nix

chromebox/chromebox3/hosts.nix

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{ config, pkgs, ... }:
2+
3+
{
4+
networking.hosts = {
5+
"172.16.40.198" = ["hp0" "hp0eth"]; # adi's room
6+
"172.16.40.141" = ["hp0wifi"];
7+
"172.16.40.142" = ["hp1" "hp1eth"];
8+
"172.16.40.212" = ["hp2" "hp2eth"];
9+
"172.16.40.146" = ["hp3" "hp3eth"]; # savi's room
10+
"172.16.40.130" = ["hp3wifi"];
11+
"172.16.50.232" = ["hp4" "hp4eth"]; # rack
12+
"172.16.40.70" = ["hp5" "hp5eth"];
13+
"172.16.40.122" = ["pi5-1" "pi5-1-eth"];
14+
"172.16.40.62" = ["chromebox3" "chromebox3-eth"];
15+
};
16+
}

0 commit comments

Comments
 (0)