2023-05-23 17:12:31 +02:00
|
|
|
{ nixpkgs, nixos-hardware, ... }:
|
2023-04-10 23:25:25 +02:00
|
|
|
{ pkgs, ... }:
|
2023-02-28 13:31:47 +01:00
|
|
|
{
|
|
|
|
imports = [
|
|
|
|
"${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix"
|
2023-05-23 17:12:31 +02:00
|
|
|
nixos-hardware.nixosModules.raspberry-pi-4
|
2023-02-28 13:31:47 +01:00
|
|
|
|
|
|
|
../../users/root
|
|
|
|
../../users/erwin
|
2023-05-25 08:01:53 +02:00
|
|
|
./home.nix
|
2023-02-28 13:31:47 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
eboskma = {
|
2023-04-10 23:25:25 +02:00
|
|
|
users.erwin = {
|
|
|
|
enable = true;
|
|
|
|
server = true;
|
|
|
|
};
|
|
|
|
klipper.enable = true;
|
2023-02-28 13:31:47 +01:00
|
|
|
networking.enable = true;
|
|
|
|
nix-common.enable = true;
|
|
|
|
systemd.enable = true;
|
|
|
|
};
|
|
|
|
|
2023-05-25 08:01:53 +02:00
|
|
|
# nixpkgs.crossSystem.system = "aarch64-linux";
|
2023-04-10 23:25:25 +02:00
|
|
|
|
2023-02-28 13:31:47 +01:00
|
|
|
hardware = {
|
2023-04-10 23:25:25 +02:00
|
|
|
enableAllFirmware = true; # This also sets hardware.enableRedistributableFirmware
|
2023-05-23 17:12:31 +02:00
|
|
|
raspberry-pi."4".fkms-3d = {
|
|
|
|
enable = true;
|
|
|
|
cma = 256;
|
|
|
|
};
|
2023-04-10 23:25:25 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
boot = {
|
2023-05-23 17:12:31 +02:00
|
|
|
bootspec.enable = true;
|
2023-05-25 08:01:53 +02:00
|
|
|
kernelPackages = pkgs.linuxPackages_rpi4;
|
2023-02-28 13:31:47 +01:00
|
|
|
};
|
|
|
|
|
2023-04-10 23:25:25 +02:00
|
|
|
zramSwap.enable = true;
|
|
|
|
|
|
|
|
sdImage.compressImage = false;
|
|
|
|
|
2023-02-28 13:31:47 +01:00
|
|
|
networking = {
|
|
|
|
hostName = "regin";
|
2023-04-10 23:25:25 +02:00
|
|
|
useDHCP = true;
|
2023-02-28 13:31:47 +01:00
|
|
|
useNetworkd = true;
|
2023-04-10 23:25:25 +02:00
|
|
|
wireless.enable = true;
|
2023-02-28 13:31:47 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
systemd.network = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
networks = {
|
|
|
|
"40-eth0" = {
|
|
|
|
DHCP = "yes";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
services.openssh.enable = true;
|
2023-05-23 17:12:31 +02:00
|
|
|
services.tailscale.enable = true;
|
2023-02-28 13:31:47 +01:00
|
|
|
|
|
|
|
security = {
|
|
|
|
polkit.enable = true;
|
|
|
|
};
|
|
|
|
environment.systemPackages = with pkgs; [
|
2023-04-10 23:25:25 +02:00
|
|
|
libraspberrypi
|
2023-02-28 13:31:47 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
system.stateVersion = "23.05";
|
|
|
|
}
|