···6677 common = import ./common.nix;
88 inherit (common) outputPath indexPath;
99+ devmode = pkgs.devmode.override {
1010+ buildArgs = "../../release.nix -A manualHTML.${builtins.currentSystem}";
1111+ open = "/${outputPath}/${indexPath}";
1212+ };
913in
1010-pkgs.callPackage ../../../pkgs/tools/nix/web-devmode.nix {
1111- buildArgs = "../../release.nix -A manualHTML.${builtins.currentSystem}";
1212- open = "/${outputPath}/${indexPath}";
1414+pkgs.mkShellNoCC {
1515+ packages = [ devmode ];
1316}
+19-4
nixos/modules/services/development/athens.md
···3737}
3838```
39394040-To use the local proxy in Go builds, you can set the proxy as environment variable:
4040+To use the local proxy in Go builds (outside of `nix`), you can set the proxy as environment variable:
41414242```nix
4343{
···4747}
4848```
49495050-It is currently not possible to use the local proxy for builds done by the Nix daemon. This might be enabled
5151-by experimental features, specifically [`configurable-impure-env`](https://nixos.org/manual/nix/unstable/contributing/experimental-features#xp-feature-configurable-impure-env),
5252-in upcoming Nix versions.
5050+To also use the local proxy for Go builds happening in `nix` (with `buildGoModule`), the nix daemon can be configured to pass the GOPROXY environment variable to the `goModules` fixed-output derivation.
5151+5252+This can either be done via the nix-daemon systemd unit:
5353+5454+```nix
5555+{
5656+ systemd.services.nix-daemon.environment.GOPROXY = "http://localhost:3000";
5757+}
5858+```
5959+6060+or via the [impure-env experimental feature](https://nix.dev/manual/nix/2.24/command-ref/conf-file#conf-impure-env):
6161+6262+```nix
6363+{
6464+ nix.settings.experimental-features = [ "configurable-impure-env" ];
6565+ nix.settings.impure-env = "GOPROXY=http://localhost:3000";
6666+}
6767+```
+9-10
nixos/modules/system/boot/systemd/initrd.nix
···482482483483 # so NSS can look up usernames
484484 "${pkgs.glibc}/lib/libnss_files.so.2"
485485+486486+ # Resolving sysroot symlinks without code exec
487487+ "${pkgs.chroot-realpath}/bin/chroot-realpath"
485488 ] ++ optionals cfg.package.withCryptsetup [
486489 # fido2 support
487490 "${cfg.package}/lib/cryptsetup/libcryptsetup-token-systemd-fido2.so"
···522525523526 script = /* bash */ ''
524527 set -uo pipefail
525525- export PATH="/bin:${cfg.package.util-linux}/bin"
528528+ export PATH="/bin:${cfg.package.util-linux}/bin:${pkgs.chroot-realpath}/bin"
526529527530 # Figure out what closure to boot
528531 closure=
···543546544547 # Resolve symlinks in the init parameter. We need this for some boot loaders
545548 # (e.g. boot.loader.generationsDir).
546546- closure="$(chroot /sysroot ${pkgs.coreutils}/bin/realpath "$closure")"
549549+ closure="$(chroot-realpath /sysroot "$closure")"
547550548551 # Assume the directory containing the init script is the closure.
549552 closure="$(dirname "$closure")"
···578581 ];
579582580583 services.initrd-nixos-activation = {
581581- requires = [
582582- config.boot.initrd.systemd.services.initrd-find-nixos-closure.name
583583- ];
584584- after = [
585585- "initrd-fs.target"
586586- config.boot.initrd.systemd.services.initrd-find-nixos-closure.name
587587- ];
588588- requiredBy = [ "initrd.target" ];
584584+ after = [ "initrd-switch-root.target" ];
585585+ requiredBy = [ "initrd-switch-root.service" ];
586586+ before = [ "initrd-switch-root.service" ];
587587+ unitConfig.DefaultDependencies = false;
589588 unitConfig = {
590589 AssertPathExists = "/etc/initrd-release";
591590 RequiresMountsFor = [
···11+# This file is automatically @generated by Cargo.
22+# It is not intended for manual editing.
33+version = 3
44+55+[[package]]
66+name = "chroot-realpath"
77+version = "0.1.0"