nix-scripts/rpi-etc-nixos/configuration.nix

47 lines
1.3 KiB
Nix
Raw Normal View History

{ config, pkgs, lib, ... }:
let
2019-08-17 10:27:25 +08:00
m-labs = import (fetchTarball https://nixbld.m-labs.hk/channel/custom/artiq/full/artiq-full/nixexprs.tar.xz) {};
in
{
boot.loader.grub.enable = false;
boot.loader.generic-extlinux-compatible.enable = true;
boot.kernelParams = ["cma=32M console=ttyS1,115200n8"];
fileSystems = {
"/" = {
device = "/dev/disk/by-label/NIXOS_SD";
fsType = "ext4";
};
};
services.openssh.enable = true;
networking.hostName = "rpi-1";
time.timeZone = "Asia/Hong_Kong";
users.extraGroups.plugdev = { };
2019-04-08 23:45:30 +08:00
security.sudo.wheelNeedsPassword = false;
users.extraUsers.sb = {
isNormalUser = true;
extraGroups = ["wheel" "plugdev" "dialout"];
};
2019-05-10 13:32:10 +08:00
users.extraUsers.astro = {
isNormalUser = true;
extraGroups = ["wheel" "plugdev" "dialout"];
};
2019-04-08 23:45:30 +08:00
users.extraUsers.nix = {
isNormalUser = true;
};
services.udev.packages = [ m-labs.openocd ];
documentation.enable = false;
environment.systemPackages = with pkgs; [
2019-10-21 18:28:14 +08:00
wget vim git usbutils lm_sensors file mosh tmux xc3sprog m-labs.openocd
];
nix.binaryCachePublicKeys = ["nixbld.m-labs.hk-1:5aSRVA5b320xbNvu30tqxVPXpld73bhtOeH6uAjRyHc="];
nix.binaryCaches = ["https://cache.nixos.org" "https://nixbld.m-labs.hk"];
2019-04-08 23:45:30 +08:00
nix.trustedUsers = ["root" "nix"];
}