nixos/slurm: fix dbdserver config file handling
Since slurm-20.11.0.1 the dbd server requires slurmdbd.conf to be in mode 600 to protect the database password. This change creates slurmdbd.conf on-the-fly at service startup and thus avoids that the database password ends up in the nix store.
This commit is contained in:
@@ -86,14 +86,16 @@ in {
|
||||
|
||||
dbd =
|
||||
{ pkgs, ... } :
|
||||
{
|
||||
let
|
||||
passFile = pkgs.writeText "dbdpassword" "password123";
|
||||
in {
|
||||
networking.firewall.enable = false;
|
||||
systemd.tmpfiles.rules = [
|
||||
"f /etc/munge/munge.key 0400 munge munge - mungeverryweakkeybuteasytointegratoinatest"
|
||||
];
|
||||
services.slurm.dbdserver = {
|
||||
enable = true;
|
||||
storagePass = "password123";
|
||||
storagePassFile = "${passFile}";
|
||||
};
|
||||
services.mysql = {
|
||||
enable = true;
|
||||
|
||||
Reference in New Issue
Block a user