testing
This commit is contained in:
parent
7f29be15b2
commit
23b3301f64
2 changed files with 26 additions and 3 deletions
nixos/common/modules
19
nixos/common/modules/ssh-luks-wifi.nix
Normal file
19
nixos/common/modules/ssh-luks-wifi.nix
Normal 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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,16 +1,20 @@
|
||||||
{ ... }: {
|
{ lib, wireless, ... }: {
|
||||||
# https://nixos.wiki/wiki/Remote_LUKS_Unlocking
|
# https://nixos.wiki/wiki/Remote_LUKS_Unlocking
|
||||||
# Unlock command:
|
# Unlock command:
|
||||||
# ssh root@<Local_IP_Address> "Password"
|
# ssh root@<Local_IP_Address> "Password"
|
||||||
|
|
||||||
|
imports = [ ] + lib.optional (builtins.isString wireless) ./ssh-luks-wifi.nix;
|
||||||
|
|
||||||
boot.initrd = {
|
boot.initrd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
systemd.users.root.shell = "/bin/systemd-tty-ask-password-agent";
|
systemd.users.root.shell = "/bin/systemd-tty-ask-password-agent";
|
||||||
availableKernelModules = [
|
availableKernelModules = [
|
||||||
"cdc_ncm" # frameworks
|
"cdc_ncm" # frameworks
|
||||||
"e1000e" # nuc-server
|
"e1000e" # nuc-server
|
||||||
"iwlwifi" # Add WiFi driver modules for your hardware
|
"iwlwifi" # Add WiFi driver modules for your hardware
|
||||||
"cfg80211" # Wireless configuration API
|
"cfg80211" # Wireless configuration API
|
||||||
];
|
];
|
||||||
|
|
||||||
network.enable = true;
|
network.enable = true;
|
||||||
network.ssh = {
|
network.ssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
Loading…
Add table
Reference in a new issue