Website and related stuff https://kyouma.net
Find a file
2024-05-13 12:10:35 +02:00
src css spacing 2024-01-23 22:01:16 +01:00
.gitignore refactor some stuff 2024-01-23 19:01:06 +01:00
flake.lock flake.lock: Update 2024-05-10 14:21:53 +02:00
flake.nix added hydraJobs 2024-05-13 12:10:35 +02:00
README.md added readme 2024-01-20 14:41:27 +01:00

Deploying using NixOS

Requirements:

  • flakes
  • Have the inputs attrset avaiable in the module args.

Add this flake to your inputs:

inputs.kyouma-www.url = "git+https://git.bsd.gay/snaki/kyouma-net";

Import the module and declare your config:

{ 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;
          '';
        };
      };
    };
  };
}