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

Define user context in flake.nix and refactor install scripts #27

Open
dustinlyons opened this issue Nov 11, 2023 · 2 comments
Open

Define user context in flake.nix and refactor install scripts #27

dustinlyons opened this issue Nov 11, 2023 · 2 comments
Labels
refactor Improve DX

Comments

@dustinlyons
Copy link
Owner

dustinlyons commented Nov 11, 2023

Currently, we run bin/apply to ask the user for some info, and run a sed replace function to replace various static tokens throughout the code.

These look like %USER%, %HOST_NAME%, etc. in the templates. We should clean these up so that it's defined once in flake.nix, and that input is provided as part of building the system.

@dustinlyons dustinlyons added the refactor Improve DX label Nov 11, 2023
@dustinlyons dustinlyons changed the title Define user context in flake.nix and refactor %USER%, %HOST_NAME%, etc. tokens Define user context in flake.nix and refactor install scripts Nov 12, 2023
@ar4s-gh
Copy link

ar4s-gh commented Jul 2, 2024

is this why I'm getting "Invalid option. Exiting script" after running

nix run --extra-experimental-features 'nix-command flakes' '.#apply'

and entering my details?

@dustinlyons
Copy link
Owner Author

dustinlyons commented Jul 3, 2024

@ar4s-gh You're probably typing 'yes' or 'no'. It should be 'Y', 'y', 'N', or 'n'. I think this is a bug in the apply script I need to fix.

Edit: I just fixed this on main. If you try to initialize the template again, you'll likely grab the cache of the old one, so first delete ~/.cache/nix before initializing again.

Or just type 'y' or 'n' instead of 'yes' and 'no', that's an easy workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Improve DX
Projects
None yet
Development

No branches or pull requests

2 participants