Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [root@nixos:~]# cat /etc/nixos/configuration.nix
- { config, pkgs, lib, ... }:
- {
- # NixOS wants to enable GRUB by default
- boot.loader.grub.enable = false;
- # Enables the generation of /boot/extlinux/extlinux.conf
- boot.loader.generic-extlinux-compatible.enable = true;
- # !!! If your board is a Raspberry Pi 1, select this:
- # boot.kernelPackages = pkgs.linuxPackages_rpi;
- # !!! Otherwise (even if you have a Raspberry Pi 2 or 3), pick this:
- boot.kernelPackages = pkgs.linuxPackages_latest;
- # !!! This is only for ARMv6 / ARMv7. Don't enable this on AArch64, cache.nixos.org works there.
- nix.binaryCaches = lib.mkForce [ "http://nixos-arm.dezgeg.me/channel" ];
- nix.binaryCachePublicKeys = [ "nixos-arm.dezgeg.me-1:xBaUKS3n17BZPKeyxL4JfbTqECsT+ysbDJz29kLFRW0=%" ];
- # !!! Needed for the virtual console to work on the RPi 3, as the default of 16M doesn't seem to be enough.
- boot.kernelParams = ["cma=32M"];
- # File systems configuration for using the installer's partition layout
- fileSystems = {
- "/boot" = {
- device = "/dev/disk/by-label/NIXOS_BOOT";
- fsType = "vfat";
- };
- "/" = {
- device = "/dev/disk/by-label/NIXOS_SD";
- fsType = "ext4";
- };
- };
- # !!! Adding a swap file is optional, but strongly recommended!
- # swapDevices = [ { device = "/swapfile"; size = 1024; } ];
- networking.hostName = "nixpie";
- time.timeZone = "Europe/Amsterdam";
- services.avahi = {
- enable = true;
- publish.enable = true;
- publish.addresses = true;
- publish.userServices = true;
- nssmdns = true;
- interfaces = ["eth0" ];
- };
- environment.systemPackages = with pkgs; [
- wget vim
- ];
- services.openssh.enable = true;
- users.extraUsers.michaelk = {
- isNormalUser = true;
- uid = 1000;
- };
- services.xserver.enable = true;
- services.xserver.layout = "us";
- services.xserver.xkbOptions = "eurosign:e";
- services.xserver.desktopManager.xfce.enable = true;
- services.xserver.displayManager.auto = {
- enable = true;
- user = "michaelk";
- };
- services.xserver.inputClassSections = [
- ''
- Identifier "calibration"
- MatchProduct "eGalax Inc."
- Option "Calibration" "1522 191 362 1556"
- Option "SwapAxes" "1"
- Option "InvertX" "1"
- Option "InvertY" "1"
- '' ];
- services.xserver.videoDrivers = [ "modesetting" ];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement