diff options
author | Akshay <[email protected]> | 2024-12-25 19:23:05 +0000 |
---|---|---|
committer | Akshay <[email protected]> | 2024-12-25 19:25:35 +0000 |
commit | b388435c6f722111292ae8407729e551109b9ede (patch) | |
tree | c16c2a78c56e253d381f00158224b8f7588594d5 /flake.nix | |
parent | f8ad9c07bfa4e3f3757ed97358cc75ab580b2662 (diff) |
rework docker image bits
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 25 |
1 files changed, 2 insertions, 23 deletions
@@ -41,7 +41,7 @@ | |||
41 | cp -R ./node_modules/* $out/node_modules | 41 | cp -R ./node_modules/* $out/node_modules |
42 | ls -la $out/node_modules | 42 | ls -la $out/node_modules |
43 | ''; | 43 | ''; |
44 | outputHash = "sha256-iv1DddCTB1yyu21Ev/c4xtLHSvDas9jQAO2Ob9Iah2Q="; | 44 | outputHash = "sha256-wCMsk/gR+U5fCHcRj7Mxvh9Lg6wZAtMn7CvjyCPar+g="; |
45 | outputHashAlgo = "sha256"; | 45 | outputHashAlgo = "sha256"; |
46 | outputHashMode = "recursive"; | 46 | outputHashMode = "recursive"; |
47 | }; | 47 | }; |
@@ -73,27 +73,6 @@ | |||
73 | 73 | ||
74 | ''; | 74 | ''; |
75 | }; | 75 | }; |
76 | dockerImage = with final; | ||
77 | final.dockerTools.buildImage { | ||
78 | name = pname; | ||
79 | tag = "latest"; | ||
80 | |||
81 | copyToRoot = final.buildEnv { | ||
82 | name = "image-root"; | ||
83 | paths = [final.lurker]; | ||
84 | pathsToLink = ["/bin"]; | ||
85 | }; | ||
86 | |||
87 | runAsRoot = '' | ||
88 | mkdir -p /data | ||
89 | ''; | ||
90 | |||
91 | config = { | ||
92 | Cmd = ["/bin/${pname}"]; | ||
93 | WorkingDir = "/data"; | ||
94 | Volumes = {"/data" = {};}; | ||
95 | }; | ||
96 | }; | ||
97 | }; | 76 | }; |
98 | 77 | ||
99 | devShell = forAllSystems (system: let | 78 | devShell = forAllSystems (system: let |
@@ -108,7 +87,7 @@ | |||
108 | }); | 87 | }); |
109 | 88 | ||
110 | packages = forAllSystems (system: { | 89 | packages = forAllSystems (system: { |
111 | inherit (nixpkgsFor."${system}") lurker node_modules dockerImage; | 90 | inherit (nixpkgsFor."${system}") lurker node_modules; |
112 | }); | 91 | }); |
113 | 92 | ||
114 | defaultPackage = forAllSystems (system: nixpkgsFor."${system}".lurker); | 93 | defaultPackage = forAllSystems (system: nixpkgsFor."${system}".lurker); |