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,33 +1,36 @@
{ config, pkgs, lib, ... }:
{
services.mysql = {
enable = true;
package = pkgs.mysql80;
user = "toast";
group = "users";
};
config,
pkgs,
lib,
...
}: {
services.mysql = {
enable = true;
package = pkgs.mysql80;
user = "toast";
group = "users";
};
# Don't autostart MySQL
systemd.services.mysql.wantedBy = lib.mkForce [];
# Don't autostart MySQL
systemd.services.mysql.wantedBy = lib.mkForce [];
# Allow regular users to start/stop mysql
# 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") == "mysql.service" &&
subject.user == "${config.services.mysql.user}"
)
{
return polkit.Result.YES;
}
})
'';
# Allow regular users to start/stop mysql
# 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") == "mysql.service" &&
subject.user == "${config.services.mysql.user}"
)
{
return polkit.Result.YES;
}
})
'';
environment.systemPackages = with pkgs; [
mysql-workbench
mycli
];
environment.systemPackages = with pkgs; [
mysql-workbench
mycli
];
}