ozkutuk / espial-nix

A flake providing a NixOS module for the Espial bookmarking server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

espial-nix [WIP]

espial-nix is a Nix flake providing a NixOS module for the Espial bookmarking server.

Usage

In your NixOS system configuration, add this flake to your inputs and enable the provided Espial module. As of 2023-02-21, espial on nixpkgs/master is broken, so adding the nixpkgs' haskell-updates branch to your flake inputs as well may also be desirable:

{
  inputs = {
    espial-nix.url = "github:ozkutuk/espial-nix";
    haskell-updates.url = "github:NixOS/nixpkgs/haskell-updates";
  };

  outputs = { self, nixpkgs, espial-nix, haskell-updates }:
    let
      system = "x86_64-linux";

      haskellUpdates = import haskell-updates {
        inherit system;
      };
    in {
      nixosConfigurations.hostname = nixpkgs.lib.nixosSystem {
        modules = [
          espial-nix.nixosModules.default
          {
            services.espial = {
              enable = true;
              package = haskellUpdates.haskellPackages.espial;
              database = {
                user = "testuser";
                passwordFile = "/run/secrets/passwordFile-testuser";
              };
            };
          }
        ];
      };
    };
}

Of course, you have to create the password file yourself beforehand. After enabling the module, you can then reverse proxy to the service on port 3000. For simpler use cases, services.espial.openFirewall is also provided.

About

A flake providing a NixOS module for the Espial bookmarking server

License:GNU General Public License v3.0


Languages

Language:Nix 100.0%