dev.fron.io rc / 62abf5c
hosts: build nu Tony Olagbaiye 1 year, 8 months ago
8 changed file(s) with 238 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 { config, pkgs, lib, domains, ... }:
1
2 {
3 imports = [
4 ];
5
6 boot = {
7 initrd = {
8 availableKernelModules = [ "usbhid" ];
9 kernelModules = [];
10 checkJournalingFS = false;
11 };
12 kernelParams = [
13 "console=ttyAMA0,115200"
14 "console=tty1"
15 "selinux=0"
16 "plymouth.enable=0"
17 "smsc95xx.turbo_mode=N"
18 "dwc_otg.lpm_enable=0"
19 "kgdboc=ttyAMA0,115200"
20 "elevator=noop"
21 ];
22 kernelModules = [];
23 kernelPackages = lib.mkForce pkgs.linuxPackages_rpi2;
24 consoleLogLevel = 5;
25 loader = {
26 initScript.enable = false;
27 grub.enable = false;
28 raspberryPi = {
29 enable = true;
30 uboot.enable = true;
31 version = 2;
32 firmwareConfig = ''
33 gpu_mem=64
34 '';
35 };
36 generic-extlinux-compatible.enable = false;
37 generationsDir = {
38 enable = false;
39 copyKernels = true;
40 };
41 };
42 };
43
44 fileSystems = {
45 "/" = {
46 device = "/dev/mmcblk0p2";
47 fsType = "f2fs";
48 };
49 "/boot" = {
50 device = "/dev/mmcblk0p1";
51 fsType = "vfat";
52 neededForBoot = true;
53 };
54 };
55
56 swapDevices = [ { device = "/dev/mmcblk0p3"; } ];
57
58 powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
59
60 nix.maxJobs = lib.mkDefault 4;
61 nix.buildMachines = [ {
62 hostName = "nix-zeta";
63 systems = ["x86_64-linux" "armv6l-linux" "armv7l-linux"];
64 maxJobs = 3;
65 speedFactor = 2;
66 supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
67 mandatoryFeatures = [ ];
68 } ];
69 nix.distributedBuilds = true;
70 nix.extraOptions = ''
71 builders-use-substitutes = true
72 '';
73
74 nixpkgs.config = {
75 platform = pkgs.platforms.raspberrypi2;
76 };
77
78 networking.hostName = "nu";
79
80 networking.useDHCP = false;
81 networking.interfaces.eth0.useDHCP = true;
82
83 console = {
84 font = "Lat2-Terminus16";
85 keyMap = "uk";
86 };
87
88 i18n = {
89 defaultLocale = "en_GB.UTF-8";
90 };
91
92 time.timeZone = "Europe/London";
93
94 environment.systemPackages = with pkgs; [
95 wget htop screen pv git dnsutils
96 (callPackage home-assistant-cli.override {
97 python3 = python3 // {
98 pkgs = python3.pkgs // {
99 aiohttp = python3.pkgs.aiohttp.overrideAttrs (oldAttrs: {
100 doInstallCheck = false;
101 });
102 };
103 };
104 })
105 dvtm abduco
106 (arm-adb.override {
107 #boringssl = boringssl.override {
108 # go = pkgs.go.override {
109 # };
110 #};
111 })
112 ];
113
114 programs.vim.defaultEditor = true;
115 programs.mosh.enable = true;
116 programs.tmux.enable = true;
117
118 services.resolved.enable = true;
119 services.resolved.dnssec = "false";
120 services.openssh.enable = true;
121 services.openssh.permitRootLogin = "without-password";
122 services.avahi.enable = true;
123 services.avahi.ipv4 = true;
124 services.avahi.ipv6 = true;
125 services.avahi.nssmdns = true;
126 services.avahi.allowPointToPoint = true;
127 services.avahi.publish.enable = true;
128 services.avahi.publish.hinfo = true;
129 services.avahi.publish.userServices = true;
130 services.avahi.publish.addresses = true;
131 services.avahi.publish.domain = true;
132 services.mosquitto.enable = true;
133 services.mosquitto.allowAnonymous = true;
134 services.mosquitto.users = {};
135
136 services.home-assistant.enable = true;
137 services.home-assistant.config = {
138 homeassistant = {
139 latitude = 53.959860;
140 longitude = -1.051170;
141 elevation = 12;
142 unit_system = "metric";
143 time_zone = "Europe/London";
144 name = "Home";
145 whitelist_external_dirs = [ "/tmp" ];
146 };
147 camera = {
148 platform = "ffmpeg";
149 name = "Camera";
150 input = "/dev/video0";
151 };
152 http = {
153 base_url = "https://home.${domains.home}:80";
154 };
155 media_player = {
156 platform = "androidtv";
157 name = "Omega";
158 host = "192.168.0.128";
159 adb_server_ip = "127.0.0.1";
160 apps = {
161 com.google.android.leanbacklauncher = "Home Screen";
162 com.google.android.apps.mediashell = "Chromecast";
163 com.amazon.amazonvideo.livingroom = "Amazon Prime Video";
164 };
165 };
166 };
167 services.home-assistant.package = pkgs.home-assistant.override {
168 extraPackages = py: with pkgs; [
169 ffmpeg
170 picotts
171 #py.adb-homeassistant
172 ];
173 packageOverrides = self: super: {
174 aiohttp = super.aiohttp.overrideAttrs (oldAttrs: {
175 doInstallCheck = false;
176 #nativeBuildInputs = [ pkgs.pythonPackages.adb-homeassistant ];
177 });
178 };
179 };
180 # read /etc/hass/configuration.yaml
181
182 networking.firewall.enable = false;
183
184 security.sudo.enable = true;
185 security.sudo.wheelNeedsPassword = false;
186
187 sound.enable = true;
188 # hardware.pulseaudio.enable = true;
189
190 users.mutableUsers = lib.mkForce true;
191 users.users.leaf = {
192 #uid = 1001;
193 isNormalUser = true;
194 extraGroups = [ "wheel" ];
195 };
196
197 # This value determines the NixOS release with which your system is to be
198 # compatible, in order to avoid breaking some software such as database
199 # servers. You should change this only after NixOS release notes say you
200 # should.
201 system.stateVersion = "20.03"; # Did you read the comment?
202 }
legacy/nu/adb.nix less more
Binary diff not shown
legacy/nu/configuration.nix less more
Binary diff not shown
legacy/nu/hardware-configuration.nix less more
Binary diff not shown
legacy/nu/overlays/pull-76922.nix less more
Binary diff not shown
legacy/nu/tinc.nix less more
Binary diff not shown
0 { stdenv, fetchurl, boringssl }:
1
2 stdenv.mkDerivation rec {
3 pname = "arm-adb";
4 name = "${pname}-${version}";
5 version = "1.0.39";
6 revisiondate = "20191121";
7 revisionbuild = "2db4642";
8
9 src = fetchurl {
10 url = "https://github.com/qhuyduong/arm_${pname}/archive/v${version}.tar.gz";
11 sha256 = "1v591722cbd4caz2bhf9b5hnrdzb1br7bghb19vl4kdpc9hj98rv";
12 };
13
14 dontDisableStatic = true;
15
16 configurePhase = "./configure --prefix=$out/ --includedir=${boringssl}/include/ --libdir=${boringssl}/lib/";
17
18 installPhase = ''
19 mkdir -p $out/lib
20 make install libdir=$out/lib/
21 '';
22
23 buildInputs = [ boringssl ];
24
25 meta = with stdenv.lib; {
26 description = "Android Debug Bridge";
27 homepage = "https://github.com/qhuyduong/arm_adb";
28 license = licenses.gpl3;
29 platforms = platforms.linux;
30 maintainers = with maintainers; [ ];
31 };
32 }
00 final: prev: {
11 emacsPackages =
22 prev.emacsPackages // (prev.callPackage ./applications/editors/emacs-modes { });
3
4 arm-adb = prev.callPackage ./applications/misc/arm-adb { };
35
46 dgit = prev.callPackage ./applications/version-management/dgit { };
57