From 16b9377dff02cf522f15a181a3a7c783ec60f67c Mon Sep 17 00:00:00 2001 From: emily Date: Thu, 18 Jan 2024 12:23:40 +0100 Subject: [PATCH] added readme --- README.md | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..ee9db87 --- /dev/null +++ b/README.md @@ -0,0 +1,48 @@ +## Deploying using NixOS + +Requirements: + - flakes + - Have the `inputs` attrset avaiable in the module args. + +Add this flake to your inputs: +```nix +inputs.kyouma-www.url = "git+https://git.bsd.gay/snaki/kyouma-net"; +``` + +Import the module and declare your config: +```nix +{ inputs, config, ... }: + +let + kyouma-www = inputs.kyouma-www.packages.${config.nixpkgs.hostPlatform.system}; +in { + imports = [ + inputs.kyouma-www.nixosModules.default + ]; + services.vyosBld = { + enable = true; + output = "/var/www/example.org/vyos"; + buildFlags = { + architecture = "amd64"; + build-by = "foo@example.org"; + build-type = "release"; + version = "1.5-$(date %Y%m%d)"; + }; + }; + services.nginx = { + "example.org" = { + root = kyouma-www.default; + locations = { + "/assets/media/".root = kyouma-www.vid; + "/vyos/" = { + root = config.services.vyosBld.output; + extraConfig = '' + autoindex on; + autoindex_exact_size off; + ''; + }; + }; + }; + }; +} +```