forked from mirrors_public/oddlama_nix-config
fix(zackbiene): fix esphome hardening to allow socket creation, fix hostapd config syntax
This commit is contained in:
parent
fc8b59178b
commit
711c97b393
5 changed files with 92 additions and 63 deletions
|
@ -57,10 +57,16 @@ in {
|
|||
};
|
||||
|
||||
# Rename known network interfaces
|
||||
services.udev.extraRules = lib.concatStringsSep "\n" (lib.mapAttrsToList (
|
||||
interface: attrs: ''SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="${attrs.mac}", NAME="${interface}"''
|
||||
)
|
||||
nodeSecrets.networking.interfaces);
|
||||
services.udev.packages = let
|
||||
interfaceNamesUdevRules = pkgs.writeTextFile {
|
||||
name = "interface-names-udev-rules";
|
||||
text = lib.concatStringsSep "\n" (lib.mapAttrsToList (
|
||||
interface: attrs: ''SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="${attrs.mac}", NAME:="${interface}"''
|
||||
)
|
||||
nodeSecrets.networking.interfaces);
|
||||
destination = "/etc/udev/rules.d/01-interface-names.rules";
|
||||
};
|
||||
in [interfaceNamesUdevRules];
|
||||
|
||||
nix.nixPath = [
|
||||
"nixos-config=${dummyConfig}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue