Format everything with alejandra

This commit is contained in:
Toast 2024-03-20 12:54:25 +01:00
parent 82bbd7ce87
commit 7888103b1e
100 changed files with 2827 additions and 2756 deletions

View file

@ -1,31 +1,34 @@
{ config, pkgs, lib, ... }:
{
services.mongodb = {
enable = true;
package = pkgs.mongodb-4_4;
user = "toast";
};
config,
pkgs,
lib,
...
}: {
services.mongodb = {
enable = true;
package = pkgs.mongodb-4_4;
user = "toast";
};
# Don't autostart MySQL
systemd.services.mongodb.wantedBy = lib.mkForce [];
# Don't autostart MySQL
systemd.services.mongodb.wantedBy = lib.mkForce [];
# Allow regular users to start/stop mongodb
# https://stackoverflow.com/questions/61480914/using-policykit-to-allow-non-root-users-to-start-and-stop-a-service
security.polkit.extraConfig = ''
polkit.addRule(function(action, subject) {
if (
action.id == "org.freedesktop.systemd1.manage-units" &&
action.lookup("unit") == "mongodb.service" &&
subject.user == "${config.services.mongodb.user}"
)
{
return polkit.Result.YES;
}
})
'';
# Allow regular users to start/stop mongodb
# https://stackoverflow.com/questions/61480914/using-policykit-to-allow-non-root-users-to-start-and-stop-a-service
security.polkit.extraConfig = ''
polkit.addRule(function(action, subject) {
if (
action.id == "org.freedesktop.systemd1.manage-units" &&
action.lookup("unit") == "mongodb.service" &&
subject.user == "${config.services.mongodb.user}"
)
{
return polkit.Result.YES;
}
})
'';
environment.systemPackages = with pkgs; [
mongosh
];
environment.systemPackages = with pkgs; [
mongosh
];
}