Merge fort-nix/nix-bitcoin#750: Update to NixOS 24.11
b5e5974b8aflake: update extra-container (Erik Arvstedt)2d53b57636tests.py: fix syntax warning (Erik Arvstedt)09ba739719nbxplorer: remove deprecated option (Erik Arvstedt)d6bae0a9ebpython3Packages.clnrest: update to NixOS 24.11 (Erik Arvstedt)b78116b0dapython3Packages.clnrest: use `--replace-fail` (Erik Arvstedt)dc8f969eeapython3Packages.pyln-proto: update to NixOS 24.11 (Erik Arvstedt)8af7fc4b80python3Packages.joinmarket: update to NixOS 24.11 (Erik Arvstedt)c66a6aab3apython3Packages.joinmarket: allow Python 3.12 (Erik Arvstedt)3ce3a000b2modules: update to NixOS 24.11 (Erik Arvstedt)a3ded4cf74update to NixOS 24.11 (Erik Arvstedt)ba46d20a25update-flake.sh: add workflow for updating the NixOS version (Erik Arvstedt)f60a50607dupdate-flake.sh: remove support for Nix < 2.19 (Erik Arvstedt) Pull request description: ACKs for top commit: jonasnick: ACKb5e5974b8aTree-SHA512: a252a2e20266924c58877aebe03a25ef65166cf8404ecf6a5f8a0b0eb5bf569ec5f13894d08723058c8d6b354378c609cb626f6866f152b06d26e8a73181f02c
This commit is contained in:
commit
32b59a6b84
16 changed files with 53 additions and 53 deletions
|
|
@ -9,7 +9,7 @@ task:
|
||||||
|
|
||||||
container:
|
container:
|
||||||
# Defined in https://github.com/nix-community/docker-nixpkgs
|
# Defined in https://github.com/nix-community/docker-nixpkgs
|
||||||
image: nixpkgs/nix-flakes:nixos-24.05
|
image: nixpkgs/nix-flakes:nixos-24.11
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
- name: modules_test
|
- name: modules_test
|
||||||
|
|
|
||||||
|
|
@ -97,8 +97,7 @@ It's easiest to use an existing service as a template:
|
||||||
Most other services use packages that are already included in nixpkgs.
|
Most other services use packages that are already included in nixpkgs.
|
||||||
|
|
||||||
## Switching to a new NixOS release
|
## Switching to a new NixOS release
|
||||||
|
- Run command `update-flake.sh 24.11`
|
||||||
- [flake.nix](../flake.nix): update `nixpkgs.url`
|
|
||||||
- [cirrus.yml](../.cirrus.yml): update toplevel container -> image attribute
|
- [cirrus.yml](../.cirrus.yml): update toplevel container -> image attribute
|
||||||
- [examples/configuration.nix](../examples/configuration.nix): update `system.stateVersion`
|
- [examples/configuration.nix](../examples/configuration.nix): update `system.stateVersion`
|
||||||
- [examples/flakes/flake.nix](../examples/flakes/flake.nix): update `inputs.nix-bitcoin.url`
|
- [examples/flakes/flake.nix](../examples/flakes/flake.nix): update `inputs.nix-bitcoin.url`
|
||||||
|
|
|
||||||
|
|
@ -318,7 +318,7 @@
|
||||||
# this value at the release version of the first install of this system.
|
# this value at the release version of the first install of this system.
|
||||||
# Before changing this value read the documentation for this option
|
# Before changing this value read the documentation for this option
|
||||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||||
system.stateVersion = "24.05"; # Did you read the comment?
|
system.stateVersion = "24.11"; # Did you read the comment?
|
||||||
|
|
||||||
# The nix-bitcoin release version that your config is compatible with.
|
# The nix-bitcoin release version that your config is compatible with.
|
||||||
# When upgrading to a backwards-incompatible release, nix-bitcoin will display an
|
# When upgrading to a backwards-incompatible release, nix-bitcoin will display an
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
inputs.nix-bitcoin.url = "github:fort-nix/nix-bitcoin/release";
|
inputs.nix-bitcoin.url = "github:fort-nix/nix-bitcoin/release";
|
||||||
# You can also use a version branch to track a specific NixOS release
|
# You can also use a version branch to track a specific NixOS release
|
||||||
# inputs.nix-bitcoin.url = "github:fort-nix/nix-bitcoin/nixos-24.05";
|
# inputs.nix-bitcoin.url = "github:fort-nix/nix-bitcoin/nixos-24.11";
|
||||||
|
|
||||||
inputs.nixpkgs.follows = "nix-bitcoin/nixpkgs";
|
inputs.nixpkgs.follows = "nix-bitcoin/nixpkgs";
|
||||||
inputs.nixpkgs-unstable.follows = "nix-bitcoin/nixpkgs-unstable";
|
inputs.nixpkgs-unstable.follows = "nix-bitcoin/nixpkgs-unstable";
|
||||||
|
|
|
||||||
15
flake.lock
generated
15
flake.lock
generated
|
|
@ -10,15 +10,16 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1722175938,
|
"lastModified": 1734005403,
|
||||||
"narHash": "sha256-HKyB4HD+NdX3T233bY31hm76v3/tdQBNeLLvopKbZeY=",
|
"narHash": "sha256-vgh3TqfkFdnPxREBedw4MQehIDc3N8YyxBOB45n+AvU=",
|
||||||
"owner": "erikarvstedt",
|
"owner": "erikarvstedt",
|
||||||
"repo": "extra-container",
|
"repo": "extra-container",
|
||||||
"rev": "37e7207ac9f857eedb58b208b9dc91cd6b24e651",
|
"rev": "f4de6c329b306a9d3a9798a30e060c166f781baa",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "erikarvstedt",
|
"owner": "erikarvstedt",
|
||||||
|
"ref": "0.13",
|
||||||
"repo": "extra-container",
|
"repo": "extra-container",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
|
@ -43,16 +44,16 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1732749044,
|
"lastModified": 1733808091,
|
||||||
"narHash": "sha256-T38FQOg0BV5M8FN1712fovzNakSOENEYs+CSkg31C9Y=",
|
"narHash": "sha256-KWwINTQelKOoQgrXftxoqxmKFZb9pLVfnRvK270nkVk=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "0c5b4ecbed5b155b705336aa96d878e55acd8685",
|
"rev": "a0f3e10d94359665dba45b71b4227b0aeb851f8e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"ref": "nixos-24.05",
|
"ref": "nixos-24.11",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,11 +5,11 @@
|
||||||
'';
|
'';
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
|
||||||
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
extra-container = {
|
extra-container = {
|
||||||
url = "github:erikarvstedt/extra-container";
|
url = "github:erikarvstedt/extra-container/0.13";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
inputs.flake-utils.follows = "flake-utils";
|
inputs.flake-utils.follows = "flake-utils";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,9 @@
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
# This script does the following:
|
# This script does the following:
|
||||||
# - Update all flake inputs, including nixpkgs
|
# - When called without arguments, update all flake inputs, including nixpkgs.
|
||||||
|
# - When called with a version argument, set input `nixpkgs` in `flake.nix` to the
|
||||||
|
# specified version and only update this input.
|
||||||
# - Print version updates of pinned pkgs like so:
|
# - Print version updates of pinned pkgs like so:
|
||||||
# Pkg updates in nixpkgs unstable:
|
# Pkg updates in nixpkgs unstable:
|
||||||
# bitcoin: 0.20.0 -> 0.21.1
|
# bitcoin: 0.20.0 -> 0.21.1
|
||||||
|
|
@ -39,23 +41,11 @@ if [[ $forceRun ]] && ! git diff --quiet ../flake.{nix,lock}; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Support Nix >=2.19
|
if [[ ! $nixosVersion ]]; then
|
||||||
{
|
echo "Updating flake 'nixos-search'"
|
||||||
versionGreaterThanOrEqual() {
|
nix flake update --flake ../test/nixos-search
|
||||||
[[ $1 != $(echo -e "$1\n$2" | sort -V | head -n1) || $1 == "$2" ]]
|
echo
|
||||||
}
|
fi
|
||||||
nixVersion=$(nix --version | cut -d\ -f 3)
|
|
||||||
if versionGreaterThanOrEqual "$nixVersion" 2.19; then
|
|
||||||
# https://nixos.org/manual/nix/stable/release-notes/rl-2.19#:~:text=nix%20flake%20update
|
|
||||||
nixUpdateArg=--flake
|
|
||||||
else
|
|
||||||
nixUpdateArg=
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "Updating flake 'nixos-search'"
|
|
||||||
nix flake update $nixUpdateArg ../test/nixos-search
|
|
||||||
echo
|
|
||||||
|
|
||||||
versions=$(nix eval --json -f update-flake.nix versions)
|
versions=$(nix eval --json -f update-flake.nix versions)
|
||||||
|
|
||||||
|
|
@ -65,8 +55,10 @@ versions=$(nix eval --json -f update-flake.nix versions)
|
||||||
echo "Updating main flake"
|
echo "Updating main flake"
|
||||||
if [[ $nixosVersion ]]; then
|
if [[ $nixosVersion ]]; then
|
||||||
sed -Ei "s|(nixpkgs.url = .*nixos-)[^\"]+|\1$nixosVersion|" ../flake.nix
|
sed -Ei "s|(nixpkgs.url = .*nixos-)[^\"]+|\1$nixosVersion|" ../flake.nix
|
||||||
|
nix flake update nixpkgs --flake ..
|
||||||
|
else
|
||||||
|
nix flake update --flake ..
|
||||||
fi
|
fi
|
||||||
nix flake update $nixUpdateArg ..
|
|
||||||
|
|
||||||
echo
|
echo
|
||||||
nix eval --raw -f update-flake.nix --argstr prevVersions "$versions" showUpdates; echo
|
nix eval --raw -f update-flake.nix --argstr prevVersions "$versions" showUpdates; echo
|
||||||
|
|
|
||||||
|
|
@ -168,7 +168,6 @@ in {
|
||||||
lbtcnodeendpoint=${nbLib.addressWithPort liquidd.address liquidd.whitelistedPort}
|
lbtcnodeendpoint=${nbLib.addressWithPort liquidd.address liquidd.whitelistedPort}
|
||||||
''}
|
''}
|
||||||
postgres=User ID=${cfg.nbxplorer.user};Host=/run/postgresql;Database=nbxplorer
|
postgres=User ID=${cfg.nbxplorer.user};Host=/run/postgresql;Database=nbxplorer
|
||||||
automigrate=1
|
|
||||||
'';
|
'';
|
||||||
in rec {
|
in rec {
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,7 @@ let
|
||||||
enabledServices = filterAttrs (n: v: isEnabled n) cfg.services;
|
enabledServices = filterAttrs (n: v: isEnabled n) cfg.services;
|
||||||
isEnabled = x: config.services.${x}.enable;
|
isEnabled = x: config.services.${x}.enable;
|
||||||
|
|
||||||
ip = "${pkgs.iproute}/bin/ip";
|
ip = "${pkgs.iproute2}/bin/ip";
|
||||||
iptables = "${config.networking.firewall.package}/bin/iptables";
|
iptables = "${config.networking.firewall.package}/bin/iptables";
|
||||||
|
|
||||||
bridgeIp = "169.254.${toString cfg.addressblock}.10";
|
bridgeIp = "169.254.${toString cfg.addressblock}.10";
|
||||||
|
|
|
||||||
|
|
@ -2,24 +2,25 @@
|
||||||
pkgs: pkgsUnstable:
|
pkgs: pkgsUnstable:
|
||||||
{
|
{
|
||||||
inherit (pkgs)
|
inherit (pkgs)
|
||||||
charge-lnd
|
|
||||||
elementsd
|
|
||||||
extra-container
|
|
||||||
lightning-pool
|
|
||||||
lndconnect;
|
|
||||||
|
|
||||||
inherit (pkgsUnstable)
|
|
||||||
bitcoin
|
bitcoin
|
||||||
bitcoind
|
bitcoind
|
||||||
btcpayserver
|
btcpayserver
|
||||||
|
charge-lnd
|
||||||
clboss
|
clboss
|
||||||
clightning
|
clightning
|
||||||
electrs
|
electrs
|
||||||
|
elementsd
|
||||||
|
extra-container
|
||||||
fulcrum
|
fulcrum
|
||||||
hwi
|
hwi
|
||||||
lightning-loop
|
lightning-loop
|
||||||
|
lightning-pool
|
||||||
lnd
|
lnd
|
||||||
|
lndconnect
|
||||||
nbxplorer;
|
nbxplorer;
|
||||||
|
|
||||||
|
inherit (pkgsUnstable)
|
||||||
|
;
|
||||||
|
|
||||||
inherit pkgs pkgsUnstable;
|
inherit pkgs pkgsUnstable;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,8 +26,9 @@ let
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace pyproject.toml \
|
substituteInPlace pyproject.toml \
|
||||||
--replace 'gevent = "^23.9.0.post1"' 'gevent = "24.2.1"' \
|
--replace-fail 'gevent = "^23.9.0.post1"' 'gevent = "24.2.1"' \
|
||||||
--replace 'flask = "^2.3.3"' 'flask = "3.0.3"'
|
--replace-fail 'gunicorn = "^21.2.0"' 'gunicorn = "23.0.0"' \
|
||||||
|
--replace-fail 'flask = "^2.3.3"' 'flask = "3.0.3"'
|
||||||
|
|
||||||
# Add extra required src files that are missing in pyproject.toml
|
# Add extra required src files that are missing in pyproject.toml
|
||||||
sed -i '/authors/a include = [ { path = "utilities", format = ["sdist", "wheel"] } ]' pyproject.toml
|
sed -i '/authors/a include = [ { path = "utilities", format = ["sdist", "wheel"] } ]' pyproject.toml
|
||||||
|
|
|
||||||
|
|
@ -29,9 +29,8 @@ buildPythonPackage rec {
|
||||||
inherit version src;
|
inherit version src;
|
||||||
format = "pyproject";
|
format = "pyproject";
|
||||||
|
|
||||||
# Since v0.9.11, Python older than v3.8 is not supported. Python v3.12 is
|
# Since v0.9.11, Python older than v3.8 is not supported.
|
||||||
# still not supported.
|
disabled = pythonOlder "3.8";
|
||||||
disabled = (pythonOlder "3.8") || (pythonAtLeast "3.12");
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
setuptools
|
setuptools
|
||||||
|
|
@ -75,9 +74,10 @@ buildPythonPackage rec {
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace pyproject.toml \
|
substituteInPlace pyproject.toml \
|
||||||
--replace-fail 'twisted==23.10.0' 'twisted==24.3.0' \
|
--replace-fail 'twisted==23.10.0' 'twisted==24.7.0' \
|
||||||
--replace-fail 'service-identity==21.1.0' 'service-identity==24.1.0' \
|
--replace-fail 'service-identity==21.1.0' 'service-identity==24.1.0' \
|
||||||
--replace-fail 'cryptography==41.0.6' 'cryptography==42.0.5'
|
--replace-fail 'cryptography==41.0.6' 'cryptography==43.0.1' \
|
||||||
|
--replace-fail 'txtorcon==23.11.0' 'txtorcon==24.8.0' \
|
||||||
|
|
||||||
# Modify pyproject.toml to include only specific modules. Do not include 'jmqtui'.
|
# Modify pyproject.toml to include only specific modules. Do not include 'jmqtui'.
|
||||||
sed -i '/^\[tool.setuptools.packages.find\]/a include = ["jmbase", "jmbitcoin", "jmclient", "jmdaemon"]' pyproject.toml
|
sed -i '/^\[tool.setuptools.packages.find\]/a include = ["jmbase", "jmbitcoin", "jmclient", "jmdaemon"]' pyproject.toml
|
||||||
|
|
|
||||||
|
|
@ -29,4 +29,9 @@ buildPythonPackage rec {
|
||||||
checkInputs = [ pytestCheckHook ];
|
checkInputs = [ pytestCheckHook ];
|
||||||
|
|
||||||
postUnpack = "sourceRoot=$sourceRoot/contrib/pyln-proto";
|
postUnpack = "sourceRoot=$sourceRoot/contrib/pyln-proto";
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace pyproject.toml \
|
||||||
|
--replace-fail 'cryptography = "^42"' 'cryptography = "43.0.1"'
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,8 @@ let
|
||||||
clientBaseConfig = {
|
clientBaseConfig = {
|
||||||
imports = [ ../modules/modules.nix ];
|
imports = [ ../modules/modules.nix ];
|
||||||
|
|
||||||
|
system.switch.enable = true;
|
||||||
|
|
||||||
nixpkgs.pkgs = pkgs;
|
nixpkgs.pkgs = pkgs;
|
||||||
|
|
||||||
nix-bitcoin.generateSecrets = true;
|
nix-bitcoin.generateSecrets = true;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
containerBin=$(type -P extra-container) || true
|
containerBin=$(type -P extra-container) || true
|
||||||
if [[ ! ($containerBin && $(realpath "$containerBin") == *extra-container-0.12*) ]]; then
|
if [[ ! ($containerBin && $(realpath "$containerBin") == *extra-container-0.13*) ]]; then
|
||||||
echo
|
echo
|
||||||
echo "Building extra-container. Skip this step by adding extra-container 0.12 to PATH."
|
echo "Building extra-container. Skip this step by adding extra-container 0.13 to PATH."
|
||||||
nix build --out-link /tmp/extra-container "${BASH_SOURCE[0]%/*}"/../..#extra-container
|
nix build --out-link /tmp/extra-container "${BASH_SOURCE[0]%/*}"/../..#extra-container
|
||||||
# When this script is run as root, e.g. when run in an extra-container shell,
|
# When this script is run as root, e.g. when run in an extra-container shell,
|
||||||
# chown the gcroot symlink to the regular (login) user so that the symlink can be
|
# chown the gcroot symlink to the regular (login) user so that the symlink can be
|
||||||
|
|
|
||||||
|
|
@ -452,10 +452,10 @@ def _():
|
||||||
def expect_clightning_log(str):
|
def expect_clightning_log(str):
|
||||||
machine.wait_until_succeeds(log_has_string("clightning", str))
|
machine.wait_until_succeeds(log_has_string("clightning", str))
|
||||||
|
|
||||||
expect_clightning_log("plugin-trustedcoin[^^]\[0m\s+bitcoind RPC working")
|
expect_clightning_log(r"plugin-trustedcoin\b.*?\bbitcoind RPC working")
|
||||||
if "regtest" in enabled_tests:
|
if "regtest" in enabled_tests:
|
||||||
num_blocks = test_data["num_blocks"]
|
num_blocks = test_data["num_blocks"]
|
||||||
expect_clightning_log(f"plugin-trustedcoin[^^]\[0m\s+returning block {num_blocks}")
|
expect_clightning_log(rf"plugin-trustedcoin\b.*?\breturning block {num_blocks}")
|
||||||
|
|
||||||
|
|
||||||
if "netns-isolation" in enabled_tests:
|
if "netns-isolation" in enabled_tests:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue