Commit 4addc337 authored by fpletz's avatar fpletz 🚧
Browse files

luftschleuse: fix boot, add dnsmasq for wifi

parent 6ffac2cf
{ config, pkgs, lib, ... }:
{
imports = [
"${fetchTarball "https://github.com/NixOS/nixos-hardware/archive/9886a06e4745edb31587d0e9481ad82d35f0d593.tar.gz"}/raspberry-pi/4"
];
boot = {
loader = {
grub.enable = false;
generic-extlinux-compatible.enable = true;
};
initrd.availableKernelModules = [ "vc4" ];
kernelParams = [ "console=tty0" ];
};
hardware.enableRedistributableFirmware = false;
hardware.firmware = [ pkgs.firmwareLinuxNonfree ];
fileSystems = {
"/" = {
......@@ -18,6 +26,10 @@
useNetworkd = true;
useDHCP = false;
interfaces.eth0.useDHCP = true;
interfaces.wlan0 = {
ipv4.addresses = [ { address = "192.168.2.2"; prefixLength = 24; } ];
};
firewall.trustedInterfaces = [ "wlan0" "eth0" ];
};
systemd.network.networks."40-eth0" = {
......@@ -26,11 +38,6 @@
boot.tmpOnTmpfs = true;
zramSwap = {
enable = true;
memoryPercent = 100;
};
environment.systemPackages = with pkgs; [ colmena lm_sensors ];
users = {
......@@ -40,14 +47,24 @@
];
};
services.dnsmasq = {
enable = true;
extraConfig = ''
bind-interfaces
interface=wlan0
bogus-priv
no-resolv
dhcp-range=192.168.2.10,192.168.2.200,1h
no-ping
'';
};
services.hostapd = {
enable = true;
interface = "wlan0";
countryCode = "DE";
ssid = "luftschleuse3";
channel = 7;
wpa = false;
extraConfig = ''
auth_alg=0
'';
};
}
......@@ -15,6 +15,7 @@
wget curl htop iftop tmux tcpdump rsync git
alacritty.terminfo
];
documentation.nixos.enable = false;
programs.bash.enableCompletion = true;
programs.vim.defaultEditor = true;
programs.zsh.enable = true;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment