-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathconfiguration.nix
57 lines (45 loc) · 1.54 KB
/
configuration.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
{ config, lib, pkgs, ... }:
{
boot.loader.grub.enable = false;
boot.loader.generic-extlinux-compatible.enable = true;
boot.consoleLogLevel = 7;
# cma is 64M by default which is waay too much and we can't even unpack initrd
boot.kernelParams = [ "console=ttyS0,115200n8" "cma=32M" ];
# See: https://lore.kernel.org/patchwork/project/lkml/list/?submitter=22013&order=name
boot.kernelPackages = pkgs.linuxPackages_5_9;
boot.kernelPatches = [
{ name = "pine64-pinecube";
patch = ./kernel/Pine64-PineCube-support.patch;
# sunxi_defconfig is missing wireless support
# TODO: Are all of these options needed here?
extraConfig = ''
CFG80211 m
WIRELESS y
WLAN y
RFKILL y
RFKILL_INPUT y
RFKILL_GPIO y
'';
}
];
boot.kernelModules = [ "spi-nor" ]; # Not sure why this doesn't autoload. Provides SPI NOR at /dev/mtd0
boot.extraModulePackages = [ config.boot.kernelPackages.rtl8189es ];
zramSwap.enable = true; # 128MB is not much to work with
sound.enable = true;
environment.systemPackages = with pkgs; [
ffmpeg
(v4l_utils.override { withGUI = false; })
usbutils
];
###
services.openssh.enable = true;
services.openssh.permitRootLogin = "yes";
users.users.root.initialPassword = "nixos"; # Log in without a password
users.users.nixos = {
isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" "video" ];
initialPassword = "nixos";
};
services.mingetty.autologinUser = "nixos";
networking.wireless.enable = true;
}