add hosts entries for vpn hosts
This commit is contained in:
parent
f310195ee2
commit
a7efed6f20
|
@ -10,6 +10,7 @@ in
|
|||
./home.nix
|
||||
./htop.nix
|
||||
./ssh.nix
|
||||
./hosts.nix
|
||||
];
|
||||
|
||||
config = {
|
||||
|
|
17
users/hensoko/hosts.nix
Normal file
17
users/hensoko/hosts.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ lib, ... }:
|
||||
|
||||
|
||||
let
|
||||
vpnHosts = [
|
||||
{ ip = "10.0.1.11"; hosts = [ "giggles.vpn" ]; }
|
||||
{ ip = "10.0.1.12"; hosts = [ "cox.vpn" ]; }
|
||||
{ ip = "10.0.1.13"; hosts = [ "companion.vpn" ]; }
|
||||
];
|
||||
|
||||
mkVpnHosts = e: {${e.ip} = e.hosts;};
|
||||
in
|
||||
{
|
||||
networking.hosts =
|
||||
lib.attrsets.mergeAttrsList (builtins.map mkVpnHosts vpnHosts)
|
||||
;
|
||||
}
|
Loading…
Reference in a new issue