mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-04-16 06:19:11 +00:00
lib/builders: fix Docker builder
Some checks failed
Build devcontainers / build-devcontainers (push) Has been cancelled
Cache outputs / build-custom-packages (push) Has been cancelled
Check flake outputs / check-outputs (push) Has been cancelled
Publish every Git push to master to FlakeHub / flakehub-publish (push) Has been cancelled
Build personalized bootstrap ISO / build-iso (x86_64-linux) (push) Has been cancelled
Build project site / build (push) Has been cancelled
Build project site / deploy (push) Has been cancelled
Update flake inputs / update (push) Has been cancelled
Some checks failed
Build devcontainers / build-devcontainers (push) Has been cancelled
Cache outputs / build-custom-packages (push) Has been cancelled
Check flake outputs / check-outputs (push) Has been cancelled
Publish every Git push to master to FlakeHub / flakehub-publish (push) Has been cancelled
Build personalized bootstrap ISO / build-iso (x86_64-linux) (push) Has been cancelled
Build project site / build (push) Has been cancelled
Build project site / deploy (push) Has been cancelled
Update flake inputs / update (push) Has been cancelled
This commit is contained in:
parent
a13217867f
commit
0de1441342
@ -1,8 +1,11 @@
|
|||||||
{ dockerTools, foodogsquaredLib }:
|
{ dockerTools, lib, foodogsquaredLib }:
|
||||||
|
|
||||||
{ name, contents ? [ ], pathsToLink ? [ ], enableTypicalSetup ? true, ... }@attrs:
|
{ name, contents ? [ ], pathsToLink ? [ ], enableTypicalSetup ? true, ... }@attrs:
|
||||||
|
|
||||||
dockerTools.buildImage (attrs // {
|
let
|
||||||
|
attrs' = lib.removeAttrs attrs [ "contents" "pathsToLink" "enableTypicalSetup" "name" ];
|
||||||
|
in
|
||||||
|
dockerTools.buildImage (attrs' // {
|
||||||
name = "fds-${name}";
|
name = "fds-${name}";
|
||||||
|
|
||||||
copyToRoot = foodogsquaredLib.buildFDSEnv {
|
copyToRoot = foodogsquaredLib.buildFDSEnv {
|
||||||
@ -22,10 +25,10 @@ dockerTools.buildImage (attrs // {
|
|||||||
${lib.optionalString enableTypicalSetup ''
|
${lib.optionalString enableTypicalSetup ''
|
||||||
mkdir -p /data
|
mkdir -p /data
|
||||||
''}
|
''}
|
||||||
${attrs.runAsRoot}
|
${attrs.runAsRoot or ""}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
config = attrs.config // lib.optionalAttrs enableTypicalSetup {
|
config = (attrs.config or {}) // lib.optionalAttrs enableTypicalSetup {
|
||||||
Cmd = [ "/bin/bash" ];
|
Cmd = [ "/bin/bash" ];
|
||||||
WorkingDir = "/data";
|
WorkingDir = "/data";
|
||||||
Volumes."/data" = { };
|
Volumes."/data" = { };
|
||||||
|
Loading…
Reference in New Issue
Block a user