Skip to content
This repository was archived by the owner on Mar 23, 2025. It is now read-only.

Commit 7c3bce5

Browse files
committed
WIP first working version 🎉
1 parent 00eb75b commit 7c3bce5

File tree

2 files changed

+48
-8
lines changed

2 files changed

+48
-8
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/result

example/default.nix

Lines changed: 47 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
11
{ pkgs, lib, ... }: {
2-
time.timeZone = "America/New_York";
2+
3+
time.timeZone = "Europe/Berlin";
34
users.users.root.initialPassword = "root";
5+
users.users.root.openssh.authorizedKeys.keys = [
6+
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINpFo0kO4oIM3QUc71B2Iigx5YiGZdtTdTjnolCzb/LU manu@nix-framework"
7+
];
48
networking = {
5-
hostName = "example";
9+
hostName = "raspi-example";
610
useDHCP = false;
711
interfaces = {
812
wlan0.useDHCP = true;
913
eth0.useDHCP = true;
1014
};
1115
};
12-
raspberry-pi-nix.board = "bcm2711";
16+
raspberry-pi-nix.board = "bcm2711"; # Raspi 4 Model B
17+
# raspberry-pi-nix.kernelVersion = ;
18+
# boot.kernelPackages = lib.mkForce pkgs.linuxKernel.packages.linux_rpi4; # HACK https://github.com/nix-community/raspberry-pi-nix/issues/95#issuecomment-2533109995
19+
# boot.kernelPackages = lib.mkForce (lib.traceVal pkgs.rpi-kernels.v6_6_67.bcm2711); #
20+
1321
hardware = {
1422
raspberry-pi = {
1523
config = {
@@ -35,10 +43,41 @@
3543
};
3644
};
3745
security.rtkit.enable = true;
38-
services.pipewire = {
39-
enable = true;
40-
alsa.enable = true;
41-
alsa.support32Bit = true;
42-
pulse.enable = true;
46+
# services.pipewire = {
47+
# enable = true;
48+
# alsa.enable = true;
49+
# alsa.support32Bit = true;
50+
# pulse.enable = true;
51+
# };
52+
53+
54+
# bzip2 compression takes loads of time with emulation, skip it.
55+
sdImage.compressImage = false;
56+
# OpenSSH is forced to have an empty `wantedBy` on the installer system[1], this won't allow it
57+
# to be started. Override it with the normal value.
58+
# [1] https://github.com/NixOS/nixpkgs/blob/9e5aa25/nixos/modules/profiles/installation-device.nix#L76
59+
systemd.services.sshd.wantedBy = lib.mkOverride 40 [ "multi-user.target" ];
60+
# Enable OpenSSH out of the box.
61+
services.openssh.enable = true;
62+
63+
networking.wireless.enable = true;
64+
hardware.wirelessRegulatoryDatabase = true;
65+
boot.extraModprobeConfig = ''
66+
options cfg80211 ieee80211_regdom="DE"
67+
'';
68+
networking.localCommands = ''
69+
iw reg set DE
70+
iw dev wlan0 set power_save off
71+
'';
72+
# networking.wireless.powerSave = false; # HACK https://github.com/raspberrypi/linux/issues/6049
73+
# networking.wireless.wpa.supplicant.enable = true;
74+
networking.wireless.networks = {
75+
"Opa" = {
76+
psk = "8zeichen";
77+
};
78+
};
79+
80+
environment.etc = {
81+
nixos.source = ./..; # HACK add flake source
4382
};
4483
}

0 commit comments

Comments
 (0)