about summary refs log tree commit diff
path: root/nixos/tests
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2020-12-12 20:48:54 +0100
committerGitHub <noreply@github.com>2020-12-12 20:48:54 +0100
commitce0fdd4dc0c1191fa1a1be47ae9945638ce72849 (patch)
treefa41d5f19c2b4f52d092e4daea19528b8c2fd019 /nixos/tests
parentad80d12a0cb988ada4033e3a98e533e1c38cbbcb (diff)
parent77a849690798ae0c1acd6f5a8e8b6106ae9d11c9 (diff)
Merge pull request #106697 from aanderse/mpd
nixos/mpd: conditionally provision required directories with StateDirectory
Diffstat (limited to 'nixos/tests')
-rw-r--r--nixos/tests/mpd.nix6
1 files changed, 4 insertions, 2 deletions
diff --git a/nixos/tests/mpd.nix b/nixos/tests/mpd.nix
index 60aef586ad5c9..7af8640de71c2 100644
--- a/nixos/tests/mpd.nix
+++ b/nixos/tests/mpd.nix
@@ -27,10 +27,12 @@ import ./make-test-python.nix ({ pkgs, lib, ... }:
       after = [ "mpd.service" ];
       wantedBy = [ "default.target" ];
       script = ''
-        mkdir -p ${musicDirectory} && chown -R ${user}:${group} ${musicDirectory}
         cp ${track} ${musicDirectory}
-        chown ${user}:${group} ${musicDirectory}/$(basename ${track})
       '';
+      serviceConfig = {
+        User = user;
+        Group = group;
+      };
     };
 
     mkServer = { mpd, musicService, }: