Guest User

sdCard.nix

a guest
Apr 25th, 2025
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. { config, lib, pkgs, inputs, outputs, modulesPath, ... }:
  2.  
  3. {
  4. imports = [
  5. inputs.nixos-hardware.nixosModules.raspberry-pi-4
  6. (modulesPath + "/installer/sd-card/sd-image-aarch64.nix")
  7. ];
  8.  
  9. nixpkgs.overlays = [
  10. (final: super: {
  11. makeModulesClosure = x:
  12. super.makeModulesClosure (x // { allowMissing = true; });
  13. })
  14. ];
  15.  
  16. boot.kernelPackages = lib.mkForce pkgs.linuxKernel.packages.linux_rpi4;
  17. boot.supportedFilesystems = lib.mkForce [ "vfat" ];
  18.  
  19. sdImage.compressImage = false;
  20.  
  21. networking.hostName = "nixos-pi";
  22.  
  23. services.openssh.enable = true;
  24. security.sudo.wheelNeedsPassword = false;
  25. users.users.Coolio = {
  26. isNormalUser = true;
  27. initialPassword = "hunter2";
  28. extraGroups = [ "wheel" ];
  29. openssh.authorizedKeys.keys = [
  30. {public-ssh-key-here}
  31. ];
  32. };
  33.  
  34. system.stateVersion = "24.11";
  35. nixpkgs.hostPlatform = "aarch64-linux";
  36. }
  37.  
Advertisement
Add Comment
Please, Sign In to add comment