Website and related stuff https://kyouma.net
Find a file
emily fc34094fc6
flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/062ca2a9370a27a35c524dc82d540e6e9824b652?narHash=sha256-VsVAUQOj/cS1LCOmMjAGeRksXIAdPnFIjCQ0XLkCsT0%3D' (2024-05-11)
  → 'github:nixos/nixpkgs/a71e967ef3694799d0c418c98332f7ff4cc5f6af?narHash=sha256-CyyxvOwFf12I91PBWz43iGT1kjsf5oi6ax7CrvaMyAo%3D' (2024-06-22)
2024-06-24 13:36:04 +02:00
src Fix quotation in video element 2024-06-24 13:32:01 +02:00
.gitignore refactor some stuff 2024-01-23 19:01:06 +01:00
flake.lock flake.lock: Update 2024-06-24 13:36:04 +02:00
flake.nix added hydraJobs 2024-05-13 12:10:35 +02:00
README.md Change git url 2024-06-19 16:52:34 +02: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://woof.rip/emily/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;
          '';
        };
      };
    };
  };
}