Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/actions/setup-nix/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,14 @@ runs:
- uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixos-unstable

- uses: cachix/cachix-action@v17
with:
name: "${{ inputs.cachix_cache_name }}"
authToken: "${{ inputs.cachix_auth_token }}"

- uses: Mic92/hestia@v3

- name: bootstrap
run: nix profile install "./tools/nix#bootstrap"
shell: bash
12 changes: 6 additions & 6 deletions tools/nix/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions tools/nix/lib/service/authentik/service.nix
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,9 @@ in
"${name}-pg-db" = {
enable = cfg.enable;
port = cfg.postgres.port;
initialScript.before = ''
CREATE USER \"${cfg.postgres.user}\" WITH PASSWORD '${cfg.postgres.password}' CREATEDB;
CREATE DATABASE \"${cfg.postgres.name}\" OWNER \"${cfg.postgres.user}\"
initialScript.before = pkgs.writeText "before.sql" ''
CREATE USER "${cfg.postgres.user}" WITH PASSWORD '${cfg.postgres.password}' CREATEDB;
CREATE DATABASE "${cfg.postgres.name}" OWNER '${cfg.postgres.user}'
'';
};
};
Expand Down
98 changes: 0 additions & 98 deletions tools/nix/lib/service/mailhog.nix

This file was deleted.

1 change: 0 additions & 1 deletion tools/nix/lib/service/service.parts.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
flake.processComposeModules = {
keycloak = import ./keycloak.nix;
authentik = import ./authentik.nix;
mailhog = import ./mailhog.nix;
rustfs = import ./rustfs.nix;

kms = import ./kms.nix;
Expand Down
14 changes: 9 additions & 5 deletions tools/nix/services/test.parts.nix
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
self.processComposeModules.keycloak
self.processComposeModules.authentik
self.processComposeModules.rustfs
self.processComposeModules.mailhog

self.processComposeModules.kms
];
Expand Down Expand Up @@ -134,7 +133,7 @@
};
};

services.mailhog = {
services.mailhog."mailhog" = {
smtp.port = 1026;
enable = true;
};
Expand Down Expand Up @@ -171,19 +170,20 @@

services.kms = {
enable = true;

package =
if nix then
self'.packages.kms-service
else
(pkgs.writeShellScriptBin "kms-service" ''
just nix::develop "default" just run
just nix::develop "default-nogh" just run
'');
};

settings.processes.kms = {
working_dir = "./components/kms";
# watch = {
# In ProcessCompose-Flake 1.122 its possible to do
# See: https://github.com/Platonic-Systems/process-compose-flake/pull/115
# watch = lib.optionalAttrs !nix {
# debounce = "300ms";
# paths = [
# {
Expand All @@ -201,11 +201,15 @@
in
{

# This test-services are with modos components running from `just run`
# instead of a Nix derivation.
# Note: This `test-services-*` package is exposed on `packages` outputs in the flake.
process-compose."test-services" = makeServices { nix = false; };
# This test-services are with all Nix derivations.
process-compose."test-services-nix" = makeServices { nix = true; };

modos.services.config = {
# Expose to further inspect.
test-services = config.process-compose.test-services;
};
};
Expand Down
Loading