Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bring back customizing the system config to include in the tarball #304

Merged
merged 1 commit into from
Nov 28, 2023

Conversation

terlar
Copy link
Contributor

@terlar terlar commented Oct 2, 2023

This was previously implemented in #260, but lost in the migration off the installer tarball.

@nzbr nzbr requested a review from K900 October 2, 2023 18:48
modules/build-tarball.nix Outdated Show resolved Hide resolved
@K900
Copy link
Contributor

K900 commented Oct 3, 2023

Generally, I'd probably prefer to have a more generic mechanism of just adding arbitrary files, similar to what make-system-tarball.nix does. We can then use that mechanism to include the default config and provide user-level overrides.

@terlar terlar force-pushed the customize-tarball-system-config branch from 71a9d01 to 472620c Compare October 3, 2023 08:27
@terlar
Copy link
Contributor Author

terlar commented Oct 3, 2023

I updated according to your comments. That might be a good idea, but I'm not entirely sure how you would like that implemented.

I don't personally see any value in combining custom configuration with the default configuration. As soon as you add your own custom configuration via wsl.tarball.configPath you don't need the defaults, also it is quite flexible, you can have use any method to work with Nix sources to construct the configuration.

Perhaps the current defaultConfig (if generated a directory instead) could be the default value of configPath.

@K900
Copy link
Contributor

K900 commented Oct 3, 2023

It's not necessarily about custom configuration - it's about adding arbitrary files in general, like secrets or SSH keys or whatever.

@terlar
Copy link
Contributor Author

terlar commented Oct 3, 2023

You mean generally in the tarball filesystem? Or specifically inside /etc/nixos (what this is mainly about).

I guess there is also a case of being able to configure arbitrary commands being executed in the script. Having a configuration to add steps and their actions. I guess for example if you are planning to use flakes the part of channels is unnecessary. But I think that is a bigger topic.

@K900
Copy link
Contributor

K900 commented Oct 3, 2023

I mean in the tarball in general, see make-system-tarball.nix in nixpkgs for example.

This was previously implemented in nix-community#260, but lost in the migration off
the installer tarball.
@terlar terlar force-pushed the customize-tarball-system-config branch from 472620c to 9cb8ca8 Compare November 13, 2023 10:20
@SuperSandro2000
Copy link
Member

@nzbr @K900 can you take a look, please?

@nzbr
Copy link
Member

nzbr commented Nov 28, 2023

I mean in the tarball in general, see make-system-tarball.nix in nixpkgs for example.

I'll merge this as-is and make a new issue to add something like extraCommands

@nzbr nzbr merged commit b4354a9 into nix-community:main Nov 28, 2023
19 checks passed
@nzbr nzbr added the enhancement New feature or request label Nov 28, 2023
@terlar terlar deleted the customize-tarball-system-config branch December 13, 2023 01:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants