hydra-module.nix: Don't create an admin user

It's the user's job to create users with the appropriate roles.
This commit is contained in:
Eelco Dolstra 2013-11-06 16:15:53 +01:00
parent 64cbdddea8
commit 9dc3311ff7

View file

@ -194,12 +194,6 @@ in
mv ${baseDir}/.pgpass-tmp ${baseDir}/.pgpass mv ${baseDir}/.pgpass-tmp ${baseDir}/.pgpass
fi fi
${pkgs.shadow}/bin/su hydra -c ${cfg.hydra}/bin/hydra-init ${pkgs.shadow}/bin/su hydra -c ${cfg.hydra}/bin/hydra-init
${config.services.postgresql.package}/bin/psql hydra << EOF
BEGIN;
INSERT INTO Users(userName, emailAddress, password) VALUES ('admin', '${cfg.notificationSender}', '$(echo -n $pass | sha1sum | cut -c1-40)');
INSERT INTO UserRoles(userName, role) values('admin', 'admin');
COMMIT;
EOF
''; '';
serviceConfig.Type = "oneshot"; serviceConfig.Type = "oneshot";
serviceConfig.RemainAfterExit = true; serviceConfig.RemainAfterExit = true;