School: remove most of the role
This commit is contained in:
parent
19985c86da
commit
28a3bf2509
11 changed files with 0 additions and 196 deletions
|
|
@ -1,36 +0,0 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
services.mysql = {
|
||||
enable = true;
|
||||
package = pkgs.mysql80;
|
||||
user = "toast";
|
||||
group = "users";
|
||||
};
|
||||
|
||||
# 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;
|
||||
}
|
||||
})
|
||||
'';
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
mysql-workbench
|
||||
mycli
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue