Add muop wg peer

This commit is contained in:
muon 2024-12-29 09:53:44 +00:00
parent 15053e74e0
commit 06b5695b4a
2 changed files with 45 additions and 42 deletions

View file

@ -4,44 +4,43 @@
mods.nix.clean.enable = lib.mkEnableOption "enables nix auto cleaning"; mods.nix.clean.enable = lib.mkEnableOption "enables nix auto cleaning";
}; };
config = config = let flake = "/home/${config.mods.user.name}/.config/home";
let flake = "${config.environment.sessionVariables.XDG_CONFIG_HOME}/home"; in {
in { system.autoUpgrade = {
system.autoUpgrade = { enable = config.mods.nix.upgrade.enable;
enable = config.mods.nix.upgrade.enable; flake = flake;
flake = flake; flags = [ "--commit-lock-file" "-L" ];
flags = [ "--commit-lock-file" "-L" ]; dates = "02:00";
dates = "02:00"; randomizedDelaySec = "45min";
randomizedDelaySec = "45min";
};
programs.nh = {
enable = true;
clean.enable = config.mods.nix.clean.enable;
clean.extraArgs = "--keep-since 4d --keep 3";
flake = flake;
};
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.settings = {
substituters = [
"https://cache.nixos.org"
"https://nix-community.cachix.org"
"https://nixpkgs-unfree.cachix.org"
"https://hyprland.cachix.org"
];
trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"nixpkgs-unfree.cachix.org-1:hqvoInulhbV4nJ9yJOEr+4wxhDV4xq2d1DK7S6Nj6rs="
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
];
};
environment.systemPackages = with pkgs; [
inputs.nix-alien.packages.${system}.nix-alien
colmena
];
programs.nix-ld.enable = true;
}; };
programs.nh = {
enable = true;
clean.enable = config.mods.nix.clean.enable;
clean.extraArgs = "--keep-since 4d --keep 3";
flake = flake;
};
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.settings = {
substituters = [
"https://cache.nixos.org"
"https://nix-community.cachix.org"
"https://nixpkgs-unfree.cachix.org"
"https://hyprland.cachix.org"
];
trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"nixpkgs-unfree.cachix.org-1:hqvoInulhbV4nJ9yJOEr+4wxhDV4xq2d1DK7S6Nj6rs="
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
];
};
environment.systemPackages = with pkgs; [
inputs.nix-alien.packages.${system}.nix-alien
colmena
];
programs.nix-ld.enable = true;
};
} }

View file

@ -45,17 +45,21 @@
''; '';
peers = [ peers = [
{ # peer0 { # peer0 - muon
publicKey = "MDBdADwP/SE/T9cadXB1Mup7Dr3x+l6gBFBN83BU4Dg="; publicKey = "MDBdADwP/SE/T9cadXB1Mup7Dr3x+l6gBFBN83BU4Dg=";
presharedKeyFile = "/home/muon/wireguard-keys/psk-muon"; presharedKeyFile = "/home/muon/wireguard-keys/psk-muon";
allowedIPs = [ "10.0.0.2/32" "fdc9:281f:04d7:9ee9::2/128" ]; allowedIPs = [ "10.0.0.2/32" "fdc9:281f:04d7:9ee9::2/128" ];
} }
{ # peer1 { # peer1 - muho
publicKey = "ohf/tGV9bjDDh/i9U5+DNvFtn+Glm8Wy1ieHoPvXfCo="; publicKey = "ohf/tGV9bjDDh/i9U5+DNvFtn+Glm8Wy1ieHoPvXfCo=";
presharedKeyFile = "/home/muon/wireguard-keys/psk-muho"; presharedKeyFile = "/home/muon/wireguard-keys/psk-muho";
allowedIPs = [ "10.0.0.3/32" "fdc9:281f:04d7:9ee9::3/128" ]; allowedIPs = [ "10.0.0.3/32" "fdc9:281f:04d7:9ee9::3/128" ];
} }
# More peers can be added here. { # peer2 - muop
publicKey = "PgWVukvuXexAl42xk8jdysa28xcYZiV3RduaN9j3Axo=";
presharedKeyFile = "/home/muon/wireguard-keys/psk-muop";
allowedIPs = [ "10.0.0.4/32" "fdc9:281f:04d7:9ee9::4/128" ];
}
]; ];
}; };
}; };