From 44984fcdb24414567fcd563b1f6f664f5b009fc4 Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Sat, 20 Apr 2024 16:13:14 +0200 Subject: [PATCH] raspberry --- systems/benzaiten/default.nix | 2 ++ systems/default.nix | 1 + systems/raspberry4/default.nix | 36 ++++++++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 systems/raspberry4/default.nix diff --git a/systems/benzaiten/default.nix b/systems/benzaiten/default.nix index e3392ca..98c40bd 100644 --- a/systems/benzaiten/default.nix +++ b/systems/benzaiten/default.nix @@ -40,4 +40,6 @@ environment.systemPackages = with pkgs; [ mixxx ]; time.timeZone = "Europe/Berlin"; + + boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; } diff --git a/systems/default.nix b/systems/default.nix index e66f129..c80f36c 100644 --- a/systems/default.nix +++ b/systems/default.nix @@ -28,4 +28,5 @@ in hetzner = mkSystem "x86_64-unknown-linux-gnu" "hetzner"; zap = mkSystem "x86_64-unknown-linux-gnu" "zap"; pi4 = mkSystem "aarch64-unknown-linux-gnu" "pi4"; + raspberry4 = mkSystem "aarch64-unknown-linux-gnu" "raspberry4"; } diff --git a/systems/raspberry4/default.nix b/systems/raspberry4/default.nix new file mode 100644 index 0000000..cdbde21 --- /dev/null +++ b/systems/raspberry4/default.nix @@ -0,0 +1,36 @@ +{ modulesPath, lib, nixos-hardware, pkgs, ... }: + +{ + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + nixos-hardware.nixosModules.raspberry-pi-4 + ]; + + boot = { + initrd = { availableKernelModules = [ "xhci_pci" ]; }; + kernelPackages = pkgs.linuxPackages_latest; + }; + + boot.supportedFilesystems = lib.mkForce [ "btrfs" "cifs" "f2fs" "jfs" "ntfs" "reiserfs" "vfat" "xfs" "bchachefs" ]; + + #hardware.raspberry-pi."4".fkms-3d.enable = true; + + jopejoe1 = { + bluetooth.enable = true; + local.enable = true; + nix.enable = true; + user = { + jopejoe1.enable = true; + root.enable = true; + }; + ssh.enable = true; + }; + + networking = { + useDHCP = lib.mkDefault true; + }; + + services.openssh.settings.PermitRootLogin = lib.mkForce "yes"; + + powerManagement.cpuFreqGovernor = "ondemand"; +}