mirror of
https://github.com/materusPL/nixos-config
synced 2026-06-18 16:37:21 +02:00
oldie: init secrets, connect to wireguard
This commit is contained in:
parent
0c4725063c
commit
71710a3aa0
@ -7,6 +7,7 @@
|
|||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
materusArgs,
|
materusArgs,
|
||||||
|
mkk,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@ -325,6 +326,43 @@
|
|||||||
hardware.uinput.enable = true;
|
hardware.uinput.enable = true;
|
||||||
hardware.steam-hardware.enable = true;
|
hardware.steam-hardware.enable = true;
|
||||||
|
|
||||||
|
|
||||||
|
sops.templates."networkmanager.env".content = ''
|
||||||
|
WIREGUARD_PRIVATEKEY="${config.sops.placeholder.wg-key}"
|
||||||
|
'';
|
||||||
|
networking.networkmanager.ensureProfiles.environmentFiles = [
|
||||||
|
config.sops.templates."networkmanager.env".path
|
||||||
|
];
|
||||||
|
networking.networkmanager.ensureProfiles.profiles = {
|
||||||
|
wg0 = {
|
||||||
|
connection = {
|
||||||
|
id = "PodKos";
|
||||||
|
type = "wireguard";
|
||||||
|
interface-name = "wg-podkos";
|
||||||
|
};
|
||||||
|
wireguard = {
|
||||||
|
private-key = "$WIREGUARD_PRIVATEKEY";
|
||||||
|
};
|
||||||
|
"wireguard-peer.${mkk.wireguard.peers.valkyrie.pubKey}" = {
|
||||||
|
endpoint = "${mkk.network.valkyrie.ip}:${mkk.wireguard.peers.valkyrie.port}";
|
||||||
|
allowed-ips = "${mkk.wireguard.ip-masks.main};${mkk.wireguard.ip-masks.guest};${mkk.wireguard.ip-masks.asia};${mkk.wireguard.peers.valkyrie.ip}/32;";
|
||||||
|
persistent-keepalive = "20";
|
||||||
|
};
|
||||||
|
ipv4 = {
|
||||||
|
address1 = "${mkk.wireguard.peers.oldie.ip}/32";
|
||||||
|
dns = "${mkk.wireguard.peers.valkyrie.ip};";
|
||||||
|
method = "manual";
|
||||||
|
never-default = "true";
|
||||||
|
};
|
||||||
|
ipv6 = {
|
||||||
|
addr-gen-mode = "stable-privacy";
|
||||||
|
method = "disabled";
|
||||||
|
};
|
||||||
|
proxy = { };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
||||||
system.stateVersion = "26.05"; # Did you read the comment?
|
system.stateVersion = "26.05"; # Did you read the comment?
|
||||||
|
|
||||||
|
|||||||
@ -2,5 +2,7 @@
|
|||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
|
|
||||||
|
./private
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
nix-config/host/oldie/private/default.nix
Normal file
BIN
nix-config/host/oldie/private/default.nix
Normal file
Binary file not shown.
BIN
nix-config/host/oldie/private/secrets.yaml
Normal file
BIN
nix-config/host/oldie/private/secrets.yaml
Normal file
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user