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

Allow running script idempotently #8

Closed
srid opened this issue Jan 13, 2025 · 4 comments · Fixed by #17
Closed

Allow running script idempotently #8

srid opened this issue Jan 13, 2025 · 4 comments · Fixed by #17
Assignees

Comments

@srid
Copy link
Member

srid commented Jan 13, 2025

  1. Run om health --json
  2. If nix is not installed, run detsys nix installer, and re-run om health --json (requires Add om health --json omnix#374 )
  3. Take om health's JSON, and check if home-manager was setup
  4. If not, om init our template at ~/nixconfig (taking backup of old one if necessary) and nix run it (taking care of Move existing dotfiles out of the way #9)
  5. Run om health again

Bonus: #2

@srid
Copy link
Member Author

srid commented Jan 15, 2025

~/nixconfig

Let's use ~/.config/home-manager as the path, as that's where home-manager init creates by default.

@shivaraj-bh
Copy link
Member

If nix is not installed, run detsys nix installer

Won’t we need the om static binary here?

@srid
Copy link
Member Author

srid commented Jan 17, 2025

Why? To check "if nix is not installed"? Can't you just run nix --version to check that?

@shivaraj-bh
Copy link
Member

shivaraj-bh commented Jan 21, 2025

Might have to fix juspay/omnix#396 before using shell check to determine home-manager presence

Edit: nevermind

@shivaraj-bh shivaraj-bh mentioned this issue Jan 30, 2025
@srid srid closed this as completed in #17 Feb 5, 2025
@srid srid closed this as completed in e015265 Feb 5, 2025
@srid srid unpinned this issue Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants