diff options
Diffstat (limited to 'accounts/gkleen@sif/default.nix')
-rw-r--r-- | accounts/gkleen@sif/default.nix | 85 |
1 files changed, 82 insertions, 3 deletions
diff --git a/accounts/gkleen@sif/default.nix b/accounts/gkleen@sif/default.nix index 6574af9d..e900370b 100644 --- a/accounts/gkleen@sif/default.nix +++ b/accounts/gkleen@sif/default.nix | |||
@@ -175,13 +175,92 @@ in { | |||
175 | gpu-api = "vulkan"; | 175 | gpu-api = "vulkan"; |
176 | }; | 176 | }; |
177 | 177 | ||
178 | zsh.initExtra = '' | 178 | zsh.initExtra = let |
179 | source ${./zshrc} | 179 | zshrc = pkgs.resholve.mkDerivation { |
180 | pname = "zshrc"; | ||
181 | version = "0.0.0"; | ||
182 | |||
183 | src = ./zshrc; | ||
184 | |||
185 | dontUnpack = true; | ||
186 | dontConfigure = true; | ||
187 | dontBuild = true; | ||
188 | |||
189 | installPhase = '' | ||
190 | mkdir -p $out/share | ||
191 | install "$src" $out/share/zshrc | ||
192 | ''; | ||
193 | |||
194 | solutions = { | ||
195 | default = { | ||
196 | scripts = [ "share/zshrc" ]; | ||
197 | interpreter = "none"; | ||
198 | inputs = with pkgs; [ | ||
199 | coreutils | ||
200 | rpm | ||
201 | binutils | ||
202 | squashfsTools | ||
203 | unzip | ||
204 | cfg.programs.git.package | ||
205 | magickWrapped | ||
206 | curl | ||
207 | file | ||
208 | gnutar | ||
209 | cpio | ||
210 | magic-wormhole | ||
211 | quickserve | ||
212 | cfg.programs.zsh.package | ||
213 | fuse | ||
214 | util-linux | ||
215 | findutils | ||
216 | qrencode | ||
217 | tty-clock | ||
218 | cfg.programs.jq.package | ||
219 | eza | ||
220 | less | ||
221 | config.systemd.package | ||
222 | config.programs.ssh.package | ||
223 | gnused | ||
224 | ]; | ||
225 | execer = with pkgs; [ | ||
226 | "cannot:${lib.getExe' rpm "rpm2cpio"}" | ||
227 | "cannot:${lib.getExe' squashfsTools "unsquashfs"}" | ||
228 | "cannot:${lib.getExe' unzip "unzip"}" | ||
229 | "cannot:${lib.getExe cfg.programs.git.package}" | ||
230 | "cannot:${lib.getExe cpio}" | ||
231 | "cannot:${lib.getExe' magic-wormhole "wormhole"}" | ||
232 | "cannot:${lib.getExe quickserve}" | ||
233 | "cannot:${lib.getExe' fuse "fusermount"}" | ||
234 | "cannot:${lib.getExe less}" | ||
235 | "cannot:${lib.getExe' config.systemd.package "systemctl"}" | ||
236 | "cannot:${lib.getExe config.programs.ssh.package}" | ||
237 | ]; | ||
238 | wrapper = with pkgs; [ | ||
239 | "${lib.getExe' magickWrapped "magick"}:${lib.getExe' imagemagick "magick"}" | ||
240 | ]; | ||
241 | fake = { | ||
242 | builtin = ["print"]; | ||
243 | external = ["sudo" "umount"]; | ||
244 | }; | ||
245 | }; | ||
246 | }; | ||
247 | }; | ||
248 | magickWrapped = pkgs.symlinkJoin { | ||
249 | inherit (pkgs.imagemagick) name; | ||
250 | paths = [ pkgs.imagemagick ]; | ||
251 | |||
252 | buildInputs = with pkgs; [ makeWrapper ]; | ||
253 | postBuild = '' | ||
254 | wrapProgram $out/bin/magick \ | ||
255 | --prefix PATH : ${lib.makeBinPath (with pkgs; [ ghostscript ])} | ||
256 | ''; | ||
257 | }; | ||
258 | in '' | ||
259 | source ${zshrc}/share/zshrc | ||
180 | ''; | 260 | ''; |
181 | zsh.dirHashes = let | 261 | zsh.dirHashes = let |
182 | flakeHashes = mapAttrs' (n: v: nameValuePair (inputNames.${n} or n) (toString v)) flakeInputs; | 262 | flakeHashes = mapAttrs' (n: v: nameValuePair (inputNames.${n} or n) (toString v)) flakeInputs; |
183 | inputNames = { | 263 | inputNames = { |
184 | "nixpkgs" = "nixos"; | ||
185 | }; | 264 | }; |
186 | in flakeHashes // { | 265 | in flakeHashes // { |
187 | u2w = "$HOME/projects/uni2work"; | 266 | u2w = "$HOME/projects/uni2work"; |