summaryrefslogtreecommitdiff
path: root/tests/configuration.nix
diff options
context:
space:
mode:
authorquentin@aristote.fr <quentin@aristote.fr>2026-11-29 17:24:18 +0100
committerquentin@aristote.fr <quentin@aristote.fr>2026-11-29 17:42:35 +0100
commitce831333a24011d0692f6871047fe74eab9fab8c (patch)
tree9bb971e2afe0a4b22c73274e8b8e8d05d014401d /tests/configuration.nix
downloadhermaphroditos-ce831333a24011d0692f6871047fe74eab9fab8c.tar.gz
hermaphroditos-ce831333a24011d0692f6871047fe74eab9fab8c.tar.bz2
hermaphroditos-ce831333a24011d0692f6871047fe74eab9fab8c.tar.xz
initial commit
Diffstat (limited to 'tests/configuration.nix')
-rw-r--r--tests/configuration.nix75
1 files changed, 75 insertions, 0 deletions
diff --git a/tests/configuration.nix b/tests/configuration.nix
new file mode 100644
index 0000000..3d81f07
--- /dev/null
+++ b/tests/configuration.nix
@@ -0,0 +1,75 @@
+{
+ config,
+ lib,
+ ...
+}:
+let
+ nginxPorts = lib.concatLists (
+ lib.mapAttrsToList (
+ _: cfg: (builtins.map (x: x.port) cfg.listen)
+ ) config.services.nginx.virtualHosts
+ );
+ nginxMakeLocal = port: {
+ listen = lib.mkForce [
+ {
+ inherit port;
+ addr = "0.0.0.0";
+ }
+ ];
+ forceSSL = lib.mkForce false;
+ enableACME = lib.mkForce false;
+ };
+in
+{
+ imports = [ ../config ];
+
+ boot = {
+ isContainer = true;
+ isNspawnContainer = true;
+ };
+
+ networking = lib.mkForce {
+ domain = "aristote.vm";
+
+ interfaces = { };
+ defaultGateway = null;
+ nameservers = [ ];
+
+ firewall = {
+ allowedTCPPorts = nginxPorts;
+ };
+
+ dhcpcd.enable = false;
+ };
+
+ personal.system.autoUpgrade.enable = lib.mkForce false;
+
+ services.tailscale.enable = lib.mkForce false;
+
+ services.resolved.enable = lib.mkForce false;
+
+ services.rss-bridge.debug = true;
+
+ services.headscale.settings.server_url = lib.mkForce "http://10.233.1.2:8085/";
+
+ services.nginx.virtualHosts = {
+ quentin = nginxMakeLocal 8080;
+ rss = nginxMakeLocal 8082;
+ webkeydirectory = nginxMakeLocal 8083;
+ mesh = nginxMakeLocal 8084;
+ git = nginxMakeLocal 8086;
+ dav = nginxMakeLocal 8087;
+ };
+
+ environment.etc = {
+ "searx/secrets".text = ''
+ SECRET_KEY=secret_key
+ '';
+ "msmtp/secrets".text = ''
+ password
+ '';
+ "radicale/.htpasswd".text = ''
+ user:$apr1$e1OqTkNV$c.2giw6XR9Atjm32B/hkn.
+ '';
+ };
+}