Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 7c9437104a5b
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: f059ddf85df3
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on May 20, 2017

  1. Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    LnL7 Daiderd Jordan
    Copy the full SHA
    1541140 View commit details
  2. Merge pull request #25938 from bachp/emby-datadir

    emby service: allow changing data directory
    Mic92 authored May 20, 2017
    Copy the full SHA
    f059ddf View commit details
Showing with 10 additions and 4 deletions.
  1. +10 −4 nixos/modules/services/misc/emby.nix
14 changes: 10 additions & 4 deletions nixos/modules/services/misc/emby.nix
Original file line number Diff line number Diff line change
@@ -22,6 +22,12 @@ in
default = "emby";
description = "Group under which emby runs.";
};

dataDir = mkOption {
type = types.path;
default = "/var/lib/emby/ProgramData-Server";
description = "Location where Emby stores its data.";
};
};
};

@@ -31,10 +37,10 @@ in
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
preStart = ''
test -d /var/lib/emby/ProgramData-Server || {
echo "Creating initial Emby data directory in /var/lib/emby/ProgramData-Server"
mkdir -p /var/lib/emby/ProgramData-Server
chown -R ${cfg.user}:${cfg.group} /var/lib/emby/ProgramData-Server
test -d ${cfg.dataDir} || {
echo "Creating initial Emby data directory in ${cfg.dataDir}"
mkdir -p ${cfg.dataDir}
chown -R ${cfg.user}:${cfg.group} ${cfg.dataDir}
}
'';