You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.3KB

  1. { config, pkgs, lib, ... }:
  2. let
  3. m-labs = import (fetchTarball https://nixbld.m-labs.hk/channel/custom/artiq/full/artiq-full/nixexprs.tar.xz) {};
  4. in
  5. {
  6. boot.loader.grub.enable = false;
  7. boot.loader.generic-extlinux-compatible.enable = true;
  8. boot.kernelParams = ["cma=32M console=ttyS1,115200n8"];
  9. fileSystems = {
  10. "/boot" = {
  11. device = "/dev/disk/by-label/NIXOS_BOOT";
  12. fsType = "vfat";
  13. };
  14. "/" = {
  15. device = "/dev/disk/by-label/NIXOS_SD";
  16. fsType = "ext4";
  17. };
  18. };
  19. services.openssh.enable = true;
  20. networking.hostName = "rpi-1";
  21. time.timeZone = "Asia/Hong_Kong";
  22. users.extraGroups.plugdev = { };
  23. security.sudo.wheelNeedsPassword = false;
  24. users.extraUsers.sb = {
  25. isNormalUser = true;
  26. extraGroups = ["wheel" "plugdev" "dialout"];
  27. };
  28. users.extraUsers.astro = {
  29. isNormalUser = true;
  30. extraGroups = ["wheel" "plugdev" "dialout"];
  31. };
  32. users.extraUsers.nix = {
  33. isNormalUser = true;
  34. };
  35. services.udev.packages = [ m-labs.openocd ];
  36. documentation.enable = false;
  37. environment.systemPackages = with pkgs; [
  38. wget vim git usbutils mosh tmux xc3sprog m-labs.openocd
  39. ];
  40. nix.binaryCachePublicKeys = ["nixbld.m-labs.hk-1:5aSRVA5b320xbNvu30tqxVPXpld73bhtOeH6uAjRyHc="];
  41. nix.binaryCaches = ["https://cache.nixos.org" "https://nixbld.m-labs.hk"];
  42. nix.trustedUsers = ["root" "nix"];
  43. }