hydra-module.nix: Don't use a password
[?]
Nov 6, 2013, 4:07 PM
V4R3SIRMYTN4CVYWPFPFT34N3PCGVTGNWUSX4VE4B4FT5EEVWJFACDependencies
- [2]
7XOH2DGHhydra-module.nix: Give types to options - [3]
3PNG7NIBRemove trailing whitespace - [4]
ZVGQP2SXhydra-module: Add a `logo' option. - [5]
D3MDJONY - [6]
ASPNI2AOhydra-module.nix: Automatically create postgres db user for hydra and an admin hydra account - [7]
T4DBPQOFhydra-module: Run hydra-init during hydra-init.service - [8]
KMPLMG7Thydra-module.nix: Cleanup
Change contents
- replacement in hydra-module.nix at line 43
default = "dbi:Pg:dbname=hydra;host=localhost;user=hydra;";default = "dbi:Pg:dbname=hydra;user=hydra;";example = "dbi:Pg:dbname=hydra;host=postgres.example.org;user=foo;"; - replacement in hydra-module.nix at line 183
pass=$(HOME=/root ${pkgs.openssl}/bin/openssl rand -base64 32)if [ ! -f ${baseDir}/.pgpass ]; then${config.services.postgresql.package}/bin/psql postgres << EOFCREATE USER hydra PASSWORD '$pass';EOF${optionalString (cfg.dbi == "dbi:Pg:dbname=hydra;user=hydra;") ''if ! [ -e ${baseDir}/.db-created ]; then${config.services.postgresql.package}/bin/createuser hydra - replacement in hydra-module.nix at line 187
cat > ${baseDir}/.pgpass-tmp << EOFlocalhost:*:hydra:hydra:$passEOFchown hydra ${baseDir}/.pgpass-tmpchmod 600 ${baseDir}/.pgpass-tmpmv ${baseDir}/.pgpass-tmp ${baseDir}/.pgpassfitouch ${baseDir}/.db-createdfi''}