version: bump to 26.11 (#1782)

This commit is contained in:
Sam 2026-06-07 01:23:23 +00:00 committed by GitHub
commit 6a771120d6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 91 additions and 14 deletions

View file

@ -39,8 +39,8 @@ cd /etc/nix-darwin
# To use Nixpkgs unstable:
nix flake init -t nix-darwin/master
# To use Nixpkgs 25.11:
nix flake init -t nix-darwin/nix-darwin-25.11
# To use Nixpkgs 26.05:
nix flake init -t nix-darwin/nix-darwin-26.05
sed -i '' "s/simple/$(scutil --get LocalHostName)/" flake.nix
```
@ -60,9 +60,9 @@ Add the following to `flake.nix` in the same folder as `configuration.nix`:
description = "John's darwin system";
inputs = {
# Use `github:NixOS/nixpkgs/nixpkgs-25.11-darwin` to use Nixpkgs 25.11.
# Use `github:NixOS/nixpkgs/nixpkgs-26.05-darwin` to use Nixpkgs 26.05.
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
# Use `github:nix-darwin/nix-darwin/nix-darwin-25.11` to use Nixpkgs 25.11.
# Use `github:nix-darwin/nix-darwin/nix-darwin-26.05` to use Nixpkgs 26.05.
nix-darwin.url = "github:nix-darwin/nix-darwin/master";
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
};
@ -88,8 +88,8 @@ Unlike NixOS, `nix-darwin` does not have an installer, you can just run `darwin-
```bash
# To use Nixpkgs unstable:
sudo nix run nix-darwin/master#darwin-rebuild -- switch
# To use Nixpkgs 25.11:
sudo nix run nix-darwin/nix-darwin-25.11#darwin-rebuild -- switch
# To use Nixpkgs 26.05:
sudo nix run nix-darwin/nix-darwin-26.05#darwin-rebuild -- switch
```
### Step 3. Using `nix-darwin`
@ -132,8 +132,8 @@ Copy the [simple](./modules/examples/simple.nix) example to `/etc/nix-darwin/con
```bash
# If you use Nixpkgs unstable (the default):
sudo nix-channel --add https://github.com/nix-darwin/nix-darwin/archive/master.tar.gz darwin
# If you use Nixpkgs 25.11:
sudo nix-channel --add https://github.com/nix-darwin/nix-darwin/archive/nix-darwin-25.11.tar.gz darwin
# If you use Nixpkgs 26.05:
sudo nix-channel --add https://github.com/nix-darwin/nix-darwin/archive/nix-darwin-26.05.tar.gz darwin
sudo nix-channel --update
```

6
flake.lock generated
View file

@ -2,11 +2,11 @@
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1765934234,
"narHash": "sha256-pJjWUzNnjbIAMIc5gRFUuKCDQ9S1cuh3b2hKgA7Mc4A=",
"lastModified": 1779593580,
"narHash": "sha256-le3WvQyzAQjBZnb7q2c8C5Fk2c9LgN/Oq+b0KiD4fM4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "af84f9d270d404c17699522fab95bbf928a2d92f",
"rev": "d849bb215dcdf71bce3e686839ccdb4219e84b2f",
"type": "github"
},
"original": {

View file

@ -42,16 +42,17 @@
with pkgs.pkgsBuildBuild;
[
alacritty
alacritty-graphics
ghostty-bin
kitty
mtm
rio
rxvt-unicode-unwrapped
rxvt-unicode-unwrapped-emoji
st
termite
tmux
wezterm
] ++ lib.optional (pkgs ? ghostty-bin) ghostty-bin
]
)
);

75
scripts/release.sh Executable file
View file

@ -0,0 +1,75 @@
#!/usr/bin/env bash
set -euo pipefail
git checkout master
git pull
version=$(jq -r .release version.json)
# branch off ${version}
echo "Cutting nix-darwin-${version} release branch"
git checkout -b "nix-darwin-${version}"
sed -i -e "s!- master!- nix-darwin-${version}!" .github/workflows/test.yml
sed -i -e "s!NIXPKGS_BRANCH: nixpkgs-unstable!NIXPKGS_BRANCH: nixpkgs-${version}-darwin!" .github/workflows/test.yml
sed -i -e "s!nixpkgs-unstable!nixpkgs-${version}-darwin!" modules/examples/flake/flake.nix
sed -i -e "s!github:nix-darwin/nix-darwin/master!github:nix-darwin/nix-darwin/nix-darwin-${version}!" modules/examples/flake/flake.nix
sed -i -e "s!nixpkgs/unstable!nixpkgs/stable!g" modules/nix/nixpkgs.nix
sed -i -e "s!nixpkgs-unstable!nixpkgs-${version}-darwin!" flake.nix
nix flake lock
cat <<EOF > README.md
# nix-darwin
This is the ${version} release branch of nix-darwin. See [the main readme](https://github.com/nix-darwin/nix-darwin#readme) for documentation
EOF
cat <<EOF > version.json
{
"release": "${version}",
"isReleaseBranch": true
}
EOF
git add .
git commit -m "version: branch off ${version}"
# update master
echo "Updating master to point to next version"
git checkout master
## update version.json to point to the next version
IFS='.' read -r major minor <<< "$version"
if [[ "$minor" = "11" ]]; then
major=$(( major + 1 ))
minor="05"
else
minor="11"
fi
cat <<EOF > version.json
{
"release": "${major}.${minor}",
"isReleaseBranch": false
}
EOF
## update readme so that instructions refer to the version we're cutting (our supported stable version)
sed -i -e "s![0-9][0-9]\.[0-9][0-9]!${version}!g" README.md
git add .
git commit -m "version: bump to ${major}.${minor}"
nix flake update
git add .
git commit -m "flake.lock: update"

View file

@ -4,6 +4,7 @@
enable = true;
url = "https://github.com/nixos/nixpkgs";
tokenFile = "/secret/path/to/a/github/token";
nodeRuntimes = [ "node24" ];
};
test = ''

View file

@ -1,4 +1,4 @@
{
"release": "26.05",
"release": "26.11",
"isReleaseBranch": false
}