diff options
author | Emile <git@emile.space> | 2024-09-13 15:04:06 +0200 |
---|---|---|
committer | Emile <git@emile.space> | 2024-09-13 15:04:06 +0200 |
commit | 35d6c2c70824cf77ef2216889cc9730b622f5ac1 (patch) | |
tree | 2435a97f87409deb57c279fb41534e0d10c901ca /nix/hosts/corrino/www/nix-cache | |
parent | 902c97cf9aa16c5bb4a45b28f182e4d6033156e7 (diff) |
big push
Diffstat (limited to 'nix/hosts/corrino/www/nix-cache')
-rw-r--r-- | nix/hosts/corrino/www/nix-cache/default.nix | 7 | ||||
-rw-r--r-- | nix/hosts/corrino/www/nix-cache/index.txt | 22 | ||||
-rw-r--r-- | nix/hosts/corrino/www/nix-cache/nix-cache.emile.space.nix | 58 |
3 files changed, 87 insertions, 0 deletions
diff --git a/nix/hosts/corrino/www/nix-cache/default.nix b/nix/hosts/corrino/www/nix-cache/default.nix new file mode 100644 index 0000000..da2537c --- /dev/null +++ b/nix/hosts/corrino/www/nix-cache/default.nix @@ -0,0 +1,7 @@ +{ ... }: + +{ + imports = [ + ./nix-cache.emile.space.nix + ]; +} diff --git a/nix/hosts/corrino/www/nix-cache/index.txt b/nix/hosts/corrino/www/nix-cache/index.txt new file mode 100644 index 0000000..514b288 --- /dev/null +++ b/nix/hosts/corrino/www/nix-cache/index.txt @@ -0,0 +1,22 @@ +Nix Cache by emile + +Public key: + + nix-cache.emile.space:3xzJknXMsR/EL3SBTu6V6oCOkjxe6MgJm0nOrElW33A= + +NixOS Configuration: + + nix.settings = { + substituters = [ + "https://nix-cache.emile.space" + ]; + trusted-public-keys = [ + "nix-cache.emile.space:3xzJknXMsR/EL3SBTu6V6oCOkjxe6MgJm0nOrElW33A=" + ]; + } + +Try: + + nix build --substituters "https://nix-cache.emile.space" \ + --trusted-public-keys "nix-cache.emile.space:3xzJknXMsR/EL3SBTu6V6oCOkjxe6MgJm0nOrElW33A=" \ + "git+https://git.emile.space/hefe.git#r2wars-web" diff --git a/nix/hosts/corrino/www/nix-cache/nix-cache.emile.space.nix b/nix/hosts/corrino/www/nix-cache/nix-cache.emile.space.nix new file mode 100644 index 0000000..690e422 --- /dev/null +++ b/nix/hosts/corrino/www/nix-cache/nix-cache.emile.space.nix @@ -0,0 +1,58 @@ +{ ... }: + +{ + services.nginx.virtualHosts."nix-cache.emile.space" = { + forceSSL = false; + enableACME = false; + }; + # locations = { + # "/" = { + # root = "/var/www/emile.space"; + # extraConfig = '' + # add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; + # ''; + # }; + # }; + # locations."= /" = { + # index = "/index.txt"; + # }; + # locations."= /index.txt" = { + # root = ./index.txt; + # }; + # locations."= /nix/store/" = { + # extraConfig = '' + # return 404; + # ''; + # }; + # locations."/nix/store/" = { + # root = "/"; + # extraConfig = '' + # autoindex on; + # autoindex_exact_size off; + # ''; + # }; + # locations."/" = { + # proxyPass = "http://${config.services.harmonia.settings.bind}"; + # extraConfig = '' + # proxy_set_header Host $host; + # proxy_redirect http:// https://; + # proxy_http_version 1.1; + # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + # proxy_set_header Upgrade $http_upgrade; + # proxy_set_header Connection $connection_upgrade; + + # zstd on; + # zstd_types application/x-nix-archive; + # ''; + # }; + # }; + + # services.harmonia = { + # enable = true; + + # # TODO(emile): manage this using age + # signKeyPath = "/var/lib/secrets/harmonia.secret"; + + # settings.bind = "[::1]:${toString config.emile.ports.harmonia}"; + # }; +} |