feature(toxvpn): add initial commit

This commit is contained in:
Serĉanto de Scio 2024-09-28 14:06:46 +10:00
parent 9c3858318a
commit b6d61d57c7
Signed by: sercanto
GPG key ID: A4122FF3971B6865
9 changed files with 40 additions and 11 deletions

View file

@ -5125,16 +5125,16 @@
},
"nixpkgsUnstable": {
"locked": {
"lastModified": 1727122398,
"narHash": "sha256-o8VBeCWHBxGd4kVMceIayf5GApqTavJbTa44Xcg5Rrk=",
"lastModified": 1727492757,
"narHash": "sha256-9ceiOCk+8ekKJJaeN/40M8jEqmrdjIULTzQDUrW0tfw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "30439d93eb8b19861ccbe3e581abf97bdc91b093",
"rev": "e412e4890728fb35574edee0fb77876baf12ef88",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"ref": "pull/344989/head",
"repo": "nixpkgs",
"type": "github"
}

View file

@ -12,7 +12,7 @@
iohkNix.url = github:input-output-hk/iohk-nix/?ref=df1da282f996ec46b33379407df99613a1fbafdd;
nix.url = github:NixOS/nix/?ref=2.24.6;
nixpkgs.url = github:NixOS/nixpkgs/?ref=nixos-24.05;
nixpkgsUnstable.url = github:NixOS/nixpkgs/?ref=nixos-unstable;
nixpkgsUnstable.url = github:NixOS/nixpkgs/?ref=pull/344989/head;
ragenix = {
url = github:yaxitech/ragenix;
inputs.nixpkgs.follows = "nixpkgs";

View file

@ -13,7 +13,7 @@
../../profiles/ipv6.nix
../../profiles/mastodon.nix
../../profiles/matrix.nix
#../../profiles/mcwhirter.io.nix
../../profiles/mcwhirter.io.nix
#../../profiles/minecraftServer.nix
../../profiles/nextcloud.nix
../../profiles/nixpkgs-dev.nix

View file

@ -21,8 +21,6 @@
../../profiles/users-ops.nix # MIO Ops users
];
deployment.targetHost = "10.42.0.11";
nixpkgs = {
config = {
allowUnfree = true;

View file

@ -1,6 +1,7 @@
[
./profiles/cosmicDesktop
./profiles/starship
./profiles/toxvpn
./roles/desktop
./roles/desktopCraige
]

View file

@ -0,0 +1,25 @@
# VPN configuration for MIO.
{
config,
lib,
pkgs,
nixpkgsUnstable,
...
}:
with lib; let
cfg = config.profiles.toxvpn;
toxvpn = nixpkgsUnstable.toxvpn;
in {
options.profiles.toxvpn = {
enable = mkEnableOption "to enable toxvpn.";
};
config = mkIf (cfg.enable) {
services.toxvpn = {
enable = true;
auto_add_peers = [
"7708050f6b7ad32e2a6943bd4aa97fe90053090e1197bd96f3dbedfd324e49605ca3e577ef47" # sanganto
"a18dfff426f5a752eb1bdc90ea307850982c1dff1444caf72b75f73483e358213b60281235a4" # eamhair
];
};
};
}

View file

@ -23,6 +23,7 @@ in {
libreoffice-fresh # Comprehensive, professional-quality productivity suite
mplayer # A movie player that supports many video formats
nextcloud-client # Nextcloud desktop client
pavucontrol # PulseAudio Volume Control
pwgen # Password generator
rsync
shotwell # Photo organizer

View file

@ -44,6 +44,7 @@ in {
# make flake inputs accessible in NixOS
_module.args.inputs = inputs;
profiles.starship.enable = true;
profiles.toxvpn.enable = true;
};
# Comment out deployment line when building the SD Image.
airgead = {
@ -128,6 +129,7 @@ in {
tags = ["active" "rPi"];
targetHost = "10.42.0.205";
};
services.toxvpn.localip = "10.37.0.205";
};
iolear-beag = {
imports = [
@ -150,8 +152,10 @@ in {
hosts/sanganto
ragenix.nixosModules.default
];
deployment.targetHost = "10.42.0.11";
roles.desktop.enable = true;
roles.desktopCraige.enable = true;
services.toxvpn.localip = "10.37.0.11";
};
sercanto = {
imports = [

View file

@ -4,8 +4,8 @@
pkgs,
...
}: let
sources = import ../nix/sources.nix;
mcwhirter-io = import sources.mcwhirter-io {};
#sources = import ../nix/sources.nix;
#mcwhirter-io = import sources.mcwhirter-io {};
webdomain = "mcwhirter.io";
in {
environment.sessionVariables = {
@ -23,7 +23,7 @@ in {
# website hostname
enableACME = true; # Use ACME certs
forceSSL = true; # Force SSL
root = "${mcwhirter-io}"; # Wesbite root
#root = "${mcwhirter-io}"; # Wesbite root
};
"www.${webdomain}" = {
# Respect our elders :-)