Skip to content

Commit

Permalink
fixup! feat: add flag to disable containers tooling (#1367)
Browse files Browse the repository at this point in the history
Co-authored-by: Jörg Thalheim <[email protected]>
  • Loading branch information
blackheaven and Mic92 authored Aug 15, 2024
1 parent 7fa15b0 commit abbc375
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions src/modules/containers.nix
Original file line number Diff line number Diff line change
Expand Up @@ -135,20 +135,15 @@ let
}
];

config = lib.attrsets.mergeAttrsList [
{
User = "${user}";
WorkingDir = "${homeDir}";
}
(if cfg.isDev then {
Env = lib.mapAttrsToList (name: value: "${name}=${toString value}")
config = {
User = "${user}";
WorkingDir = "${homeDir}";
} // lib.optionalAttrs cfg.isDev {
Env = lib.mapAttrsToList (name: value: "${name}=${toString value}")
config.env ++ [ "HOME=${homeDir}" "USER=${user}" ];
Entrypoint = cfg.entrypoint;
Cmd = [ cfg.startupCommand ];
} else
{ })
];
};
Entrypoint = cfg.entrypoint;
Cmd = [ cfg.startupCommand ];
};

# <registry> <args>
mkCopyScript = cfg: pkgs.writeShellScript "copy-container" ''
Expand Down

0 comments on commit abbc375

Please sign in to comment.