mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-22 13:25:38 +00:00
wireguard config but not enabled
This commit is contained in:
parent
aa8765b2a2
commit
0fd3956bda
@ -31,6 +31,7 @@
|
||||
"$6$PZYiMGmJIIHAepTM$Wx5EqTQ5GApzXx58nvi8azh16pdxrN6Qrv1wunDlzveOgawitWzcIxuj76X9V868fsPi/NOIEO8yVXqwzS9UF.";
|
||||
gitEmail = "7386960+nmasur@users.noreply.github.com";
|
||||
mailServer = "noahmasur.com";
|
||||
dotfilesRepo = "https://github.com/nmasur/dotfiles";
|
||||
gui = {
|
||||
colorscheme = (import ./modules/colorscheme/gruvbox);
|
||||
wallpaper = ./media/wallpaper/road.jpg;
|
||||
|
@ -17,6 +17,10 @@
|
||||
description = "Path of dotfiles repository.";
|
||||
default = builtins.toPath "/home/${config.user}/dev/personal/dotfiles";
|
||||
};
|
||||
dotfilesRepo = mkOption {
|
||||
type = types.str;
|
||||
description = "Link to dotfiles repository.";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
|
@ -9,8 +9,8 @@
|
||||
config.home-manager.users.${config.user}.lib.dag.entryAfter
|
||||
[ "writeBoundary" ] ''
|
||||
if [ ! -d "${config.dotfilesPath}" ]; then
|
||||
$DRY_RUN_CMD mkdir --parents $VERBOSE_ARG $(dirname ${config.dotfilesPath})
|
||||
$DRY_RUN_CMD ${pkgs.git}/bin/git clone https://github.com/nmasur/dotfiles ${config.dotfilesPath}
|
||||
$DRY_RUN_CMD mkdir --parents $VERBOSE_ARG $(dirname "${config.dotfilesPath}")
|
||||
$DRY_RUN_CMD ${pkgs.git}/bin/git clone ${config.dotfilesRepo} "${config.dotfilesPath}"
|
||||
fi
|
||||
'';
|
||||
|
||||
|
@ -1,14 +1,18 @@
|
||||
{ ... }: {
|
||||
networking.wireguard.interfaces = {
|
||||
wg0 = {
|
||||
ips = [ "10.0.0.1/32" "fc00:bbbb:bbbb:bb01::3:7fea/128" ];
|
||||
privateKeyFile = "/private/wireguard-pk";
|
||||
peers = [{
|
||||
publicKey = "ABCDEFABCDEF";
|
||||
allowedIPs = [ "0.0.0.0/0" "::0/0" ];
|
||||
endpoint = "10.0.0.1:51820";
|
||||
persistentKeepalive = 25;
|
||||
}];
|
||||
networking.wireguard = {
|
||||
enable = true;
|
||||
interfaces = {
|
||||
wg0 = {
|
||||
ips = [ "10.66.127.235/32" "fc00:bbbb:bbbb:bb01::3:7fea/128" ];
|
||||
generatePrivateKeyFile = true;
|
||||
privateKeyFile = "/private/wireguard/wg0";
|
||||
peers = [{
|
||||
publicKey = "cVDIYPzNChIeANp+0jE12kWM5Ga1MbmNErT1Pmaf12A=";
|
||||
allowedIPs = [ "0.0.0.0/0" "::0/0" ];
|
||||
endpoint = "89.46.62.197:51820";
|
||||
persistentKeepalive = 25;
|
||||
}];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user