|
1 | 1 | { pkgs, lib, ... }: { |
2 | | - time.timeZone = "America/New_York"; |
| 2 | + |
| 3 | + time.timeZone = "Europe/Berlin"; |
3 | 4 | users.users.root.initialPassword = "root"; |
| 5 | + users.users.root.openssh.authorizedKeys.keys = [ |
| 6 | + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINpFo0kO4oIM3QUc71B2Iigx5YiGZdtTdTjnolCzb/LU manu@nix-framework" |
| 7 | + ]; |
4 | 8 | networking = { |
5 | | - hostName = "example"; |
| 9 | + hostName = "raspi-example"; |
6 | 10 | useDHCP = false; |
7 | 11 | interfaces = { |
8 | 12 | wlan0.useDHCP = true; |
9 | 13 | eth0.useDHCP = true; |
10 | 14 | }; |
11 | 15 | }; |
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 | + |
13 | 21 | hardware = { |
14 | 22 | raspberry-pi = { |
15 | 23 | config = { |
|
35 | 43 | }; |
36 | 44 | }; |
37 | 45 | 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 |
43 | 82 | }; |
44 | 83 | } |
0 commit comments