Merge pull request #1024 from Ma27/hydra-home-creation

hydra-module: don't use `createHome = true;` to create Hydra's base-dir
This commit is contained in:
Graham Christensen 2021-09-24 21:59:26 -04:00 committed by GitHub
commit 8d7116522f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -197,12 +197,15 @@ in
config = mkIf cfg.enable { config = mkIf cfg.enable {
systemd.tmpfiles.rules = [
"d ${baseDir} 0750 hydra hydra"
];
users.extraGroups.hydra = { }; users.extraGroups.hydra = { };
users.extraUsers.hydra = users.extraUsers.hydra =
{ description = "Hydra"; { description = "Hydra";
group = "hydra"; group = "hydra";
createHome = true;
home = baseDir; home = baseDir;
isSystemUser = true; isSystemUser = true;
useDefaultShell = true; useDefaultShell = true;
@ -257,10 +260,6 @@ in
}; };
path = [ pkgs.utillinux ]; path = [ pkgs.utillinux ];
preStart = '' preStart = ''
mkdir -p ${baseDir}
chown hydra.hydra ${baseDir}
chmod 0750 ${baseDir}
ln -sf ${hydraConf} ${baseDir}/hydra.conf ln -sf ${hydraConf} ${baseDir}/hydra.conf
mkdir -m 0700 -p ${baseDir}/www mkdir -m 0700 -p ${baseDir}/www