dev.fron.io rc / adda5af
hosts: move nu to phi Tony Olagbaiye 1 year, 7 months ago
5 changed file(s) with 155 addition(s) and 239 deletion(s). Raw diff Collapse all Expand all
2525 efi.canTouchEfiVariables = true;
2626 systemd-boot = {
2727 enable = true;
28 configurationLimit = 8;
28 configurationLimit = 16;
2929 };
3030 };
3131
+0
-203
hosts/nu/default.nix less more
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 }
0 { config, pkgs, lib, domains, ... }:
1
2 {
3 imports = [
4 ];
5
6 # Use the systemd-boot EFI boot loader.
7 boot.loader = {
8 efi.canTouchEfiVariables = true;
9 systemd-boot = {
10 enable = true;
11 configurationLimit = 8;
12 };
13 };
14
15 boot.extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ];
16
17 fileSystems = {
18 "/" = {
19 device = "/dev/mmcblk0p2";
20 fsType = "f2fs";
21 };
22 "/boot" = {
23 device = "/dev/mmcblk0p1";
24 fsType = "vfat";
25 neededForBoot = true;
26 };
27 };
28
29 swapDevices = [ { device = "/dev/mmcblk0p3"; } ];
30
31 powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
32
33 nix.maxJobs = lib.mkDefault 4;
34 nix.buildMachines = [ {
35 hostName = "nix-zeta";
36 systems = [ "x86_64-linux" ];
37 maxJobs = 3;
38 speedFactor = 2;
39 supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
40 mandatoryFeatures = [ ];
41 } ];
42 nix.distributedBuilds = true;
43 nix.extraOptions = ''
44 builders-use-substitutes = true
45 '';
46
47 networking.useDHCP = false;
48 networking.interfaces.eth0.useDHCP = true;
49
50 environment.systemPackages = with pkgs; [
51 wget htop screen pv git dnsutils
52 (callPackage home-assistant-cli.override {
53 python3 = python3 // {
54 pkgs = python3.pkgs // {
55 aiohttp = python3.pkgs.aiohttp.overrideAttrs (oldAttrs: {
56 doInstallCheck = false;
57 });
58 };
59 };
60 })
61 dvtm abduco
62 ];
63
64 programs.vim.defaultEditor = true;
65 programs.mosh.enable = true;
66 programs.tmux.enable = true;
67 programs.adb.enable = true;
68
69 services.resolved.enable = true;
70 services.resolved.dnssec = "false";
71 services.openssh.enable = true;
72 services.openssh.permitRootLogin = "without-password";
73 services.avahi.enable = true;
74 services.avahi.ipv4 = true;
75 services.avahi.ipv6 = true;
76 services.avahi.nssmdns = true;
77 services.avahi.allowPointToPoint = true;
78 services.avahi.publish.enable = true;
79 services.avahi.publish.hinfo = true;
80 services.avahi.publish.userServices = true;
81 services.avahi.publish.addresses = true;
82 services.avahi.publish.domain = true;
83 services.mosquitto.enable = true;
84 services.mosquitto.allowAnonymous = true;
85 services.mosquitto.users = {};
86
87 services.home-assistant.enable = true;
88 services.home-assistant.config = {
89 homeassistant = {
90 latitude = 53.959860;
91 longitude = -1.051170;
92 elevation = 12;
93 unit_system = "metric";
94 time_zone = "Europe/London";
95 name = "Home";
96 whitelist_external_dirs = [ "/tmp" ];
97 };
98 camera = {
99 platform = "ffmpeg";
100 name = "Camera";
101 input = "/dev/video0";
102 };
103 http = {
104 base_url = "https://home.${domains.home}:80";
105 };
106 media_player = {
107 platform = "androidtv";
108 name = "Omega";
109 host = "192.168.0.128";
110 adb_server_ip = "127.0.0.1";
111 apps = {
112 com.google.android.leanbacklauncher = "Home Screen";
113 com.google.android.apps.mediashell = "Chromecast";
114 com.amazon.amazonvideo.livingroom = "Amazon Prime Video";
115 };
116 };
117 };
118 services.home-assistant.package = pkgs.home-assistant.override {
119 extraPackages = py: with pkgs; [
120 ffmpeg
121 picotts
122 #py.adb-homeassistant
123 ];
124 packageOverrides = self: super: {
125 aiohttp = super.aiohttp.overrideAttrs (oldAttrs: {
126 doInstallCheck = false;
127 #nativeBuildInputs = [ pkgs.pythonPackages.adb-homeassistant ];
128 });
129 };
130 };
131 # read /etc/hass/configuration.yaml
132
133 networking.firewall.enable = false;
134
135 security.sudo.enable = true;
136 security.sudo.wheelNeedsPassword = false;
137
138 sound.enable = true;
139 # hardware.pulseaudio.enable = true;
140
141 users.mutableUsers = lib.mkForce true;
142 users.users.leaf = {
143 #uid = 1001;
144 isNormalUser = true;
145 extraGroups = [ "wheel" ];
146 };
147
148 # This value determines the NixOS release with which your system is to be
149 # compatible, in order to avoid breaking some software such as database
150 # servers. You should change this only after NixOS release notes say you
151 # should.
152 system.stateVersion = "20.03"; # Did you read the comment?
153 }
+0
-33
pkgs/applications/misc/arm-adb/default.nix less more
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 }
33 in {
44 emacsPackages = recurseIntoAttrs (prev.emacsPackages.overrideScope' emacsOverride);
55 emacsPackagesFor = emacs: recurseIntoAttrs ((prev.emacsPackagesFor emacs).overrideScope' emacsOverride);
6
7 arm-adb = prev.callPackage ./applications/misc/arm-adb { };
86
97 dgit = prev.callPackage ./applications/version-management/dgit { };
108