Loading nixos/modules/installer/tools/tools.nix +21 −17 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ { config, lib, pkgs, ... }: let makeProg = args: pkgs.substituteAll (args // { makeProg = args: pkgs.replaceVarsWith (args // { dir = "bin"; isExecutable = true; nativeBuildInputs = [ Loading @@ -18,18 +18,21 @@ let nixos-generate-config = makeProg { name = "nixos-generate-config"; src = ./nixos-generate-config.pl; replacements = { perl = "${pkgs.perl.withPackages (p: [ p.FileSlurp ])}/bin/perl"; hostPlatformSystem = pkgs.stdenv.hostPlatform.system; detectvirt = "${config.systemd.package}/bin/systemd-detect-virt"; btrfs = "${pkgs.btrfs-progs}/bin/btrfs"; inherit (config.system.nixos-generate-config) configuration desktopConfiguration; xserverEnabled = config.services.xserver.enable; }; manPage = ./manpages/nixos-generate-config.8; }; nixos-version = makeProg { name = "nixos-version"; src = ./nixos-version.sh; replacements = { inherit (pkgs) runtimeShell; inherit (config.system.nixos) version codeName revision; inherit (config.system) configurationRevision; Loading @@ -40,6 +43,7 @@ let } // lib.optionalAttrs (config.system.configurationRevision != null) { configurationRevision = config.system.configurationRevision; }); }; manPage = ./manpages/nixos-version.8; }; Loading nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix +48 −50 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ let edk2ShellEspPath = "efi/edk2-uefi-shell/shell.efi"; systemdBootBuilder = pkgs.substituteAll rec { systemdBootBuilder = pkgs.replaceVarsWith { name = "systemd-boot"; dir = "bin"; Loading @@ -40,6 +40,7 @@ let isExecutable = true; replacements = rec { inherit (builtins) storeDir; inherit (pkgs) python3; Loading Loading @@ -70,10 +71,6 @@ let inherit (config.system.nixos) distroName; memtest86 = optionalString cfg.memtest86.enable pkgs.memtest86plus; netbootxyz = optionalString cfg.netbootxyz.enable pkgs.netbootxyz-efi; checkMountpoints = pkgs.writeShellScript "check-mountpoints" '' fail() { echo "$1 = '$2' is not a mounted partition. Is the path configured correctly?" >&2 Loading Loading @@ -103,6 +100,7 @@ let )} ''; }; }; finalSystemdBootBuilder = pkgs.writeScript "install-systemd-boot.sh" '' #!${pkgs.runtimeShell} Loading Loading
nixos/modules/installer/tools/tools.nix +21 −17 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ { config, lib, pkgs, ... }: let makeProg = args: pkgs.substituteAll (args // { makeProg = args: pkgs.replaceVarsWith (args // { dir = "bin"; isExecutable = true; nativeBuildInputs = [ Loading @@ -18,18 +18,21 @@ let nixos-generate-config = makeProg { name = "nixos-generate-config"; src = ./nixos-generate-config.pl; replacements = { perl = "${pkgs.perl.withPackages (p: [ p.FileSlurp ])}/bin/perl"; hostPlatformSystem = pkgs.stdenv.hostPlatform.system; detectvirt = "${config.systemd.package}/bin/systemd-detect-virt"; btrfs = "${pkgs.btrfs-progs}/bin/btrfs"; inherit (config.system.nixos-generate-config) configuration desktopConfiguration; xserverEnabled = config.services.xserver.enable; }; manPage = ./manpages/nixos-generate-config.8; }; nixos-version = makeProg { name = "nixos-version"; src = ./nixos-version.sh; replacements = { inherit (pkgs) runtimeShell; inherit (config.system.nixos) version codeName revision; inherit (config.system) configurationRevision; Loading @@ -40,6 +43,7 @@ let } // lib.optionalAttrs (config.system.configurationRevision != null) { configurationRevision = config.system.configurationRevision; }); }; manPage = ./manpages/nixos-version.8; }; Loading
nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix +48 −50 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ let edk2ShellEspPath = "efi/edk2-uefi-shell/shell.efi"; systemdBootBuilder = pkgs.substituteAll rec { systemdBootBuilder = pkgs.replaceVarsWith { name = "systemd-boot"; dir = "bin"; Loading @@ -40,6 +40,7 @@ let isExecutable = true; replacements = rec { inherit (builtins) storeDir; inherit (pkgs) python3; Loading Loading @@ -70,10 +71,6 @@ let inherit (config.system.nixos) distroName; memtest86 = optionalString cfg.memtest86.enable pkgs.memtest86plus; netbootxyz = optionalString cfg.netbootxyz.enable pkgs.netbootxyz-efi; checkMountpoints = pkgs.writeShellScript "check-mountpoints" '' fail() { echo "$1 = '$2' is not a mounted partition. Is the path configured correctly?" >&2 Loading Loading @@ -103,6 +100,7 @@ let )} ''; }; }; finalSystemdBootBuilder = pkgs.writeScript "install-systemd-boot.sh" '' #!${pkgs.runtimeShell} Loading