Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tuedel
nixos-deployment
Commits
4addc337
Commit
4addc337
authored
Feb 26, 2022
by
fpletz
🚧
Browse files
luftschleuse: fix boot, add dnsmasq for wifi
parent
6ffac2cf
Changes
2
Hide whitespace changes
Inline
Side-by-side
luftschleuse.nix
View file @
4addc337
{
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
''
;
};
}
modules/default.nix
View file @
4addc337
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment