forked from mirrors_public/oddlama_nix-config
feat(zackbiene): add hostapd config
This commit is contained in:
parent
f2f8ca71bb
commit
fc8b59178b
9 changed files with 127 additions and 34 deletions
|
@ -2,6 +2,7 @@
|
|||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
nodeSecrets,
|
||||
...
|
||||
}: let
|
||||
dummyConfig = pkgs.writeText "configuration.nix" ''
|
||||
|
@ -55,6 +56,12 @@ in {
|
|||
firewall.enable = true;
|
||||
};
|
||||
|
||||
# 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);
|
||||
|
||||
nix.nixPath = [
|
||||
"nixos-config=${dummyConfig}"
|
||||
"nixpkgs=/run/current-system/nixpkgs"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue