Compare commits

...

5 commits

Author SHA1 Message Date
6bef924513 overlays: remove gruvbox-nvim-treesitter-fix
All checks were successful
ci/woodpecker/push/check Pipeline was successful
Not needed anymore.

This reverts commit d6eceea08a.
2024-03-05 12:43:22 +00:00
7f0a889ccd hosts: nixos: porthos: services: enable mealie 2024-03-05 12:43:22 +00:00
380933e69b hosts: nixos: porthos: secrets: add mealie mail 2024-03-05 12:43:22 +00:00
a3afafd9e0 nixos: services: add mealie 2024-03-05 12:43:22 +00:00
4d25609b26 nixos: system: nix: expand trusted users 2024-03-05 12:43:22 +00:00
8 changed files with 83 additions and 18 deletions

Binary file not shown.

View file

@ -41,6 +41,10 @@ in
publicKeys = all;
};
"mealie/mail.age" = {
publicKeys = all;
};
"miniflux/credentials.age".publicKeys = all;
"monitoring/password.age" = {

View file

@ -68,6 +68,10 @@ in
secretFile = secrets."matrix/sliding-sync-secret".path;
};
};
mealie = {
enable = true;
credentialsFile = secrets."mealie/mail".path;
};
miniflux = {
enable = true;
credentialsFiles = secrets."miniflux/credentials".path;

View file

@ -16,6 +16,7 @@
./jellyfin
./lohr
./matrix
./mealie
./miniflux
./monitoring
./navidrome

View file

@ -0,0 +1,72 @@
{ config, lib, ... }:
let
cfg = config.my.services.mealie;
in
{
options.my.services.mealie = with lib; {
enable = mkEnableOption "Mealie service";
port = mkOption {
type = types.port;
default = 4537;
example = 8080;
description = "Internal port for webui";
};
credentialsFile = mkOption {
type = types.str;
example = "/var/lib/mealie/credentials.env";
description = ''
Configuration file for secrets.
'';
};
};
config = lib.mkIf cfg.enable {
services.mealie = {
enable = true;
inherit (cfg) port credentialsFile;
settings = {
# Basic settings
BASE_URL = "https://mealie.${config.networking.domain}";
TZ = config.time.timeZone;
ALLOw_SIGNUP = "false";
# Use PostgreSQL
DB_ENGINE = "postgres";
POSTGRES_USER = "mealie";
POSTGRES_PASSWORD = "";
POSTGRES_SERVER = "/run/postgresql";
# Pydantic and/or mealie doesn't handle the URI correctly, hijack it
# with query parameters...
POSTGRES_DB = "mealie?host=/run/postgresql&dbname=mealie";
};
};
systemd.services = {
mealie = {
after = [ "postgresql.service" ];
requires = [ "postgresql.service" ];
};
};
# Set-up database
services.postgresql = {
enable = true;
ensureDatabases = [ "mealie" ];
ensureUsers = [
{
name = "mealie";
ensureDBOwnership = true;
}
];
};
my.services.nginx.virtualHosts = {
mealie = {
inherit (cfg) port;
};
};
};
}

View file

@ -56,6 +56,8 @@ in
settings = {
experimental-features = [ "nix-command" "flakes" ];
# Trusted users are equivalent to root, and might as well allow wheel
trusted-users = [ "root" "@wheel" ];
};
};
}

View file

@ -1,4 +0,0 @@
self: prev:
{
vimPlugins = prev.vimPlugins.extend (self.callPackage ./generated.nix { });
}

View file

@ -1,14 +0,0 @@
{ fetchFromGitHub }:
_final: prev: {
gruvbox-nvim = prev.gruvbox-nvim.overrideAttrs (_: {
version = "2024-01-29";
src = fetchFromGitHub {
owner = "ellisonleao";
repo = "gruvbox.nvim";
rev = "6e4027ae957cddf7b193adfaec4a8f9e03b4555f";
sha256 = "sha256-jWnrRy/PT7D0UcPGL+XTbKHWvS0ixvbyqPtTzG9HY84=";
};
});
}