This commit is contained in:
albert 2025-02-17 21:02:12 -08:00
parent 7f29be15b2
commit 23b3301f64
Signed by: albert
GPG key ID: 3895DD267CA11BA9
2 changed files with 26 additions and 3 deletions
nixos/common/modules

View file

@ -0,0 +1,19 @@
{ pkgs, ... }: let interface = "wlp170s0"; in {
boot.initrd = {
systemd = {
enable = true;
packages = [ pkgs.wpa_supplicant ];
initrdBin = [ pkgs.wpa_supplicant ];
targets.initrd.wants = [ "wpa_supplicant@${interface}.service" ];
# prevent WPA supplicant from requiring `sysinit.target`.
services."wpa_supplicant@".unitConfig.DefaultDependencies = false;
network.enable = true;
network.networks."FBI Van#2.4" = {
matchConfig.Name = interface;
networkConfig.DHCP = "yes";
};
};
}

View file

@ -1,16 +1,20 @@
{ ... }: {
{ lib, wireless, ... }: {
# https://nixos.wiki/wiki/Remote_LUKS_Unlocking
# Unlock command:
# ssh root@<Local_IP_Address> "Password"
imports = [ ] + lib.optional (builtins.isString wireless) ./ssh-luks-wifi.nix;
boot.initrd = {
enable = true;
systemd.users.root.shell = "/bin/systemd-tty-ask-password-agent";
availableKernelModules = [
"cdc_ncm" # frameworks
"e1000e" # nuc-server
"cdc_ncm" # frameworks
"e1000e" # nuc-server
"iwlwifi" # Add WiFi driver modules for your hardware
"cfg80211" # Wireless configuration API
];
network.enable = true;
network.ssh = {
enable = true;