From c7ef3964b6befa877e76316ae88f3ef251cae573 Mon Sep 17 00:00:00 2001 From: Felix Uhl Date: Wed, 9 Oct 2024 23:30:47 +0200 Subject: [PATCH] docs: add "latest" tag to flake references This ensures that people will always use the latest release, not just whatever the current master is. --- README.md | 2 +- docs/HowTo.md | 2 +- docs/disko-images.md | 2 +- docs/disko-install.md | 8 ++++---- docs/quickstart.md | 2 +- scripts/create-release.sh | 1 + 6 files changed, 9 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 8b97bae..ebe183e 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/docs/HowTo.md b/docs/HowTo.md index 51a4247..e57d73a 100644 --- a/docs/HowTo.md +++ b/docs/HowTo.md @@ -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 }: { diff --git a/docs/disko-images.md b/docs/disko-images.md index e43f113..96387f7 100644 --- a/docs/disko-images.md +++ b/docs/disko-images.md @@ -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"; }; diff --git a/docs/disko-install.md b/docs/disko-install.md index 2c7ca61..7a58971 100644 --- a/docs/disko-install.md +++ b/docs/disko-install.md @@ -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 # --disk +sudo nix run 'github:nix-community/disko#disko-install/latest' -- --flake # --disk ``` Example: @@ -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 }: { @@ -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 @@ -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 diff --git a/docs/quickstart.md b/docs/quickstart.md index 084c057..30d0c89 100644 --- a/docs/quickstart.md +++ b/docs/quickstart.md @@ -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 diff --git a/scripts/create-release.sh b/scripts/create-release.sh index 32cdb12..4724173 100755 --- a/scripts/create-release.sh +++ b/scripts/create-release.sh @@ -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