1
0
Fork 0
mirror of https://github.com/NixOS/nixos-hardware synced 2024-12-02 07:49:43 +01:00
nixos-hardware/inversepath/usbarmory/default.nix
Yegor Timoshenko 3c9f432a71 treewide: modules -> profiles, separate dirs, list in README (#29)
Enforce proper naming: all paths are lowercase and hyphen-separated,
if there's a line of models (aspire, macbook-pro, thinkpad) it becomes
a subdirectory. Documentation for profiles is moved to README files in
respective directories.

Add an Org mode table that lists all available profiles and their paths.

Instead of fetching repo locally, use a Nix channel. Making hardware
profiles read-only should improve quality and amount of participation
long-term.
2017-12-22 17:17:00 +00:00

61 lines
1.9 KiB
Nix

{ pkgs, config, lib, ... }:
{
nix.binaryCaches = lib.mkForce [ "http://nixos-arm.dezgeg.me/channel" ];
nix.binaryCachePublicKeys = [ "nixos-arm.dezgeg.me-1:xBaUKS3n17BZPKeyxL4JfbTqECsT+ysbDJz29kLFRW0=%" ];
nixpkgs.config.packageOverrides = pkgs: rec {
linuxPackages_usbarmory = pkgs.recurseIntoAttrs (
pkgs.linuxPackagesFor (
pkgs.buildLinux rec {
version = "4.4.0";
src = pkgs.fetchurl {
url = "mirror://kernel/linux/kernel/v4.x/linux-4.4.tar.xz";
sha256 = "401d7c8fef594999a460d10c72c5a94e9c2e1022f16795ec51746b0d165418b2";
};
configfile = /etc/nixos/customKernel.config;
kernelPatches = [
{ patch = /etc/nixos/usbarmory_dts.patch;
name = "usbarmory_dts"; }
];
allowImportFromDerivation = true;
}
) linuxPackages_usbarmory);
};
boot = {
initrd.kernelModules = [];
kernelParams = [ "console=ttymxc0,115200" ];
kernelModules = [ "ledtrig_heartbeat" "ci_hdrc_imx" "g_ether" ];
extraModprobeConfig = "options g_ether use_eem=0 dev_addr=1a:55:89:a2:69:41 host_addr=1a:55:89:a2:69:42";
kernelPackages = pkgs.linuxPackages_usbarmory;
loader = {
grub.enable = false;
generic-extlinux-compatible = {
enable = true;
};
};
};
networking = {
interfaces.usb0.ip4 = [ { address = "172.16.0.2"; prefixLength = 24;} ];
hostName = "usbarmory";
defaultGateway = "172.16.0.1";
nameservers = [ "8.8.8.8" ];
firewall.enable = false;
};
sound.enable = false;
services = {
nixosManual.enable = false;
openssh.enable = true;
openssh.permitRootLogin = "without-password";
};
fileSystems = {
"/boot" = {
device = "/dev/disk/by-label/NIXOS_BOOT";
fsType = "vfat";
};
"/" = {
device = "/dev/disk/by-label/NIXOS_SD";
fsType = "ext4";
};
};
}