Skip to content

Commit

Permalink
Update dependencies and documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Sukant Hajra committed Jul 31, 2024
1 parent b9c5799 commit 687c565
Show file tree
Hide file tree
Showing 10 changed files with 127 additions and 127 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: cachix/install-nix-action@v27
with:
# DESIGN: matching current in NixOS 24.05
install_url: https://releases.nixos.org/nix/nix-2.18.4/install
install_url: https://releases.nixos.org/nix/nix-2.18.5/install
extra_nix_config: |
substituters = https://cache.nixos.org https://nix-community.cachix.org https://haskell-language-server.cachix.org https://cache.iog.io
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= haskell-language-server.cachix.org-1:juFfHrwkOxqIOZShtC4YC1uT1bBcq2RSvC7OMKx0Nz8= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=
Expand Down Expand Up @@ -43,7 +43,7 @@ jobs:
- uses: cachix/install-nix-action@v27
with:
# DESIGN: matching current in NixOS 24.05
install_url: https://releases.nixos.org/nix/nix-2.18.4/install
install_url: https://releases.nixos.org/nix/nix-2.18.5/install
extra_nix_config: |
substituters = https://cache.nixos.org https://nix-community.cachix.org https://haskell-language-server.cachix.org https://cache.iog.io
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= haskell-language-server.cachix.org-1:juFfHrwkOxqIOZShtC4YC1uT1bBcq2RSvC7OMKx0Nz8= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=
Expand All @@ -68,7 +68,7 @@ jobs:
- uses: cachix/install-nix-action@v27
with:
# DESIGN: matching current in NixOS 24.05
install_url: https://releases.nixos.org/nix/nix-2.18.4/install
install_url: https://releases.nixos.org/nix/nix-2.18.5/install
extra_nix_config: |
substituters = https://cache.nixos.org https://nix-community.cachix.org https://haskell-language-server.cachix.org https://cache.iog.io
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= haskell-language-server.cachix.org-1:juFfHrwkOxqIOZShtC4YC1uT1bBcq2RSvC7OMKx0Nz8= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=
Expand All @@ -90,7 +90,7 @@ jobs:
- uses: cachix/install-nix-action@v27
with:
# DESIGN: matching current in NixOS 24.05
install_url: https://releases.nixos.org/nix/nix-2.18.4/install
install_url: https://releases.nixos.org/nix/nix-2.18.5/install
extra_nix_config: |
substituters = https://cache.nixos.org https://nix-community.cachix.org https://haskell-language-server.cachix.org https://cache.iog.io
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= haskell-language-server.cachix.org-1:juFfHrwkOxqIOZShtC4YC1uT1bBcq2RSvC7OMKx0Nz8= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=
Expand Down
4 changes: 2 additions & 2 deletions config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
];
# DESIGN: https://github.com/input-output-hk/hackage.nix/blob/master/index-state-hashes.nix
hackage.index = {
state = "2024-07-15T00:00:00Z";
sha256 = "e82bd69afb1ac4a8c168f695f30e6f97e738d0f0f3333ba62544151a1f70dd0f";
state = "2024-07-31T00:00:00Z";
sha256 = "1b37c7abf042474e3871704a979ebbf4bf593030a677a9d14a2c2833585cf61d";
};
nixpkgs-pin = "nixpkgs-unstable";
};
Expand Down
4 changes: 2 additions & 2 deletions doc/internal/params.el
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
;; run-type must be "executable"
(run-target-short . "home-manager")
;; run-target-long will always prefix "bin/"
(nix-latest . "2.23.2")
(nix-stable . "2.18.4")
(nix-latest . "2.23.3")
(nix-stable . "2.18.5")
(nixos-latest . "24.05")
(platforms . "\n\
- Linux on x86-64 machines\n\
Expand Down
4 changes: 2 additions & 2 deletions doc/nix-installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ Hopefully, this alleviates any worry about installing a complex program on your

> **<span class="underline">NOTE:</span>** You don't need this step if you're running NixOS, which comes with Nix baked in.
Though the latest version of Nix is Nix 2.23.2, we'll be installing the version that the last release of NixOS (24.05) uses, specifically Nix 2.18.4. As discussed in the included [introduction to Nix](nix-introduction.md), this version is considered stable by the Nix community.
Though the latest version of Nix is Nix 2.23.3, we'll be installing the version that the last release of NixOS (24.05) uses, specifically Nix 2.18.5. As discussed in the included [introduction to Nix](nix-introduction.md), this version is considered stable by the Nix community.

The following command calls the official installation script for the recommended version of Nix. Note, this script will require `sudo` access.

```bash
sh <(curl -L https://releases.nixos.org/nix/nix-2.18.4/install) --daemon
sh <(curl -L https://releases.nixos.org/nix/nix-2.18.5/install) --daemon
```

The `--daemon` switch installs Nix in the multi-user mode, which is generally recommended (single-user installation with `--no-daemon` instead is recommended for WSL). The script reports everything it does and touches.
Expand Down
6 changes: 3 additions & 3 deletions doc/nix-introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,11 @@ However, if industrial users move to flakes to address these problems, we have t

### Nix quick releases compete with stability<a id="sec-4-2-3"></a>

The latest major version of the Nix package manager is currently Nix 2.23.2, but NixOS 24.05, the latest stable release of NixOS, uses Nix 2.18.4. NixOS is the primary way the Nix package manager gets used in the field. Far fewer users install Nix as a package manager atop another operating system. From a community perspective it makes sense to consider Nix 2.18.4 the stable release of the package manager. This version gets the most scrutiny and critical bug fixes.
The latest major version of the Nix package manager is currently Nix 2.23.3, but NixOS 24.05, the latest stable release of NixOS, uses Nix 2.18.5. NixOS is the primary way the Nix package manager gets used in the field. Far fewer users install Nix as a package manager atop another operating system. From a community perspective it makes sense to consider Nix 2.18.5 the stable release of the package manager. This version gets the most scrutiny and critical bug fixes.

As mentioned above, there are strong reasons to use still-experimental features, particularly flakes. However, APIs and calculated hashes change too frequently in experimental features from version-to-version. By sticking with the version used in NixOS, we get less breaking changes. For example, the [flake.lock](../flake.lock) file included with this project has calculated hashes for dependencies. These hashes were computed with Nix 2.18.4, and could change with later versions.
As mentioned above, there are strong reasons to use still-experimental features, particularly flakes. However, APIs and calculated hashes change too frequently in experimental features from version-to-version. By sticking with the version used in NixOS, we get less breaking changes. For example, the [flake.lock](../flake.lock) file included with this project has calculated hashes for dependencies. These hashes were computed with Nix 2.18.5, and could change with later versions.

For these reasons, the [installation guide included with this project](nix-installation.md) recommends installing Nix 2.18.4, rather than the latest official release.
For these reasons, the [installation guide included with this project](nix-installation.md) recommends installing Nix 2.18.5, rather than the latest official release.

## A few gaps in determinism<a id="sec-4-3"></a>

Expand Down
12 changes: 6 additions & 6 deletions doc/nix-usage-flakes.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ After a successful call of `nix build`, you'll see one or more symlinks for each
readlink result*
```

/nix/store/fziljalwqfm33xnhabbin6m4ihs1jb7x-home-manager
/nix/store/s5vb2npr6dx5ari4w2z5zbmqxn6f6wj0-home-manager

Following these symlinks, we can see the files the project provides:

Expand Down Expand Up @@ -300,7 +300,7 @@ It's common to configure these “result” symlinks as ignored in source contro
nix path-info .#home-manager
```

/nix/store/fziljalwqfm33xnhabbin6m4ihs1jb7x-home-manager
/nix/store/s5vb2npr6dx5ari4w2z5zbmqxn6f6wj0-home-manager

## Running commands in a shell<a id="sec-4-6"></a>

Expand All @@ -316,7 +316,7 @@ nix shell \
--command home-manager --help
```

Usage: /nix/store/fziljalwqfm33xnhabbin6m4ihs1jb7x-home-manager/bin/home-manager [OPTION] COMMAND
Usage: /nix/store/s5vb2npr6dx5ari4w2z5zbmqxn6f6wj0-home-manager/bin/home-manager [OPTION] COMMAND

Options

Expand Down Expand Up @@ -366,7 +366,7 @@ Here's the `nix run` equivalent of the `nix shell` invocation from the previous
nix run .#home-manager -- --help
```

Usage: /nix/store/fziljalwqfm33xnhabbin6m4ihs1jb7x-home-manager/bin/home-manager [OPTION] COMMAND
Usage: /nix/store/s5vb2npr6dx5ari4w2z5zbmqxn6f6wj0-home-manager/bin/home-manager [OPTION] COMMAND

Options

Expand Down Expand Up @@ -413,7 +413,7 @@ nix shell --ignore-environment \
--command which home-manager
```

/nix/store/fziljalwqfm33xnhabbin6m4ihs1jb7x-home-manager/bin/home-manager
/nix/store/s5vb2npr6dx5ari4w2z5zbmqxn6f6wj0-home-manager/bin/home-manager

What we do with local flake references can work just as well with remote flake references.

Expand Down Expand Up @@ -441,7 +441,7 @@ nix profile list
Flake attribute: packages.x86_64-linux.home-manager
Original flake URL: git+file:///home/shajra/src/shajra-provisioning
Locked flake URL: git+file:///home/shajra/src/shajra-provisioning
Store paths: /nix/store/fziljalwqfm33xnhabbin6m4ihs1jb7x-home-manager
Store paths: /nix/store/s5vb2npr6dx5ari4w2z5zbmqxn6f6wj0-home-manager

If we want to uninstall a program from our profile, we do so by the index from this list:

Expand Down
12 changes: 6 additions & 6 deletions doc/nix-usage-flakes.org
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ readlink result*
#+end_src

#+RESULTS: nix-build-link
: /nix/store/fziljalwqfm33xnhabbin6m4ihs1jb7x-home-manager
: /nix/store/s5vb2npr6dx5ari4w2z5zbmqxn6f6wj0-home-manager

Following these symlinks, we can see the files the project provides:

Expand Down Expand Up @@ -485,7 +485,7 @@ nix path-info .#<<get("package-attr-short")>>
#+end_src

#+results: nix-build-path
: /nix/store/fziljalwqfm33xnhabbin6m4ihs1jb7x-home-manager
: /nix/store/s5vb2npr6dx5ari4w2z5zbmqxn6f6wj0-home-manager

** Running commands in a shell

Expand All @@ -509,7 +509,7 @@ nix shell \
#+end_src

#+RESULTS: nix-shell
: Usage: /nix/store/fziljalwqfm33xnhabbin6m4ihs1jb7x-home-manager/bin/home-manager [OPTION] COMMAND
: Usage: /nix/store/s5vb2npr6dx5ari4w2z5zbmqxn6f6wj0-home-manager/bin/home-manager [OPTION] COMMAND
:
: Options
:
Expand Down Expand Up @@ -583,7 +583,7 @@ nix run .#<<get("run-attr-short")>> -- --help
#+end_src

#+RESULTS: nix-run
: Usage: /nix/store/fziljalwqfm33xnhabbin6m4ihs1jb7x-home-manager/bin/home-manager [OPTION] COMMAND
: Usage: /nix/store/s5vb2npr6dx5ari4w2z5zbmqxn6f6wj0-home-manager/bin/home-manager [OPTION] COMMAND
:
: Options
:
Expand Down Expand Up @@ -647,7 +647,7 @@ nix shell --ignore-environment \
#+end_src

#+RESULTS: nix-shell-remote
: /nix/store/fziljalwqfm33xnhabbin6m4ihs1jb7x-home-manager/bin/home-manager
: /nix/store/s5vb2npr6dx5ari4w2z5zbmqxn6f6wj0-home-manager/bin/home-manager

What we do with local flake references can work just as well with remote flake
references.
Expand Down Expand Up @@ -698,7 +698,7 @@ nix profile list --profile /tmp/nix-profile | ansifilter
: Flake attribute: packages.x86_64-linux.home-manager
: Original flake URL: git+file:///home/shajra/src/shajra-provisioning
: Locked flake URL: git+file:///home/shajra/src/shajra-provisioning
: Store paths: /nix/store/fziljalwqfm33xnhabbin6m4ihs1jb7x-home-manager
: Store paths: /nix/store/s5vb2npr6dx5ari4w2z5zbmqxn6f6wj0-home-manager

If we want to uninstall a program from our profile, we do so by the index from
this list:
Expand Down
Loading

0 comments on commit 687c565

Please sign in to comment.