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,7 +1,10 @@
|
|||
{ ... }: {
|
||||
{ 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";
|
||||
|
@ -11,6 +14,7 @@
|
|||
"iwlwifi" # Add WiFi driver modules for your hardware
|
||||
"cfg80211" # Wireless configuration API
|
||||
];
|
||||
|
||||
network.enable = true;
|
||||
network.ssh = {
|
||||
enable = true;
|
||||
|
|
Loading…
Add table
Reference in a new issue