Skip to content

Commit

Permalink
Use substituters from the install env
Browse files Browse the repository at this point in the history
  • Loading branch information
FriedrichAltheide committed Dec 16, 2024
1 parent 9f54ace commit fd0d4c5
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions modules/nixos/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,16 @@ def generateProxyStrings():

return proxyEnv

def generateNixOptionStringFromHost(optionName):
out = subprocess.run(["nix", "config", "show", optionName], capture_output=True, text=True)
if out.returncode == 0:
return [
"--option",
optionName,
out.stdout.strip()
]
return []

def pretty_name():
return _("Installing NixOS.")

Expand Down Expand Up @@ -555,6 +565,12 @@ def run():
]
)

# use all substituters from the installer in nixos-install
nixosInstallCmd.extend(generateNixOptionStringFromHost("substituters"))
nixosInstallCmd.extend(generateNixOptionStringFromHost("trusted-public-keys"))

libcalamares.utils.debug('Install CMD: {}'.format(nixosInstallCmd))

# Install customizations
try:
output = ""
Expand Down

0 comments on commit fd0d4c5

Please sign in to comment.