Skip to content

Commit b2690b1

Browse files
committed
feat(nixos): vzbot235 and CI changes
1 parent 208b6b4 commit b2690b1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+2396
-405
lines changed
+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Build aarch64 host
2+
on:
3+
workflow_call:
4+
inputs:
5+
configuration:
6+
required: true
7+
type: string
8+
secrets:
9+
CACHIX_AUTH_TOKEN:
10+
required: true
11+
jobs:
12+
build_system:
13+
runs-on: ubuntu-22.04-arm
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v3
17+
- name: Install Nix
18+
uses: cachix/install-nix-action@v30
19+
with:
20+
nix_path: nixpkgs=channel:nixos-24.11
21+
extra_nix_config: |
22+
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
23+
- uses: cachix/cachix-action@v15
24+
with:
25+
name: truelecter
26+
extraPullNames: cuda-maintainers, mic92, nix-community, nrdxp
27+
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
28+
- name: Build system configuration
29+
run: |
30+
nix build ".#nixosConfigurations.${{ inputs.configuration }}.config.system.build.toplevel"

.github/workflows/build-oracle.yaml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Build oracle
2+
on:
3+
push:
4+
workflow_dispatch:
5+
6+
jobs:
7+
call-workflow-passing-data:
8+
uses: ./.github/workflows/build-aarch64-host.yaml
9+
with:
10+
configuration: oracle
11+
secrets: inherit

.github/workflows/build-voron.yaml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Build voron
2+
on:
3+
push:
4+
workflow_dispatch:
5+
6+
jobs:
7+
call-workflow-passing-data:
8+
uses: ./.github/workflows/build-aarch64-host.yaml
9+
with:
10+
configuration: voron
11+
secrets: inherit

.github/workflows/build-vzbot235.yaml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Build vzbot235
2+
on:
3+
push:
4+
workflow_dispatch:
5+
6+
jobs:
7+
call-workflow-passing-data:
8+
uses: ./.github/workflows/build-aarch64-host.yaml
9+
with:
10+
configuration: vzbot235
11+
secrets: inherit

.github/workflows/build-x86-devshell.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55

66
jobs:
77
build_shell:
8-
runs-on: ubuntu-latest
8+
runs-on: ubuntu-22.04
99
steps:
1010
- name: Checkout repository
1111
uses: actions/checkout@v3

.github/workflows/build-x86-host.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
required: true
1111
jobs:
1212
build_system:
13-
runs-on: ubuntu-latest
13+
runs-on: ubuntu-22.04
1414
steps:
1515
- name: Checkout repository
1616
uses: actions/checkout@v3

.sops.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ keys:
1414
- &print-farm 3901b2e5705df031bb41338c5ba8634804f9940d
1515
- &sirius age1vpflrapt4lz5akw8jcft6lhhq0h26ptjq6ce8da27gzuvfdmtqvs8rk8h6
1616
- &nas 70732b3ee3a1c10a8b6b849a959a413b28c00df9
17+
- &vzbot235 age1whtmnnc0ar8u0htwayr4qkukeyq05jt397prfzkkak0aec29ystsyfzdkt
1718

1819
creation_rules:
1920
- path_regex: cells/secrets/sops/envs.yaml
@@ -44,6 +45,7 @@ creation_rules:
4445
- *print-farm
4546
age:
4647
- *sirius
48+
- *vzbot235
4749

4850
- path_regex: cells/secrets/sops/k3s.yaml
4951
key_groups:
@@ -71,6 +73,7 @@ creation_rules:
7173
- *nas
7274
age:
7375
- *sirius
76+
- *vzbot235
7477

7578
- path_regex: cells/secrets/sops/ssh.*$
7679
key_groups:

cells/darwin/darwinProfiles/system-preferences/dock.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
dashboard-in-overlay = false;
77
enable-spring-load-actions-on-all-items = false;
88
expose-animation-duration = 0.1;
9-
expose-group-by-app = true;
9+
expose-group-apps = true;
1010
launchanim = false;
1111
mineffect = "genie";
1212
minimize-to-application = true;

cells/nixos/hosts/voron/klipper/configs/klipper.d/main.cfg

-2
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,3 @@ max_z_velocity: 20
3535
max_z_accel: 350
3636
square_corner_velocity: 20.0
3737
minimum_cruise_ratio: 0.3
38-
39-
[respond]

cells/nixos/hosts/voron/wifi.nix

+14-50
Original file line numberDiff line numberDiff line change
@@ -9,63 +9,27 @@
99
networking.wireless = {
1010
enable = true;
1111
interfaces = ["wlan0"];
12-
networks."Xata290" = {
13-
psk = "@WIFI_PASSWORD@";
14-
priority = 5;
15-
};
16-
networks."Xata290.5" = {
17-
psk = "@WIFI_PASSWORD@";
18-
priority = 10;
12+
13+
networks = {
14+
"Xata290.5" = {
15+
pskRaw = "ext:WIFI_PASSWORD";
16+
priority = 10;
17+
};
18+
19+
"Xata290" = {
20+
pskRaw = "ext:WIFI_PASSWORD";
21+
priority = 5;
22+
};
1923
};
20-
environmentFile = config.sops.secrets.xata-password-env.path;
24+
25+
secretsFile = config.sops.secrets.xata-password-env.path;
2126
extraConfig = ''
2227
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wifi
23-
country=UA
28+
country=US
2429
update_config=1
2530
'';
2631
};
2732

28-
# TODO: make it possible to choose between ant1,ant2 and noant, make PR to nixos-hardware
29-
hardware = {
30-
deviceTree = {
31-
overlays = [
32-
# Equivalent to dtparam=ant2
33-
{
34-
name = "choose-antenna";
35-
dtsText = ''
36-
/dts-v1/;
37-
/plugin/;
38-
/ {
39-
compatible = "brcm,bcm2711";
40-
fragment@0 {
41-
// Despite this being ant1 instead of ant2,
42-
// CM4 will use external antenna. This is because
43-
// ant1 is enabled by default and switching
44-
// GPIO pins causes it to activate external antenna
45-
target = <&ant1>;
46-
47-
__overlay__ {
48-
gpios = <7 0>;
49-
};
50-
};
51-
52-
fragment@1 {
53-
target = <&ant2>;
54-
55-
__overlay__ {
56-
// output-low is still present here
57-
gpios = <3 0>;
58-
};
59-
};
60-
};
61-
'';
62-
}
63-
];
64-
};
65-
enableRedistributableFirmware = lib.mkForce false;
66-
firmware = [pkgs.raspberrypiWirelessFirmware];
67-
};
68-
6933
boot = {
7034
extraModprobeConfig = ''
7135
options cfg80211 ieee80211_regdom="UA"

cells/nixos/hosts/vzbot235/NOTE.md

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# CM4 with Waveshare 5" DSI on Manta M8P 1.0
2+
3+
There are some modifications to configs needed. For CM4 with Waveshare DSI crucial are:
4+
5+
- DONE: add dtparam=ant2 (this may be done with overlays instead, may be)
6+
- add start_x=1
7+
- dt_blob.bin for DSI1
8+
9+
The example of latest known working config.txt
10+
11+
```ini
12+
[pi3]
13+
kernel=u-boot-rpi3.bin
14+
15+
[pi02]
16+
kernel=u-boot-rpi3.bin
17+
18+
[pi4]
19+
kernel=u-boot-rpi4.bin
20+
enable_gic=1
21+
armstub=armstub8-gic.bin
22+
23+
# Otherwise the resolution will be weird in most cases, compared to
24+
# what the pi3 firmware does by default.
25+
disable_overscan=1
26+
27+
# Supported in newer board revisions
28+
arm_boost=1
29+
30+
[cm4]
31+
# Enable host mode on the 2711 built-in XHCI USB controller.
32+
# This line should be removed if the legacy DWC2 controller is required
33+
# (e.g. for USB device mode) or if USB support is not required.
34+
# otg_mode=1
35+
36+
[all]
37+
# Boot in 64-bit mode.
38+
arm_64bit=1
39+
40+
# U-Boot needs this to work, regardless of whether UART is actually used or not.
41+
# Look in arch/arm/mach-bcm283x/Kconfig in the U-Boot tree to see if this is still
42+
# a requirement in the future.
43+
enable_uart=1
44+
45+
# Prevent the firmware from smashing the framebuffer setup done by the mainline kernel
46+
# when attempting to show low-voltage or overtemperature warnings.
47+
avoid_warnings=1
48+
49+
start_x=1
50+
dtparam=ant2
51+
```
+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{
2+
inputs,
3+
suites,
4+
profiles,
5+
...
6+
}: let
7+
system = "aarch64-linux";
8+
in {
9+
imports = [
10+
suites.base
11+
12+
profiles.common.networking.tailscale
13+
profiles.faster-linux
14+
profiles.minimize
15+
16+
inputs.cells.klipper.nixosModules.klipper
17+
inputs.cells.secrets.nixosProfiles.wifi
18+
19+
inputs.nixos-hardware.nixosModules.raspberry-pi-4
20+
21+
./hardware-configuration.nix
22+
./klipper
23+
./network.nix
24+
./wifi.nix
25+
];
26+
27+
bee.system = system;
28+
bee.home = inputs.home;
29+
bee.pkgs = import inputs.nixos {
30+
inherit system;
31+
config.allowUnfree = true;
32+
overlays = [
33+
inputs.cells.rpi.overlays.kernel
34+
inputs.cells.rpi.overlays.dtmerge
35+
36+
inputs.cells.klipper.overlays.klipper
37+
];
38+
};
39+
40+
networking = {
41+
hostName = "vzbot235";
42+
firewall.enable = false;
43+
};
44+
45+
system.stateVersion = "24.11";
46+
47+
users.users.truelecter = {
48+
extraGroups = ["video" "gpio"];
49+
};
50+
51+
nix.settings = {
52+
keep-outputs = false;
53+
keep-derivations = false;
54+
system-features = [];
55+
};
56+
}

0 commit comments

Comments
 (0)