Skip to content

Commit

Permalink
docs: add "latest" tag to flake references
Browse files Browse the repository at this point in the history
This ensures that people will always use the latest release, not just
whatever the current master is.
  • Loading branch information
iFreilicht authored and mergify[bot] committed Oct 11, 2024
1 parent aee84b5 commit c7ef396
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ a disk named /dev/sda, you would run the following command to partition, format
and mount the disk.

```console
sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko -- --mode disko /tmp/disk-config.nix
sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko/latest -- --mode disko /tmp/disk-config.nix
```

## Related Tools
Expand Down
2 changes: 1 addition & 1 deletion docs/HowTo.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ If you use nix flakes support:

```nix
{
inputs.disko.url = "github:nix-community/disko";
inputs.disko.url = "github:nix-community/disko/latest";
inputs.disko.inputs.nixpkgs.follows = "nixpkgs";
outputs = { self, nixpkgs, disko }: {
Expand Down
2 changes: 1 addition & 1 deletion docs/disko-images.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ In the this example we create a flake containing a nixos configuration for
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
disko.url = "github:nix-community/disko";
disko.url = "github:nix-community/disko/latest";
disko.inputs.nixpkgs.follows = "nixpkgs";
};
Expand Down
8 changes: 4 additions & 4 deletions docs/disko-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ For a fresh installation, where **disko-install** will handle partitioning and
setting up the disk, use the following syntax:

```console
sudo nix run 'github:nix-community/disko#disko-install' -- --flake <flake-url>#<flake-attr> --disk <disk-name> <disk-device>
sudo nix run 'github:nix-community/disko#disko-install/latest' -- --flake <flake-url>#<flake-attr> --disk <disk-name> <disk-device>
```

Example:
Expand All @@ -36,7 +36,7 @@ example we assume a system that has been booted with EFI:
```nix
{
inputs.nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
inputs.disko.url = "github:nix-community/disko";
inputs.disko.url = "github:nix-community/disko/latest";
inputs.disko.inputs.nixpkgs.follows = "nixpkgs";
outputs = { self, disko, nixpkgs }: {
Expand Down Expand Up @@ -107,7 +107,7 @@ nvme0n1 259:0 0 1.8T 0 disk
In our example, we want to install to a USB-stick (/dev/sda):

```console
$ sudo nix run 'github:nix-community/disko#disko-install' -- --flake '/tmp/config/etc/nixos#mymachine' --disk main /dev/sda
$ sudo nix run 'github:nix-community/disko/latest#disko-install' -- --flake '/tmp/config/etc/nixos#mymachine' --disk main /dev/sda
```

Afterwards you can test your USB-stick by either selecting during the boot or
Expand All @@ -126,7 +126,7 @@ new hardware or to prioritize it in your current machine's boot order, use the
--write-efi-boot-entries option:

```console
$ sudo nix run 'github:nix-community/disko#disko-install' -- --write-efi-boot-entries --flake '/tmp/config/etc/nixos#mymachine' --disk main /dev/sda
$ sudo nix run 'github:nix-community/disko/latest#disko-install' -- --write-efi-boot-entries --flake '/tmp/config/etc/nixos#mymachine' --disk main /dev/sda
```

This command installs NixOS with **disko-install** and sets the newly installed
Expand Down
2 changes: 1 addition & 1 deletion docs/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ The following step will partition and format your disk, and mount it to `/mnt`.
**Please note: This will erase any existing data on your disk.**

```console
sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko -- --mode disko /tmp/disk-config.nix
sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko/latest -- --mode disko /tmp/disk-config.nix
```

After the command has run, your file system should have been formatted and
Expand Down
1 change: 1 addition & 0 deletions scripts/create-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ echo "{ version = \"$version\"; released = true; }" > version.nix
# Commit and tag the release
git commit -am "release: v$version"
git tag -a "v$version" -m "release: v$version"
git tag -a "latest" -m "release: v$version"

# a revsion suffix when run from the tagged release commit
echo "{ version = \"$version\"; released = false; }" > version.nix
Expand Down

2 comments on commit c7ef396

@matdibu
Copy link

@matdibu matdibu commented on c7ef396 Oct 11, 2024

Choose a reason for hiding this comment

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

don't forget to also create that latest tag, right now this happens:

$ nix run github:nix-community/disko/latest
error:
       … while fetching the input 'github:nix-community/disko/latest'

       error: unable to download 'https://api.github.com/repos/nix-community/disko/commits/latest': HTTP error 422

       response body:

       {
         "message": "No commit found for SHA: latest",
         "documentation_url": "https://docs.github.com/rest/commits/commits#get-a-commit",
         "status": "422"
       }

@iFreilicht
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh whoops, thank you! Should be fixed now!

Please sign in to comment.