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

Introduce lima in macOS #913

Merged
merged 10 commits into from
Nov 5, 2024
Merged

Introduce lima in macOS #913

merged 10 commits into from
Nov 5, 2024

Conversation

kachick
Copy link
Owner

@kachick kachick commented Nov 5, 2024

Resolves GH-146

Closes GH-911 for now

Closes GH-909 and Closes GH-902 for now

Closes GH-910 for now

Add comment about GH-910

@kachick
Copy link
Owner Author

kachick commented Nov 5, 2024

shell execution is much faster than darwin 🙄 ref: #237

# darwin
> bench_shells
Benchmark 1: zsh --interactive -c exit
  Time (mean ± σ):     262.4 ms ±   7.1 ms    [User: 152.4 ms, System: 91.7 ms]
  Range (min … max):   250.9 ms … 269.5 ms    5 runs
 
Benchmark 2: bash -i -c exit
  Time (mean ± σ):     191.0 ms ±   1.7 ms    [User: 100.5 ms, System: 78.5 ms]
  Range (min … max):   188.1 ms … 192.6 ms    5 runs
 
Benchmark 3: fish --interactive --command exit
  Time (mean ± σ):     225.8 ms ±  14.8 ms    [User: 124.6 ms, System: 98.0 ms]
  Range (min … max):   215.0 ms … 249.0 ms    5 runs
 
  Warning: Statistical outliers were detected. Consider re-running this benchmark on a quiet system without any interferences from other programs. It might help to use the '--warmup' or '--prepare' options.
 
Summary
  bash -i -c exit ran
    1.18 ± 0.08 times faster than fish --interactive --command exit
    1.37 ± 0.04 times faster than zsh --interactive -c exit
> hostname
lima-default

> bench_shells
Benchmark 1: zsh --interactive -c exit
  Time (mean ± σ):     118.7 ms ±   8.7 ms    [User: 68.3 ms, System: 54.7 ms]
  Range (min … max):   109.3 ms … 131.8 ms    5 runs

Benchmark 2: bash -i -c exit
  Time (mean ± σ):      99.6 ms ±   3.8 ms    [User: 62.5 ms, System: 41.9 ms]
  Range (min … max):    96.5 ms … 106.1 ms    5 runs

Benchmark 3: fish --interactive --command exit
  Time (mean ± σ):      98.8 ms ±   5.1 ms    [User: 49.9 ms, System: 55.8 ms]
  Range (min … max):    93.6 ms … 106.6 ms    5 runs

Summary
  fish --interactive --command exit ran
    1.01 ± 0.06 times faster than bash -i -c exit
    1.20 ± 0.11 times faster than zsh --interactive -c exit

@kachick kachick changed the title Use lima for macOS setup Use lima for development in macOS Nov 5, 2024
@kachick kachick changed the title Use lima for development in macOS Introduce lima in macOS Nov 5, 2024
# * lima does not support XDG spec. https://github.com/lima-vm/lima/discussions/2745#discussioncomment-10958677
# * adding this as `ssh -F` makes it possible to use ssh login, it is required for `ms-vscode-remote.remote-ssh`
# * the content of file will be changed for each instance creation
"${config.home.homeDirectory}/.lima/default/ssh.config"
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

> bat ~/.ssh/config
Include /Users/kachick/.lima/default/ssh.config /Users/kachick/.ssh/config.local

merged ✅

@kachick
Copy link
Owner Author

kachick commented Nov 5, 2024

lima team looks addressing to release 1.0.0 these days. So I may add config.yml, however I would like to pend until 1.0.0

@kachick kachick merged commit 9551003 into main Nov 5, 2024
18 checks passed
@kachick kachick deleted the lima branch November 5, 2024 18:25
kachick added a commit to kachick/nixpkgs-reviewing-workspace that referenced this pull request Nov 10, 2024
kachick added a commit to kachick/anylang-template that referenced this pull request Nov 11, 2024
Use lima if need to build on macOS

See kachick/dotfiles#913
kachick added a commit to kachick/containers that referenced this pull request Nov 11, 2024
Use lima if need to build on macOS

See kachick/dotfiles#913
kachick added a commit to kachick/micro-kdl that referenced this pull request Nov 11, 2024
Use lima if need to build on macOS

See kachick/dotfiles#913
kachick added a commit to kachick/ruby-ulid that referenced this pull request Nov 11, 2024
Use lima if need to build on macOS

See kachick/dotfiles#913
kachick added a commit to kachick/wait-other-jobs that referenced this pull request Nov 11, 2024
Use lima if need to build on macOS

See kachick/dotfiles#913
kachick added a commit to kachick/times_kachick that referenced this pull request Nov 11, 2024
Use lima if need to build on macOS

See kachick/dotfiles#913
kachick added a commit to kachick/lishogi-dev that referenced this pull request Nov 11, 2024
Use lima if need to build on macOS

See kachick/dotfiles#913
kachick added a commit that referenced this pull request Nov 11, 2024
kachick added a commit that referenced this pull request Nov 18, 2024
Follow GH-911 and GH-913 with nix-init 0.3.2 failing in intel macOS
kachick added a commit that referenced this pull request Nov 19, 2024
* Update NixOS and related channels to 24.11 as possible now

* Bump dprint-plugin-kdl with the new schema of dprint

* `git ls-files | xargs selfup run`

* Bump NixOS stateVersion as same as home-manager

* Update temporally copied cloudflare-warp NixOS module

* Remove depreceted sound option in NixOS

https://github.com/NixOS/nixpkgs/blob/8e5e5a6add04c7f1e38e76f59ada6732947f1e55/nixos/doc/manual/release-notes/rl-2411.section.md?plain=1#L883-L885

* Remove failing and ussing SKK dependencies

* Remove unused edge pkgs from configuration.nix

* Enable systemd.enableStrictShellChecks

* Replace edge-pkgs with pkgs as possible

* Use stable nixpkgs in xremap flake

* Bump NixOS-WSL channel

* Bump darwin channel to include kdl.vim

* Fix missing a bump for gpg-sq

* Replace edge-pkgs as possible in ssh context

* Adopt TODO comment around updating to NixOS 24.11

* Adopt xdg.stateFile since 24.11

* Add ignoring tag for 24.11 in goreleaser

* Simply bump nix related github URLs in comments # No tested

* Suppress nixf warning

* Install ox and jnv also in maOS

* Remove needless package replacement

* Fix a typo [ci skip]

* Update namespace of gnome packages whcih moved to toplevel

* Dsiable enableStrictShellChecks for now

* Follow NixOS/nixpkgs@bcc7eff

* Pin to correct stable NixOS 24.11 channel

Closes GH-944. The bot works is not enough

* flake.lock: Update

Flake lock file updates:

• Updated input 'edge-nixpkgs':
    'github:NixOS/nixpkgs/dc460ec76cbff0e66e269457d7b728432263166c' (2024-11-11)
  → 'github:NixOS/nixpkgs/5e4fbfb6b3de1aa2872b76d49fafc942626e2add' (2024-11-15)
• Updated input 'nixos-wsl/flake-utils':
    'github:numtide/flake-utils/b1d9ab70662946ef0850d488da1c9019f3a9752a' (2024-03-11)
  → 'github:numtide/flake-utils/c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a' (2024-09-17)

* Using in macOS is much pain

Follow GH-911 and GH-913 with nix-init 0.3.2 failing in intel macOS

* Remove needless unstable in devshell

* Fix quotation in above commit

* Use release channel in Linux again to avoid fcitx5-mozc and bazel_7 problem

* Refactor edge and homemade with overlays

* Follow home-manaher kitty module changes

* Install lima with nixpkgs in macOS since it has been udpated

* flake.lock: Update

Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/4637bf5b68943c5d694fdbd20652d496997f088d' (2024-11-18)
  → 'github:NixOS/nixpkgs/3b9b50532fb7712d3714cf25f4e61e8f71a04292' (2024-11-19)
• Updated input 'nixpkgs-darwin':
    'github:NixOS/nixpkgs/f4a0fbc120cd775346111246b453f8af94afc1d1' (2024-11-14)
  → 'github:NixOS/nixpkgs/8d48200ead5adea71485965f92405575c66dab04' (2024-11-19)

* Include fcitx5-mozc quick fix patch

* Backto NixOS 24.11 beta again

* Use latest for broken calibre and zed-editor

* Revert "Use latest for broken calibre and zed-editor"

This reverts commit 2520946.

* Revert "Backto NixOS 24.11 beta again"

This reverts commit 00f14fc.

* Clarify why I need release-24.11 instead of nixos-24.11

* Add comments about why I need nixpkgs-unstable for now
kachick added a commit that referenced this pull request Nov 19, 2024
---

* Resolves GH-757
* Closes GH-944
* Begins to use overlay to apply hotfix easy
* Roughly updated the commented URL, it should be checked in #947
* Go with `release-24.11` for now, because of `nixos-24.11` does not have crucial hotfix.

---

* Read and follow
  * https://github.com/NixOS/nixpkgs/blob/8e5e5a6add04c7f1e38e76f59ada6732947f1e55/nixos/doc/manual/release-notes/rl-2411.section.md
  * https://github.com/nix-community/home-manager/blob/a46e702093a5c46e192243edbd977d5749e7f294/docs/release-notes/rl-2411.md
* In NixOS, check the error log with `nixos-rebuild build`. Don't use `switch` first
* In home-manager, check the warnings in CI
* When found issues around packages, [attempt to fix and send PR to upstream](https://github.com/NixOS/nixpkgs/pulls?q=+is%3Apr+author%3Akachick+)

---

* Update NixOS and related channels to 24.11 as possible now

* Bump dprint-plugin-kdl with the new schema of dprint

* `git ls-files | xargs selfup run`

* Bump NixOS stateVersion as same as home-manager

* Update temporally copied cloudflare-warp NixOS module

* Remove depreceted sound option in NixOS

https://github.com/NixOS/nixpkgs/blob/8e5e5a6add04c7f1e38e76f59ada6732947f1e55/nixos/doc/manual/release-notes/rl-2411.section.md?plain=1#L883-L885

* Remove failing and ussing SKK dependencies

* Remove unused edge pkgs from configuration.nix

* Enable systemd.enableStrictShellChecks

* Replace edge-pkgs with pkgs as possible

* Use stable nixpkgs in xremap flake

* Bump NixOS-WSL channel

* Bump darwin channel to include kdl.vim

* Fix missing a bump for gpg-sq

* Replace edge-pkgs as possible in ssh context

* Adopt TODO comment around updating to NixOS 24.11

* Adopt xdg.stateFile since 24.11

* Add ignoring tag for 24.11 in goreleaser

* Simply bump nix related github URLs in comments # No tested

* Suppress nixf warning

* Install ox and jnv also in maOS

* Remove needless package replacement

* Update namespace of gnome packages which moved to toplevel

* Disable enableStrictShellChecks for now

* Follow NixOS/nixpkgs@bcc7eff

* Pin to correct stable NixOS 24.11 channel

Closes GH-944. The bot works is not enough

* flake.lock: Update

Flake lock file updates:

• Updated input 'edge-nixpkgs':
    'github:NixOS/nixpkgs/dc460ec76cbff0e66e269457d7b728432263166c' (2024-11-11)
  → 'github:NixOS/nixpkgs/5e4fbfb6b3de1aa2872b76d49fafc942626e2add' (2024-11-15)
• Updated input 'nixos-wsl/flake-utils':
    'github:numtide/flake-utils/b1d9ab70662946ef0850d488da1c9019f3a9752a' (2024-03-11)
  → 'github:numtide/flake-utils/c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a' (2024-09-17)

* Follow GH-911 and GH-913 with nix-init 0.3.2 failing in intel macOS

* Remove needless unstable in devshell

* Fix quotation in above commit

* Use release channel in Linux again to avoid fcitx5-mozc and bazel_7 problem

* Refactor edge and homemade with overlays

* Follow home-manaher kitty module changes

* Install lima with nixpkgs in macOS since it has been updated

* flake.lock: Update

Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/4637bf5b68943c5d694fdbd20652d496997f088d' (2024-11-18)
  → 'github:NixOS/nixpkgs/3b9b50532fb7712d3714cf25f4e61e8f71a04292' (2024-11-19)
• Updated input 'nixpkgs-darwin':
    'github:NixOS/nixpkgs/f4a0fbc120cd775346111246b453f8af94afc1d1' (2024-11-14)
  → 'github:NixOS/nixpkgs/8d48200ead5adea71485965f92405575c66dab04' (2024-11-19)

* Include fcitx5-mozc quick fix patch

* Backto NixOS 24.11 beta again

* Use latest for broken calibre and zed-editor

* Revert "Use latest for broken calibre and zed-editor"

This reverts commit 2520946.

* Revert "Backto NixOS 24.11 beta again"

This reverts commit 00f14fc.

* Clarify why I need release-24.11 instead of nixos-24.11

* Add comments about why I need nixpkgs-unstable for now
kachick added a commit that referenced this pull request Dec 30, 2024
Since GH-911
Especially using unstable packages often makes heavy build
Use lima GH-913
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant