Advertisement
Guest User

Untitled

a guest
Oct 7th, 2018
403
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.36 KB | None | 0 0
  1. [root@nixos:~]# cat /etc/nixos/configuration.nix
  2. { config, pkgs, lib, ... }:
  3. {
  4. # NixOS wants to enable GRUB by default
  5. boot.loader.grub.enable = false;
  6. # Enables the generation of /boot/extlinux/extlinux.conf
  7. boot.loader.generic-extlinux-compatible.enable = true;
  8.  
  9. # !!! If your board is a Raspberry Pi 1, select this:
  10. # boot.kernelPackages = pkgs.linuxPackages_rpi;
  11. # !!! Otherwise (even if you have a Raspberry Pi 2 or 3), pick this:
  12. boot.kernelPackages = pkgs.linuxPackages_latest;
  13.  
  14. # !!! This is only for ARMv6 / ARMv7. Don't enable this on AArch64, cache.nixos.org works there.
  15. nix.binaryCaches = lib.mkForce [ "http://nixos-arm.dezgeg.me/channel" ];
  16. nix.binaryCachePublicKeys = [ "nixos-arm.dezgeg.me-1:xBaUKS3n17BZPKeyxL4JfbTqECsT+ysbDJz29kLFRW0=%" ];
  17.  
  18. # !!! Needed for the virtual console to work on the RPi 3, as the default of 16M doesn't seem to be enough.
  19. boot.kernelParams = ["cma=32M"];
  20.  
  21. # File systems configuration for using the installer's partition layout
  22. fileSystems = {
  23. "/boot" = {
  24. device = "/dev/disk/by-label/NIXOS_BOOT";
  25. fsType = "vfat";
  26. };
  27. "/" = {
  28. device = "/dev/disk/by-label/NIXOS_SD";
  29. fsType = "ext4";
  30. };
  31. };
  32.  
  33. # !!! Adding a swap file is optional, but strongly recommended!
  34. # swapDevices = [ { device = "/swapfile"; size = 1024; } ];
  35.  
  36. networking.hostName = "nixpie";
  37.  
  38. time.timeZone = "Europe/Amsterdam";
  39.  
  40. services.avahi = {
  41. enable = true;
  42. publish.enable = true;
  43. publish.addresses = true;
  44. publish.userServices = true;
  45.  
  46. nssmdns = true;
  47. interfaces = ["eth0" ];
  48. };
  49.  
  50. environment.systemPackages = with pkgs; [
  51. wget vim
  52. ];
  53.  
  54. services.openssh.enable = true;
  55.  
  56. users.extraUsers.michaelk = {
  57. isNormalUser = true;
  58. uid = 1000;
  59. };
  60.  
  61. services.xserver.enable = true;
  62. services.xserver.layout = "us";
  63. services.xserver.xkbOptions = "eurosign:e";
  64.  
  65. services.xserver.desktopManager.xfce.enable = true;
  66.  
  67. services.xserver.displayManager.auto = {
  68. enable = true;
  69. user = "michaelk";
  70. };
  71.  
  72. services.xserver.inputClassSections = [
  73. ''
  74. Identifier "calibration"
  75. MatchProduct "eGalax Inc."
  76. Option "Calibration" "1522 191 362 1556"
  77. Option "SwapAxes" "1"
  78. Option "InvertX" "1"
  79. Option "InvertY" "1"
  80. '' ];
  81.  
  82. services.xserver.videoDrivers = [ "modesetting" ];
  83.  
  84. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement