garbas
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # What's new in Nix 2.8.0 Numbers: - Contributors: ``` git shortlog 69c6fb12eea414382f0b945c0d6c574c43c7c9a3...ad7c99ef20dff74a65d6c8ac2a2c42f538e0a1dd -e -n | rg ":$" Eelco Dolstra <edolstra@gmail.com> (122): Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com> (16): John Ericson <John.Ericson@Obsidian.Systems> (12): Théophane Hufschmitt <theophane@hufschmitt.net> (10): Naïm Favier <n@monade.li> (9): Daniel Pauls <daniel1708.de+git@gmail.com> (8): Cole Helbling <cole.e.helbling@outlook.com> (7): pennae <github@quasiparticle.net> (6): Artturin <Artturin@artturin.com> (5): Martin Schwaighofer <mschwaig@users.noreply.github.com> (5): Maximilian Bosch <maximilian@mbosch.me> (5): Tom Bereknyei <tomberek@gmail.com> (5): regnat <rg@regnat.ovh> (4): toonn <toonn@toonn.io> (4): Gabriel Fontes <eu@misterio.me> (3): Sergei Trofimovich <slyich@gmail.com> (3): Alex Ameen <alex.ameen.tx@gmail.com> (2): Erik Arvstedt <erik.arvstedt@gmail.com> (2): Florian Klink <flokli@flokli.de> (2): Kasper Gałkowski <kpg@posteo.net> (2): Rehno Lindeque <errantkid@gmail.com> (2): dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> (2): Domen Kožar <domen@dev.si> (1): Graham Christensen <graham@grahamc.com> (1): Hideaki Kawai <kayhide@gmail.com> (1): Joachim Breitner <mail@joachim-breitner.de> (1): Kevin Amado <kamadorueda@gmail.com> (1): Robert Helgesson <robert@rycee.net> (1): Rok Garbas <rok@garbas.si> (1): Sebastian Blunt <nix@sebastianblunt.com> (1): aszlig <aszlig@nix.build> (1): polykernel <81340136+polykernel@users.noreply.github.com> (1): thkoch2001 <94641+thkoch2001@users.noreply.github.com> (1): ``` - Commits ``` git rev-list --no-merges --count 69c6fb12eea414382f0b945c0d6c574c43c7c9a3...ad7c99ef20dff74a65d6c8ac2a2c42f538e0a1dd 170 ``` - PRs ``` git log --oneline $range | grep 'Merge pull request #' | wc -l 73 ``` rev range for -> 2.8.0: `69c6fb12eea414382f0b945c0d6c574c43c7c9a3...ad7c99ef20dff74a65d6c8ac2a2c42f538e0a1dd` -> 2.7.0: `ffe155abd36366a870482625543f9bf924a58281...039c9008b13951153052d84c0108a3750db8498f` -> 2.6.0: `a1cd7e58606a41fcf62bf8637804cf8306f17f62...95bd5da341aec4b99f4719d1b1ab2343ee14fad7` -> 2.5.0: `a646dfcdd642df404ef1e172abdcddb3aa179d48...158fa6870fef4b20fa55e872bf1c1f2cad408c65` https://hydra.nixos.org/job/nix/master/metrics.nixpkgs#tabs-charts * @garbas New experimental command: `nix fmt`, which applies a formatter defined by the `formatter.<system>` flake output to the Nix expressions in a flake. examples in ~/nix/demo ``` nix fmt --help nix fmt cat file.nix {a=1;b=2;c=3;} nix fmt ./file.nix ``` * @garbas Various Nix commands can now read expressions from standard input using `--file -`. * DOESNT WORK WITH nix fmt??? * TODO: cat file.nix | nix fmt --file - ``` echo 'let b = 1; in b' | nix eval --file - ``` * @tomberek: New experimental builtin function `builtins.fetchClosure` that copies a closure from a binary cache at evaluation time and rewrites it to content-addressed form (if it isn't already). Like `builtins.storePath`, this allows importing pre-built store paths; the difference is that it doesn't require the user to configure binary caches and trusted public keys. This function is only available if you enable the experimental feature `fetch-closure`. ``` nix store make-content-addressed nixpkgs#hello builtins.fetchClosure { fromStore = "https://cache.nixos.org"; fromPath = "/nix/store/h59dfk7dwrn7d2csykh9z9xm2miqmrnz-hello-2.12"; toPath = "/nix/store/dp3rslbx8fz88cq74mxb5h5z1l4659f0-hello-2.12"; } ``` * @tomberek: New experimental feature: *impure derivations*. These are derivations that can produce a different result every time they're built. Here is an example: ```nix stdenv.mkDerivation { name = "impure"; __impure = true; # marks this derivation as impure buildCommand = "date > $out"; } ``` Running `nix build` twice on this expression will build the derivation twice, producing two different content-addressed store paths. Like fixed-output derivations, impure derivations have access to the network. Only fixed-output derivations and impure derivations can depend on an impure derivation. ##### Additional * @garbas Docs: Improved uninstall section for macOS https://github.com/NixOS/nix/pull/6144 * doc: Add detailed uninstall section for macOS * @tomberek Evaluation https://github.com/NixOS/nix/pull/6323 * add read-only mode to eval * performance, scripting * show larger example? with numbers * @garbas Better UX (consistency) * `nix run` is now stricter in what it accepts: members of the `apps` flake output are now required to be apps (as defined in [the manual](https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-run.html#apps)), and members of `packages` or `legacyPackages` must be derivations (not apps). * The `nixosModule` flake output attribute has been renamed consistent with the `.default` renames in Nix 2.7. * `nixosModule` → `nixosModules.default` As before, the old output will continue to work, but `nix flake check` will issue a warning about it. * `nix store make-content-addressable` has been renamed to `nix store make-content-addressed`. https://github.com/NixOS/nix/pull/6371 * better error message for nix copy of unbuilt/unavailable build https://github.com/NixOS/nix/pull/6362 * more output for nix doctor https://github.com/NixOS/nix/pull/6330 * nix {run,shell}: Print a better error message if the store is not local * @tomberek Completions & Suggestions https://github.com/NixOS/nix/pull/6128 * Shell completion improvements * respect `--override-flake` * tilde expansion with flake fragments * follow symlinks * completions for `--update-input` https://github.com/NixOS/nix/pull/6216 * Add some suggestions to the evaluator https://github.com/NixOS/nix/pull/6244 * nix-env: Add a suggestion for when there's a name collision in channels - Outro from Eelco - What he is excited 1) video 2) touch base with eelco for roadmap. 3) How can we help 4) NixUX -> NixCore ? * decision/execution/deletion cycle * go hunt for inconsistencies? * 5) NixUX is the focus for now ## 2.9.0 Here are the release notes: ### nix build has a new --print-out-paths flag to print the resulting output paths. This matches the default behaviour of nix-build. ``` nix build nixpkgs#curl --print-out-paths [tom@tframe:~]$ nix build nixpkgs#curl --print-out-paths /nix/store/vcdb1dq99vhh7yya9js6clzvf68w706w-curl-7.83.1-bin /nix/store/x8wsdqg5hzgh4amkah5kav7nd1q946sw-curl-7.83.1-man ``` "This is for scripting purposes." ### Debugger ### nix repl has a new build-and-link (:bl) command that builds a derivation while creating GC root symlinks. ``` nix repl nixpkgs :bl legacyPackages.x86_64-linux.hello ``` "This repl command allows one to both build a derivation and generate a symlink in the current directory which will also protect that build output from garbage collection." ### builtins.fetchTree (and flake inputs) can now be used to fetch plain files over the http(s) and file protocols in addition to directory tarballs. ``` builtins.fetchTree "https://raw.githubusercontent.com/NixOS/nix/master/default.nix" ``` "Previously, fetchTree had to operate over a tarball or git repository - something that could be a directory tree. This change allows one to fetch a bare file. It can be helpful when one may want to decompress something in a custom way, or to literally fetch a raw file iteslf. This also paves the way to fetch .patch files and apply them." ## 2.10.0 ### nix repl now takes installables on the command line, unifying the usage with other commands that use --file and --expr. Primary breaking change is for the common usage of * @tomberek - `nix repl '<nixpkgs>' which can be recovered with nix repl --file '<nixpkgs>' or nix repl --expr 'import <nixpkgs>{}'.` This is currently guarded by the repl-flake experimental feature. An important note here is that behavior is unified so anything that worked with nix flake before will work here as well. ``` nix repl --extra-experimental-features repl-flake flake:nixpkgs nix repl --extra-experimental-features repl-flake --expr '{a=1;}' nix repl --extra-experimental-features repl-flake --file default.nix nix repl --extra-experimental-features repl-flake github:NixOS/nixpkgs ``` ### A new function builtins.traceVerbose is available. It is similar to builtins.trace if the trace-verbose setting is set to true, and it is a no-op otherwise. * @djacu ``` [tom@tframe:~/nix]$ nix eval --expr 'builtins.traceVerbose "warning: hello!" 1' 1 [tom@tframe:~/nix]$ nix eval --expr 'builtins.traceVerbose "warning: hello!" 1' --option trace-verbose true trace: warning: hello! 1 ``` - maybe have a flake that has a bunch of traces that are useful for debugging ### nix search has a new flag --exclude to filter out packages. * @djacu ``` nix search nixpkgs requests nix search nixpkgs requests --exclude python nix search nixpkgs requests --exclude 'python|perl' ``` ### nix-portable * @tomberek On Linux, if /nix doesn’t exist and cannot be created and you’re not running as root, Nix will automatically use ~/.local/share/nix/root as a chroot store. This enables non-root users to download the statically linked Nix binary and have it work out of the box, e.g. - note, will not work on Darwin - grab a VM of Debian/Arch/etc and show how a user can try out Nix easily - does this work for users with wheel priviledges? - log in to a machine without priviledges ``` ls ~/.local/share/nix/root/nix/store ``` conceptually: `nix --store /home/tom/.local/share/nix/root` ### ~/nix run nixpkgs#hello warning: '/nix' does not exists, so Nix will use '/home/ubuntu/.local/share/nix/root' as a chroot store Hello, world!

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully