mirror of
https://git.sr.ht/~roxwize/.dotfiles
synced 2025-03-13 16:03:25 +00:00
~
This commit is contained in:
parent
50e9bafbf0
commit
f85fb25d59
5 changed files with 50 additions and 27 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
||||||
result/
|
result/
|
||||||
result
|
result
|
||||||
*.img
|
*.img
|
||||||
|
*.img.*
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
];
|
];
|
||||||
log-driver = "journald";
|
log-driver = "journald";
|
||||||
extraOptions = [
|
extraOptions = [
|
||||||
|
"--cap-add=NET_ADMIN"
|
||||||
"--cap-add=SYS_NICE"
|
"--cap-add=SYS_NICE"
|
||||||
"--network-alias=pihole"
|
"--network-alias=pihole"
|
||||||
"--network=pihole_default"
|
"--network=pihole_default"
|
||||||
|
|
|
@ -28,7 +28,7 @@ services:
|
||||||
cap_add:
|
cap_add:
|
||||||
# See https://github.com/pi-hole/docker-pi-hole#note-on-capabilities
|
# See https://github.com/pi-hole/docker-pi-hole#note-on-capabilities
|
||||||
# Required if you are using Pi-hole as your DHCP server, else not needed
|
# Required if you are using Pi-hole as your DHCP server, else not needed
|
||||||
# - NET_ADMIN
|
- NET_ADMIN
|
||||||
# Required if you are using Pi-hole as your NTP client to be able to set the host's system time
|
# Required if you are using Pi-hole as your NTP client to be able to set the host's system time
|
||||||
# - SYS_TIME
|
# - SYS_TIME
|
||||||
# Optional, if Pi-hole should get some more processing time
|
# Optional, if Pi-hole should get some more processing time
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "ioides";
|
hostName = "ioides";
|
||||||
hosts = {
|
hosts = {
|
||||||
"10.0.0.39" = [ "near" "near.local" ];
|
"10.0.0.2" = [ "near" "near.local" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ inputs, pkgs, ... }: {
|
{ inputs, pkgs, lib, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
inputs.raspberry-pi-nix.nixosModules.raspberry-pi
|
inputs.raspberry-pi-nix.nixosModules.raspberry-pi
|
||||||
inputs.raspberry-pi-nix.nixosModules.sd-image
|
inputs.raspberry-pi-nix.nixosModules.sd-image
|
||||||
|
@ -7,8 +7,6 @@
|
||||||
../../docker
|
../../docker
|
||||||
];
|
];
|
||||||
|
|
||||||
hardware.enableRedistributableFirmware = true;
|
|
||||||
|
|
||||||
users.users.root.openssh.authorizedKeys.keys = [
|
users.users.root.openssh.authorizedKeys.keys = [
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPyZFWvrboUTM/dKzz5kQHEKjNqI410VJUGiVckhjOve rae@ioides"
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPyZFWvrboUTM/dKzz5kQHEKjNqI410VJUGiVckhjOve rae@ioides"
|
||||||
];
|
];
|
||||||
|
@ -17,44 +15,67 @@
|
||||||
virtualisation.docker.enable = true;
|
virtualisation.docker.enable = true;
|
||||||
r5e.containers = {
|
r5e.containers = {
|
||||||
pihole = {
|
pihole = {
|
||||||
enable = true;
|
enable = false;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
listenPortHTTP = 8081;
|
listenPortHTTP = 8080;
|
||||||
listenPortHTTPS = 8443;
|
listenPortHTTPS = 8443;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
# dnsmasq = {
|
dnsmasq = {
|
||||||
# enable = true;
|
enable = true;
|
||||||
# extraConfig = ''
|
settings = {
|
||||||
# interface=wlan0
|
dhcp-range = [ "192.168.14.10,192.168.14.254,24h" ];
|
||||||
# bind-interfaces
|
interface = "wlan0";
|
||||||
# '';
|
};
|
||||||
# };
|
};
|
||||||
hostapd = {
|
hostapd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
interface = "wlan0";
|
radios.wlan0 = {
|
||||||
hwMode = "g";
|
band = "2g";
|
||||||
ssid = "near";
|
channel = 7;
|
||||||
wpaPassphrase = "RjkVTYUZE08HN"; #! world readable
|
countryCode = "US";
|
||||||
|
networks.wlan0 = {
|
||||||
|
ssid = "near [2.4ghz]";
|
||||||
|
authentication = {
|
||||||
|
mode = "wpa2-sha256";
|
||||||
|
wpaPassword = "techcat8";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
settings = {
|
||||||
|
ht_capab = lib.mkForce "[HT40][SHORT-GI-20]";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
bridges.br0.interfaces = [ "end0" "wlan0" ];
|
# bridges.br0 = {
|
||||||
firewall.allowedTCPPorts = [ 22 ];
|
# interfaces = [ "end0" "wlan0" ];
|
||||||
|
# };
|
||||||
|
defaultGateway.address = "10.0.0.1";
|
||||||
|
firewall.allowedTCPPorts = [ 53 22 ];
|
||||||
|
firewall.allowedUDPPorts = [ 53 67 68 ];
|
||||||
hostName = "near";
|
hostName = "near";
|
||||||
networkmanager.unmanaged = [ "interface-name:wlan0" ];
|
interfaces = {
|
||||||
|
# br0 = {
|
||||||
|
# ipv4.addresses = [
|
||||||
|
# {
|
||||||
|
# address = "10.0.0.2";
|
||||||
|
# prefixLength = 24;
|
||||||
|
# }
|
||||||
|
# ];
|
||||||
|
# };
|
||||||
|
end0.useDHCP = true;
|
||||||
|
wlan0.useDHCP = true;
|
||||||
|
};
|
||||||
|
networkmanager.unmanaged = [ "interface-name:wlan*" ];
|
||||||
|
useDHCP = false;
|
||||||
wireless.enable = true;
|
wireless.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.etc."wpa_supplicant.conf".text = "";
|
||||||
bridge-utils
|
|
||||||
# dnsmasq
|
|
||||||
git
|
|
||||||
hostapd
|
|
||||||
];
|
|
||||||
|
|
||||||
time.timeZone = "America/New_York";
|
time.timeZone = "America/New_York";
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue