Compare commits

...

3 Commits

Author SHA1 Message Date
a2678c9b39 update readme 2024-01-26 15:00:18 +01:00
083b2062e6 rm ep3-bs_pkg 2024-01-06 00:23:44 +01:00
60f5759374 add gitignore 2023-11-01 14:18:25 +01:00
5 changed files with 13 additions and 85 deletions

3
.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
*.qcow2
result
*.bak

View File

@@ -2,34 +2,22 @@
This flake aims to provide a nixosModule that handles running an [ep3-bs](https://bs.hbsys.de/) instance.
## What does it look like?
## Usage
Here is a minimal configuration:
``` nix
{
services.ep3-bs.enable = true;
services.ep3-bs.mail.address = "test@test.de";
services.ep3-bs = {
enable = true;
mail.address = "test@test.de";
database.user = "testuser3";
database.password = "testPassword1234"; #TODO: should be set as file
in_production = false;
};
}
```
Now you can access ep3-bs using your browser. You will be guided through the database setup in the frontend. Afterwards you have to manually delete the ```setup.php```. This only has to be done once on the initial setup.
Now you can access ep3-bs using your browser. You will be guided through the database setup in the frontend. When you are done set ```service.ep3-bs.in_production = true``` and rebuild your machine.
It can be done as root with:
``` shell
rm /var/lib/ep3-bs/public/setup.php
```
If there is a better solution using nix, please let me know.
## Installation
### Using flakes
Add ep3-bs as input:
``` nix
{
# ...
inputs.ep3-bs.url = github:kalipso/ep3-bs.nix;
}
```
If there is a better solution where you dont have to toggle the in_production variable, please let me know.

View File

@@ -6,7 +6,6 @@ let
cfg = config.services.ep3-bs;
useSmtp = cfg.mail.type == "smtp" || cfg.mail.type == "smtp-tls";
ep3-bs-pkg =
with pkgs;
stdenv.mkDerivation {
@@ -28,10 +27,6 @@ let
};
nixosModules.ep3-bs = import ./ep3-bs.nix {
ep3-bs-pkg = self.packages.x86_64-linux.ep3-bs;
};
configFile = pkgs.writeText "local.php" ''
<?php
/**

View File

@@ -1,34 +0,0 @@
{ config, lib, pkgs, ... }:
stdenv.mkDerivation rec {
pname = "ep3-bs";
src = fetchFromGitHub {
owner = "tkrebs";
repo = "ep3-bs";
rev = "1.8.1";
sha256 = "sha256-UqlUhzkt1Xj/LHw9LrJqQ5ldg+Mib1gMUlwG9cBWeBI=";
};
patches = [];
#passthru.tests = nixosTests.nextcloud;
#installPhase = ''
# runHook preInstall
# mkdir -p $out/
# cp -R . $out/
# runHook postInstall
#'';
#meta = with lib; {
# changelog = "https://nextcloud.com/changelog/#${lib.replaceStrings [ "." ] [ "-" ] version}";
# description = "Sharing solution for files, calendars, contacts and more";
# homepage = "https://nextcloud.com";
# maintainers = with maintainers; [ schneefux bachp globin ma27 ];
# license = licenses.agpl3Plus;
# platforms = with platforms; unix;
# knownVulnerabilities = extraVulnerabilities
# ++ (optional eol "Nextcloud version ${version} is EOL");
#};
};

View File

@@ -10,32 +10,8 @@
pkgs = nixpkgs.legacyPackages."${system}";
in
{
devShells.default = pkgs.mkShell {
shellHook = ''
export QEMU_NET_OPTS="hostfwd=tcp::2221-:22,hostfwd=tcp::8080-:80"
'';
};
packages.ep3-bs = with pkgs; stdenv.mkDerivation {
name = "ep3-bs";
src = fetchFromGitHub {
owner = "tkrebs";
repo = "ep3-bs";
rev = "1.8.1";
sha256 = "sha256-mcuFgi1ebawaAyuEREsC9jdIqGA0BeMabqwiVcXsKSY=";
};
installPhase = ''
runHook preInstall
mkdir -p $out/
cp -R . $out/
runHook postInstall
'';
};
}) // {
nixosModules.ep3-bs = import ./ep3-bs.nix;
nixosConfigurations.test = nixpkgs.lib.nixosSystem {