Compare commits
10 Commits
bd7469a7d1
...
60ca81f113
Author | SHA1 | Date | |
---|---|---|---|
60ca81f113 | |||
029653476f | |||
ecfc60b2bb | |||
83e4dd2ea7 | |||
06c4c7bc13 | |||
aa40c0c5e3 | |||
afbbe88620 | |||
baf6494a9c | |||
a5dbee8755 | |||
d317917453 |
44
flake.lock
generated
44
flake.lock
generated
@ -10,11 +10,11 @@
|
|||||||
"systems": "systems"
|
"systems": "systems"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1703433843,
|
"lastModified": 1723293904,
|
||||||
"narHash": "sha256-nmtA4KqFboWxxoOAA6Y1okHbZh+HsXaMPFkYHsoDRDw=",
|
"narHash": "sha256-b+uqzj+Wa6xgMS9aNbX4I+sXeb5biPDi39VgvSFqFvU=",
|
||||||
"owner": "ryantm",
|
"owner": "ryantm",
|
||||||
"repo": "agenix",
|
"repo": "agenix",
|
||||||
"rev": "417caa847f9383e111d1397039c9d4337d024bf0",
|
"rev": "f6291c5935fdc4e0bef208cfc0dcab7e3f7a1c41",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -48,11 +48,11 @@
|
|||||||
"utils": "utils"
|
"utils": "utils"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1702912615,
|
"lastModified": 1733148767,
|
||||||
"narHash": "sha256-qseX+/8drgwxOb1I3LKqBYMkmyeI5d5gmHqbZccR660=",
|
"narHash": "sha256-Ht5wD/n2I/tQWNgYIdmi3UQbm1FNwp9m9JmDjZEd6ng=",
|
||||||
"owner": "aristanetworks",
|
"owner": "aristanetworks",
|
||||||
"repo": "nix-serve-ng",
|
"repo": "nix-serve-ng",
|
||||||
"rev": "21e65cb4c62b5c9e3acc11c3c5e8197248fa46a4",
|
"rev": "6e8d82a451fccbaa4714da8f7a3db5907bdfa96d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -63,35 +63,29 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1705916986,
|
"lastModified": 1734991663,
|
||||||
"narHash": "sha256-iBpfltu6QvN4xMpen6jGGEb6jOqmmVQKUrXdOJ32u8w=",
|
"narHash": "sha256-8T660guvdaOD+2/Cj970bWlQwAyZLKrrbkhYOFcY1YE=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "d7f206b723e42edb09d9d753020a84b3061a79d8",
|
"rev": "6c90912761c43e22b6fb000025ab96dd31c971ff",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"id": "nixpkgs",
|
"id": "nixpkgs",
|
||||||
"ref": "nixos-23.11",
|
"ref": "nixos-24.11",
|
||||||
"type": "indirect"
|
"type": "indirect"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-lib": {
|
"nixpkgs-lib": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"dir": "lib",
|
"lastModified": 1733096140,
|
||||||
"lastModified": 1703961334,
|
"narHash": "sha256-1qRH7uAUsyQI7R1Uwl4T+XvdNv778H0Nb5njNrqvylY=",
|
||||||
"narHash": "sha256-M1mV/Cq+pgjk0rt6VxoyyD+O8cOUiai8t9Q6Yyq4noY=",
|
"type": "tarball",
|
||||||
"owner": "NixOS",
|
"url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz"
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "b0d36bd0a420ecee3bc916c91886caca87c894e9",
|
|
||||||
"type": "github"
|
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"dir": "lib",
|
"type": "tarball",
|
||||||
"owner": "NixOS",
|
"url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz"
|
||||||
"ref": "nixos-unstable",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"parts": {
|
"parts": {
|
||||||
@ -99,11 +93,11 @@
|
|||||||
"nixpkgs-lib": "nixpkgs-lib"
|
"nixpkgs-lib": "nixpkgs-lib"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1704982712,
|
"lastModified": 1733312601,
|
||||||
"narHash": "sha256-2Ptt+9h8dczgle2Oo6z5ni5rt/uLMG47UFTR1ry/wgg=",
|
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
|
||||||
"owner": "hercules-ci",
|
"owner": "hercules-ci",
|
||||||
"repo": "flake-parts",
|
"repo": "flake-parts",
|
||||||
"rev": "07f6395285469419cf9d078f59b5b49993198c00",
|
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
description = "eve-psr-nix0 - Home Server";
|
description = "eve-psr-nix0 - Home Server";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "nixpkgs/nixos-23.11";
|
nixpkgs.url = "nixpkgs/nixos-24.11";
|
||||||
agenix = {
|
agenix = {
|
||||||
url = "github:ryantm/agenix";
|
url = "github:ryantm/agenix";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
@ -52,23 +52,23 @@
|
|||||||
./nix/application/containers.nix
|
./nix/application/containers.nix
|
||||||
./nix/application/miniflux.nix
|
./nix/application/miniflux.nix
|
||||||
./nix/application/nginx.nix
|
./nix/application/nginx.nix
|
||||||
|
./nix/application/postgresql.nix
|
||||||
|
|
||||||
./nix/monitoring/nginx.nix
|
./nix/monitoring/nginx.nix
|
||||||
./nix/monitoring/grafana.nix
|
./nix/monitoring/grafana.nix
|
||||||
./nix/monitoring/prometheus.nix
|
./nix/monitoring/prometheus.nix
|
||||||
./nix/monitoring/loki.nix
|
|
||||||
./nix/monitoring/promtail.nix
|
|
||||||
|
|
||||||
./nix/system/age.nix
|
./nix/system/age.nix
|
||||||
|
./nix/system/backups.nix
|
||||||
./nix/system/dns.nix
|
./nix/system/dns.nix
|
||||||
./nix/system/hardware.nix
|
./nix/system/hardware.nix
|
||||||
./nix/system/nix-conf.nix
|
./nix/system/nix-conf.nix
|
||||||
./nix/system/network.nix
|
./nix/system/network.nix
|
||||||
./nix/system/openvpn.nix
|
|
||||||
./nix/system/overlays.nix
|
./nix/system/overlays.nix
|
||||||
./nix/system/security.nix
|
./nix/system/security.nix
|
||||||
./nix/system/system.nix
|
./nix/system/system.nix
|
||||||
./nix/system/virtualisation.nix
|
./nix/system/virtualisation.nix
|
||||||
|
./nix/system/wireguard.nix
|
||||||
|
|
||||||
./nix/user/users.nix
|
./nix/user/users.nix
|
||||||
];
|
];
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
jellyfin = {
|
jellyfin = {
|
||||||
image = "linuxserver/jellyfin:10.8.13";
|
image = "linuxserver/jellyfin:latest";
|
||||||
ports = [ "8096:8096" "8920:8920" ];
|
ports = [ "8096:8096" "8920:8920" ];
|
||||||
volumes = [
|
volumes = [
|
||||||
"/home/sezycei/srv/containerdata/jellyfin/config:/config"
|
"/home/sezycei/srv/containerdata/jellyfin/config:/config"
|
||||||
@ -94,7 +94,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
softserve = {
|
softserve = {
|
||||||
image = "charmcli/soft-serve:v0.7.3";
|
image = "charmcli/soft-serve:v0.8.1";
|
||||||
ports = [
|
ports = [
|
||||||
"23231:23231"
|
"23231:23231"
|
||||||
"23232:23232"
|
"23232:23232"
|
||||||
@ -105,24 +105,34 @@
|
|||||||
environment = {
|
environment = {
|
||||||
SOFT_SERVE_NAME = "git.eversole.co";
|
SOFT_SERVE_NAME = "git.eversole.co";
|
||||||
SOFT_SERVE_HTTP_PUBLIC_URL = "git.eversole.co";
|
SOFT_SERVE_HTTP_PUBLIC_URL = "git.eversole.co";
|
||||||
SOFT_SERVE_GIT_MAX_CONNECTIONS = "5";
|
SOFT_SERVE_GIT_MAX_CONNECTIONS = "10";
|
||||||
SOFT_SERVE_INITIAL_ADMIN_KEYS = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCzsewMuoEbC0DwwNK23ZJb/ncpNtUuEgZNI2EdAsc7RnhIOhQBxj237qNMhh2mF/8hkASJZ2e4wrmNkjBM7aaz8mrcDY9rG23JMfnGiP4cU6dBC/NqHOuJypt6X28FI5I+dgw2T40sdIbkWAXOr5u5EAJcO6ROdas4zYSPHwl95s3txoGtQrQtgLHgddWMCr53n5KMwFUmqwM1ovVPZplZGaGG5m6VwBkjA0GZQPVFC+RIg6kIp9vUlsAlzPrlDqhTR32jazvaONNBsyUTuE+CJjitU4xoBs67jIFTcesMiFdThKt2HTq1AhXqiUgIfKaDvHfjzWLT8GihxDLpTBxS8G1qWlvkSja09nB/Pn1Y6XqgczM/y51OloowbvuskDZleFoapSYmJdq+rqSCoJ3JCykNGOcpdSBCucnDgR6CHEUPkJJoR0iCrK0ACEIxWhFuSterh/P8gxcH3e2PdcgxO8SfSBagdizOnDsWOw1SR8w6wVOLRrczMyx3hDXoabs= james@eversole.co";
|
SOFT_SERVE_INITIAL_ADMIN_KEYS = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCzsewMuoEbC0DwwNK23ZJb/ncpNtUuEgZNI2EdAsc7RnhIOhQBxj237qNMhh2mF/8hkASJZ2e4wrmNkjBM7aaz8mrcDY9rG23JMfnGiP4cU6dBC/NqHOuJypt6X28FI5I+dgw2T40sdIbkWAXOr5u5EAJcO6ROdas4zYSPHwl95s3txoGtQrQtgLHgddWMCr53n5KMwFUmqwM1ovVPZplZGaGG5m6VwBkjA0GZQPVFC+RIg6kIp9vUlsAlzPrlDqhTR32jazvaONNBsyUTuE+CJjitU4xoBs67jIFTcesMiFdThKt2HTq1AhXqiUgIfKaDvHfjzWLT8GihxDLpTBxS8G1qWlvkSja09nB/Pn1Y6XqgczM/y51OloowbvuskDZleFoapSYmJdq+rqSCoJ3JCykNGOcpdSBCucnDgR6CHEUPkJJoR0iCrK0ACEIxWhFuSterh/P8gxcH3e2PdcgxO8SfSBagdizOnDsWOw1SR8w6wVOLRrczMyx3hDXoabs= james@eversole.co";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
transmission = {
|
transmission = {
|
||||||
image = "haugene/transmission-openvpn:5";
|
image = "haugene/transmission-openvpn:5.3.1";
|
||||||
ports = [ "9091:9091" ];
|
ports = [ "9091:9091" ];
|
||||||
volumes = [
|
volumes = [
|
||||||
"/home/sezycei/srv/scripts/transmission/settings.json:/etc/transmission-daemon/settings.json"
|
"/home/sezycei/srv/scripts/transmission/settings.json:/etc/transmission-daemon/settings.json"
|
||||||
"/etc/localtime:/etc/localtime:ro"
|
"/etc/localtime:/etc/localtime:ro"
|
||||||
"/home/torrent/data:/data"
|
"/home/torrent/data:/data"
|
||||||
|
"/home/sezycei/srv/scripts/transmission/custom-data:/etc/openvpn/custom"
|
||||||
];
|
];
|
||||||
environmentFiles =
|
environmentFiles =
|
||||||
[ config.age.secrets.transmission-env.path ];
|
[ config.age.secrets.transmission-env.path ];
|
||||||
extraOptions = [ "--cap-add=NET_ADMIN" "--privileged" ];
|
extraOptions = [ "--cap-add=NET_ADMIN" "--privileged" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
vaultwarden = {
|
||||||
|
image = "vaultwarden/server:1.32.7";
|
||||||
|
ports = [ "40080:80" ];
|
||||||
|
volumes = [
|
||||||
|
"/home/sezycei/srv/containerdata/bitwarden/data:/data"
|
||||||
|
];
|
||||||
|
environmentFiles = [ config.age.secrets.bitwarden-env.path ];
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -45,6 +45,7 @@
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
"atuin.matri.cx" = proxied { target = "http://127.0.0.1:8888"; };
|
"atuin.matri.cx" = proxied { target = "http://127.0.0.1:8888"; };
|
||||||
|
"brohan.lol" = static { dir = "/var/www/brohan.lol"; };
|
||||||
"cache.matri.cx" = proxiedLAN {
|
"cache.matri.cx" = proxiedLAN {
|
||||||
target = "http://${config.services.nix-serve.bindAddress}:${toString config.services.nix-serve.port}";
|
target = "http://${config.services.nix-serve.bindAddress}:${toString config.services.nix-serve.port}";
|
||||||
};
|
};
|
||||||
@ -75,6 +76,7 @@
|
|||||||
"jame.su" = static { dir = "/var/www/jame.su"; };
|
"jame.su" = static { dir = "/var/www/jame.su"; };
|
||||||
"matri.cx" = static { dir = "/var/www/matri.cx"; };
|
"matri.cx" = static { dir = "/var/www/matri.cx"; };
|
||||||
"media.matri.cx" = proxied { target = "http://127.0.0.1:8096"; };
|
"media.matri.cx" = proxied { target = "http://127.0.0.1:8096"; };
|
||||||
|
"pw.eversole.co" = proxied { target = "http://127.0.0.1:40080"; };
|
||||||
"sezycei.com" = static { dir = "/var/www/sezycei.com"; };
|
"sezycei.com" = static { dir = "/var/www/sezycei.com"; };
|
||||||
"snakebelmont.com" = static { dir = "/var/www/snakebelmont.com"; };
|
"snakebelmont.com" = static { dir = "/var/www/snakebelmont.com"; };
|
||||||
"transmission.matri.cx" = proxiedLAN { target = "http://127.0.0.1:9091"; };
|
"transmission.matri.cx" = proxiedLAN { target = "http://127.0.0.1:9091"; };
|
||||||
|
6
nix/application/postgresql.nix
Normal file
6
nix/application/postgresql.nix
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{ pkgs, config, ...}: {
|
||||||
|
services.postgresql = {
|
||||||
|
enable = true;
|
||||||
|
settings.port = 5432;
|
||||||
|
};
|
||||||
|
}
|
@ -10,12 +10,6 @@
|
|||||||
access = "proxy";
|
access = "proxy";
|
||||||
url = "http://127.0.0.1:${toString config.services.prometheus.port}";
|
url = "http://127.0.0.1:${toString config.services.prometheus.port}";
|
||||||
}
|
}
|
||||||
{
|
|
||||||
name = "Loki";
|
|
||||||
type = "loki";
|
|
||||||
access = "proxy";
|
|
||||||
url = "http://127.0.0.1:${toString config.services.loki.configuration.server.http_listen_port}";
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
settings = {
|
settings = {
|
||||||
|
@ -1,76 +0,0 @@
|
|||||||
{ config, pkgs, ... }: {
|
|
||||||
services.loki = {
|
|
||||||
enable = true;
|
|
||||||
configuration = {
|
|
||||||
server.http_listen_port = 6999;
|
|
||||||
auth_enabled = false;
|
|
||||||
|
|
||||||
ingester = {
|
|
||||||
lifecycler = {
|
|
||||||
address = "127.0.0.1";
|
|
||||||
ring = {
|
|
||||||
kvstore = {
|
|
||||||
store = "inmemory";
|
|
||||||
};
|
|
||||||
replication_factor = 1;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
chunk_idle_period = "1h";
|
|
||||||
max_chunk_age = "1h";
|
|
||||||
chunk_target_size = 999999;
|
|
||||||
chunk_retain_period = "30s";
|
|
||||||
max_transfer_retries = 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
schema_config = {
|
|
||||||
configs = [{
|
|
||||||
from = "2022-06-06";
|
|
||||||
store = "boltdb-shipper";
|
|
||||||
object_store = "filesystem";
|
|
||||||
schema = "v11";
|
|
||||||
index = {
|
|
||||||
prefix = "index_";
|
|
||||||
period = "24h";
|
|
||||||
};
|
|
||||||
}];
|
|
||||||
};
|
|
||||||
|
|
||||||
storage_config = {
|
|
||||||
boltdb_shipper = {
|
|
||||||
active_index_directory = "/var/lib/loki/boltdb-shipper-active";
|
|
||||||
cache_location = "/var/lib/loki/boltdb-shipper-cache";
|
|
||||||
cache_ttl = "24h";
|
|
||||||
shared_store = "filesystem";
|
|
||||||
};
|
|
||||||
|
|
||||||
filesystem = {
|
|
||||||
directory = "/var/lib/loki/chunks";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
limits_config = {
|
|
||||||
reject_old_samples = true;
|
|
||||||
reject_old_samples_max_age = "168h";
|
|
||||||
};
|
|
||||||
|
|
||||||
chunk_store_config = {
|
|
||||||
max_look_back_period = "0s";
|
|
||||||
};
|
|
||||||
|
|
||||||
table_manager = {
|
|
||||||
retention_deletes_enabled = false;
|
|
||||||
retention_period = "0s";
|
|
||||||
};
|
|
||||||
|
|
||||||
compactor = {
|
|
||||||
working_directory = "/var/lib/loki";
|
|
||||||
shared_store = "filesystem";
|
|
||||||
compactor_ring = {
|
|
||||||
kvstore = {
|
|
||||||
store = "inmemory";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
@ -16,16 +16,6 @@ in
|
|||||||
"127.0.0.1:${toString config.services.prometheus.port}" = { };
|
"127.0.0.1:${toString config.services.prometheus.port}" = { };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"loki" = {
|
|
||||||
servers = {
|
|
||||||
"127.0.0.1:${toString config.services.loki.configuration.server.http_listen_port}" = { };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
"promtail" = {
|
|
||||||
servers = {
|
|
||||||
"127.0.0.1:${toString config.services.promtail.configuration.server.http_listen_port}" = { };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
virtualHosts."graf.matri.cx" = {
|
virtualHosts."graf.matri.cx" = {
|
||||||
@ -56,21 +46,5 @@ in
|
|||||||
port = 8020;
|
port = 8020;
|
||||||
}];
|
}];
|
||||||
};
|
};
|
||||||
|
|
||||||
virtualHosts.loki = {
|
|
||||||
locations."/".proxyPass = "http://loki";
|
|
||||||
listen = [{
|
|
||||||
addr = hostIP;
|
|
||||||
port = 8030;
|
|
||||||
}];
|
|
||||||
};
|
|
||||||
|
|
||||||
virtualHosts.promtail = {
|
|
||||||
locations."/".proxyPass = "http://promtail";
|
|
||||||
listen = [{
|
|
||||||
addr = hostIP;
|
|
||||||
port = 8031;
|
|
||||||
}];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,31 +0,0 @@
|
|||||||
{ config, pkgs, ... }: {
|
|
||||||
services.promtail = {
|
|
||||||
enable = true;
|
|
||||||
configuration = {
|
|
||||||
server = {
|
|
||||||
http_listen_port = 6998;
|
|
||||||
grpc_listen_port = 0;
|
|
||||||
};
|
|
||||||
positions = {
|
|
||||||
filename = "/tmp/positions.yaml";
|
|
||||||
};
|
|
||||||
clients = [{
|
|
||||||
url = "http://127.0.0.1:${toString config.services.loki.configuration.server.http_listen_port}/loki/api/v1/push";
|
|
||||||
}];
|
|
||||||
scrape_configs = [{
|
|
||||||
job_name = "journal";
|
|
||||||
journal = {
|
|
||||||
max_age = "12h";
|
|
||||||
labels = {
|
|
||||||
job = "systemd-journal";
|
|
||||||
host = "pihole";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
relabel_configs = [{
|
|
||||||
source_labels = [ "__journal__systemd_unit" ];
|
|
||||||
target_label = "unit";
|
|
||||||
}];
|
|
||||||
}];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
@ -18,7 +18,12 @@
|
|||||||
};
|
};
|
||||||
keys.file = ../../secrets/keys.age;
|
keys.file = ../../secrets/keys.age;
|
||||||
miniflux.file = ../../secrets/miniflux.age;
|
miniflux.file = ../../secrets/miniflux.age;
|
||||||
|
bitwarden-env.file = ../../secrets/bitwarden-env.age;
|
||||||
transmission-env.file = ../../secrets/transmission-env.age;
|
transmission-env.file = ../../secrets/transmission-env.age;
|
||||||
|
"restic/env".file = ../../secrets/restic/env.age;
|
||||||
|
"restic/password".file = ../../secrets/restic/env.age;
|
||||||
|
"restic/repo".file = ../../secrets/restic/env.age;
|
||||||
|
"wireguard/server-private".file = ../../secrets/wireguard/server-private.age;
|
||||||
};
|
};
|
||||||
identityPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
identityPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
||||||
};
|
};
|
||||||
|
28
nix/system/backups.nix
Normal file
28
nix/system/backups.nix
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
{ pkgs, config, ...}: {
|
||||||
|
services.restic.backups = {
|
||||||
|
daily = {
|
||||||
|
initialize = true;
|
||||||
|
|
||||||
|
environmentFile = config.age.secrets."restic/env".path;
|
||||||
|
passwordFile = config.age.secrets."restic/password".path;
|
||||||
|
repository = "s3:https://s3.amazonaws.com/matricxbackups";
|
||||||
|
|
||||||
|
paths = [
|
||||||
|
"${config.users.users.sezycei.home}/srv"
|
||||||
|
"${config.users.users.sezycei.home}/nix"
|
||||||
|
"${config.users.users.sezycei.home}/keys"
|
||||||
|
"${config.users.users.sezycei.home}/dev"
|
||||||
|
];
|
||||||
|
|
||||||
|
exclude = [
|
||||||
|
"*minecraft/OLD*"
|
||||||
|
];
|
||||||
|
|
||||||
|
pruneOpts = [
|
||||||
|
"--keep-daily 7"
|
||||||
|
"--keep-weekly 5"
|
||||||
|
"--keep-monthly 12"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -59,6 +59,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
*.ycombinator.com {
|
||||||
|
template IN A {
|
||||||
|
answer "{{ .Name }} 0 IN A 127.0.0.1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
wired.com {
|
wired.com {
|
||||||
template IN A {
|
template IN A {
|
||||||
answer "{{ .Name }} 0 IN A 127.0.0.1"
|
answer "{{ .Name }} 0 IN A 127.0.0.1"
|
||||||
|
@ -2,14 +2,14 @@
|
|||||||
networking = {
|
networking = {
|
||||||
hostName = "eve-psr-nix0";
|
hostName = "eve-psr-nix0";
|
||||||
firewall = {
|
firewall = {
|
||||||
allowedTCPPorts = [ 22 80 443 7860 23231 23232 23233 9418 3000 ];
|
allowedTCPPorts = [ 22 80 443 23231 23232 23233 ];
|
||||||
allowedUDPPorts = [ 53 1194 ];
|
allowedUDPPorts = [ 53 51820 ];
|
||||||
trustedInterfaces = [ "tun0" ];
|
trustedInterfaces = [ "tun0" ];
|
||||||
};
|
};
|
||||||
nat = {
|
nat = {
|
||||||
enable = true;
|
enable = true;
|
||||||
externalInterface = "enp1s0";
|
externalInterface = "enp1s0";
|
||||||
internalInterfaces = [ "tun0" ];
|
internalInterfaces = [ "tun0" "wg0" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,56 +0,0 @@
|
|||||||
{ config, pkgs, ... }:
|
|
||||||
let
|
|
||||||
client-key = "/home/sezycei/srv/sec/openvpn/James/laptop.key";
|
|
||||||
domain = "matri.cx";
|
|
||||||
port = 1194;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
services.openvpn.servers.laptop.config = ''
|
|
||||||
dev tun0
|
|
||||||
proto udp
|
|
||||||
ifconfig 10.8.0.1 10.8.0.2
|
|
||||||
secret ${client-key}
|
|
||||||
port ${toString port}
|
|
||||||
|
|
||||||
cipher AES-256-CBC
|
|
||||||
auth-nocache
|
|
||||||
|
|
||||||
comp-lzo
|
|
||||||
keepalive 10 60
|
|
||||||
ping-timer-rem
|
|
||||||
persist-tun
|
|
||||||
persist-key
|
|
||||||
'';
|
|
||||||
|
|
||||||
environment.etc."openvpn/laptop-client.ovpn" = {
|
|
||||||
text = ''
|
|
||||||
dev tun
|
|
||||||
remote "${domain}"
|
|
||||||
ifconfig 10.8.0.2 10.8.0.1
|
|
||||||
port ${toString port}
|
|
||||||
redirect-gateway def1
|
|
||||||
|
|
||||||
cipher AES-256-CBC
|
|
||||||
auth-nocache
|
|
||||||
|
|
||||||
comp-lzo
|
|
||||||
keepalive 10 60
|
|
||||||
resolv-retry infinite
|
|
||||||
nobind
|
|
||||||
persist-key
|
|
||||||
persist-tun
|
|
||||||
secret [inline]
|
|
||||||
|
|
||||||
'';
|
|
||||||
mode = "600";
|
|
||||||
};
|
|
||||||
system.activationScripts.openvpn-addkey = ''
|
|
||||||
f="/etc/openvpn/laptop-client.ovpn"
|
|
||||||
if ! grep -q '<secret>' $f; then
|
|
||||||
echo "appending secret key"
|
|
||||||
echo "<secret>" >> $f
|
|
||||||
cat ${client-key} >> $f
|
|
||||||
echo "</secret>" >> $f
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
}
|
|
@ -1,6 +1,9 @@
|
|||||||
{ ... }: {
|
{ ... }: {
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
PasswordAuthentication = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
security = {
|
security = {
|
||||||
|
33
nix/system/wireguard.nix
Normal file
33
nix/system/wireguard.nix
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
{ pkgs, config, lib, ...}: {
|
||||||
|
networking.wireguard.interfaces = {
|
||||||
|
wg0 = {
|
||||||
|
ips = [ "192.168.3.1/24" ];
|
||||||
|
listenPort = 51820;
|
||||||
|
privateKeyFile = "/run/agenix/wireguard/server-private";
|
||||||
|
|
||||||
|
peers = [
|
||||||
|
#
|
||||||
|
# James
|
||||||
|
#
|
||||||
|
{ # Primary Cell
|
||||||
|
publicKey = "jko+bd/y1+3X40/AGX9OpV2H/Wlb9C2Jwkfs4Knjljg=";
|
||||||
|
allowedIPs = [ "192.168.3.2/32" ];
|
||||||
|
}
|
||||||
|
#
|
||||||
|
# Caitlynn
|
||||||
|
#
|
||||||
|
{ # Primary Cell
|
||||||
|
publicKey = "Xbp3+huOWE0sTcWtk5BA2Qc4gk5vjFVgE6+qYJBpgkY=";
|
||||||
|
allowedIPs = [ "192.168.3.3/32" ];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
postSetup = ''
|
||||||
|
${pkgs.iptables}/bin/iptables -t nat -A POSTROUTING -s 192.168.3.0/24 -o eth0 -j MASQUERADE
|
||||||
|
'';
|
||||||
|
postShutdown = ''
|
||||||
|
${pkgs.iptables}/bin/iptables -t nat -D POSTROUTING -s 192.168.3.0/24 -o eth0 -j MASQUERADE
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -13,5 +13,10 @@ in
|
|||||||
"secrets/htpasswd-dock.age" = { publicKeys = all; };
|
"secrets/htpasswd-dock.age" = { publicKeys = all; };
|
||||||
"secrets/keys.age" = { publicKeys = all; };
|
"secrets/keys.age" = { publicKeys = all; };
|
||||||
"secrets/miniflux.age" = { publicKeys = all; };
|
"secrets/miniflux.age" = { publicKeys = all; };
|
||||||
|
"secrets/bitwarden-env.age" = { publicKeys = all; };
|
||||||
"secrets/transmission-env.age" = { publicKeys = all; };
|
"secrets/transmission-env.age" = { publicKeys = all; };
|
||||||
|
"secrets/restic/env.age" = { publicKeys = all; };
|
||||||
|
"secrets/restic/repo.age" = { publicKeys = all; };
|
||||||
|
"secrets/restic/password.age" = { publicKeys = all; };
|
||||||
|
"secrets/wireguard/server-private.age" = { publicKeys = all; };
|
||||||
}
|
}
|
||||||
|
BIN
secrets/bitwarden-env.age
Normal file
BIN
secrets/bitwarden-env.age
Normal file
Binary file not shown.
10
secrets/restic/env.age
Normal file
10
secrets/restic/env.age
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
age-encryption.org/v1
|
||||||
|
-> ssh-ed25519 dQ70Fw hMZ1BRCxnZFhadsHa+UwDcB+kkVWbTh82EuqNJPZ5zs
|
||||||
|
ESCOn4IDH8L69yNmE3vl9ORK0vKkIqG6dFTnawc9irg
|
||||||
|
-> ssh-ed25519 ZIoeGg yluZnRqV6HL0TNvFqZCEIYW4W8f6f9EJ3K7nAz/dazE
|
||||||
|
XpYM/h/jvO1MrS6v1PicZ4sTqCld84vhvXTI6AimnMU
|
||||||
|
--- nLun26t45i7mAuT4w6JH3jbdPU8hjzINsHriqRA/T0o
|
||||||
|
S‡ß9›µnĚŤzšëźu83Š¸6#Lď[25Ď
)áí{z(hťĹŻ˛ę°'.$ę‰Ţ‹PÓOgĆ]¬ç=€Ľő<C4BD>ňűâŇŐ>ŕµy)ÁĐ]ů04×Ä“/Ă™·ŚÁIW4Úő`RÔŢ›6aĆ BŰç—8[~Ę‚oÓíů·<0B>m×Í«€}¬ ~ŁaĐ«@<40>SʸůúĘ<C3BA>ń<><11>iŹčsc,ú
|
||||||
|
Š´ü^ĹG]|‹áN4<4E>ç-ŃŞŐĹ)GbĹçŐõ:ÁăÍ0IŤ™g˙Gü\"ň
|
||||||
|
Čf
|
||||||
|
Ć{°˛{Z÷'V>s4A
|
7
secrets/restic/password.age
Normal file
7
secrets/restic/password.age
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
age-encryption.org/v1
|
||||||
|
-> ssh-ed25519 dQ70Fw SztmSLi86IFvNJY13Pu7qJC8LDXeoEZsbCLl78su6wg
|
||||||
|
f/uDl6KymRxVngdnhEYOxiL9I0JUZCYI3XThrn57+YQ
|
||||||
|
-> ssh-ed25519 ZIoeGg wzOmbThAqyO47PQ2wQY0MoNsXcyMkoi4/+wGY15Xfns
|
||||||
|
UvMwHPWytwvf0hNMiDKdONo1u09pICQ6/7EtECYDWbw
|
||||||
|
--- IS6+hxeJQ3yIphn7Q0XxZvO2Zn+F1bX7oIgkZSkCQHU
|
||||||
|
ÿÕ•Þô\\w"¤úìêTp;ÇÈGŽešÖñ²±=D‹fßYØn€±x¹<K`÷îÔ
|
BIN
secrets/restic/repo.age
Normal file
BIN
secrets/restic/repo.age
Normal file
Binary file not shown.
Binary file not shown.
8
secrets/wireguard/server-private.age
Normal file
8
secrets/wireguard/server-private.age
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
age-encryption.org/v1
|
||||||
|
-> ssh-ed25519 dQ70Fw ZqaqvUw6odr77kBeC+N9p8bFMYzD7MLCSAVi302J2VQ
|
||||||
|
BUJX5uq5cd3jOFNOUnDHdcxV8OPkcY+W/aJnY3XaLCI
|
||||||
|
-> ssh-ed25519 ZIoeGg y4LMGxFwIpd96YK7HjOQoHumpYqTklh1i3utAUTrMgg
|
||||||
|
37dz1lwZoHwCwrTsaCnX9mrQzGrEoP5RHjNV0Kasid4
|
||||||
|
--- 4tniCsqDuqZYGNn98GmgV8BS18E+0ANnjKWQU4wWHOs
|
||||||
|
¹Â?;HŠª ˜&{û Ńt•c«y8<#É༄ªm¾±äk8
|
||||||
|
šPèKH¬ÆÁ±Ow˜Ôéf¶}¿Pº`¯¾+…ßÝ5wÉot
|
Loading…
x
Reference in New Issue
Block a user