Skip to content

Commit

Permalink
hades: secret config for mealie
Browse files Browse the repository at this point in the history
  • Loading branch information
alarsyo committed Jan 17, 2025
1 parent 6aca4f9 commit 78b96dd
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions hosts/hades/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ in {
mealie = {
enable = true;
port = 8090;
credentialsFile = config.age.secrets."mealie/secret-config".path;
};

microbin = {
Expand Down
2 changes: 2 additions & 0 deletions hosts/hades/secrets.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
owner = "matrix-synapse";
};

"mealie/secret-config" = {};

"microbin/secret-config" = {};

"miniflux/admin-credentials" = {};
Expand Down
Binary file added modules/secrets/mealie/secret-config.age
Binary file not shown.
2 changes: 2 additions & 0 deletions modules/secrets/secrets.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ in {

"matrix-synapse/secret-config.age".publicKeys = [alarsyo hades];

"mealie/secret-config.age".publicKeys = [alarsyo hades];

"microbin/secret-config.age".publicKeys = [alarsyo hades];

"miniflux/admin-credentials.age".publicKeys = [alarsyo hades];
Expand Down
12 changes: 12 additions & 0 deletions services/mealie.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,23 @@ in {
example = 8080;
description = "Internal port for Mealie webapp";
};
credentialsFile = lib.mkOption {
type = types.nullOr types.path;
default = null;
example = "/run/secrets/mealie-credentials.env";
description = ''
File containing credentials used in mealie such as {env}`POSTGRES_PASSWORD`
or sensitive LDAP options.
Expects the format of an `EnvironmentFile=`, as described by {manpage}`systemd.exec(5)`.
'';
};
};

config = mkIf cfg.enable {
services.mealie = {
inherit listenAddress;
inherit (cfg) credentialsFile;

enable = true;
package = pkgs.unstable.mealie;
Expand Down

0 comments on commit 78b96dd

Please sign in to comment.