From 26f65ae8607a496856f28488c90e08c880ac908b Mon Sep 17 00:00:00 2001 From: Bjørn Forsman Date: Sun, 28 Aug 2016 10:05:14 +0200 Subject: nixos/redis: enforce owner/perms on /var/lib/redis (#18046) Previously it was only set once, now it is enforced on each start-up of redis.service. Also set _ownership_ recursively, so that the /var/lib/redis/dump.rdb file is guaranteed to be accessible by the currently configured redis user. Fixes issue #9687, where redis wouldn't start because /var/lib/redis had wrong owner. --- nixos/modules/services/databases/redis.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'nixos/modules') diff --git a/nixos/modules/services/databases/redis.nix b/nixos/modules/services/databases/redis.nix index 480e1184ffa3..a039ad138f6f 100644 --- a/nixos/modules/services/databases/redis.nix +++ b/nixos/modules/services/databases/redis.nix @@ -234,9 +234,8 @@ in serviceConfig.Type = "oneshot"; script = '' - if ! test -e ${cfg.dbpath}; then - install -d -m0700 -o ${cfg.user} ${cfg.dbpath} - fi + install -d -m0700 -o ${cfg.user} ${cfg.dbpath} + chown -R ${cfg.user} ${cfg.dbpath} ''; }; -- cgit 1.4.1 From f0da094b2e2e885e4c2ea7930583c6fa302add0f Mon Sep 17 00:00:00 2001 From: obadz Date: Sun, 28 Aug 2016 11:31:55 +0100 Subject: virtualbox-image: remove raw image (hopefully fixes ova tests) See also 80660f8 --- nixos/modules/virtualisation/virtualbox-image.nix | 2 ++ 1 file changed, 2 insertions(+) (limited to 'nixos/modules') diff --git a/nixos/modules/virtualisation/virtualbox-image.nix b/nixos/modules/virtualisation/virtualbox-image.nix index 4f8ea2651007..3a598a1c7dc5 100644 --- a/nixos/modules/virtualisation/virtualbox-image.nix +++ b/nixos/modules/virtualisation/virtualbox-image.nix @@ -57,6 +57,8 @@ in { fn="$out/nixos-${config.system.nixosLabel}-${pkgs.stdenv.system}.ova" VBoxManage export "$vmName" --output "$fn" + rm -v $diskImage + mkdir -p $out/nix-support echo "file ova $fn" >> $out/nix-support/hydra-build-products ''; -- cgit 1.4.1