Merge fort-nix/nix-bitcoin#750: Update to NixOS 24.11

b5e5974b8a flake: update extra-container (Erik Arvstedt)
2d53b57636 tests.py: fix syntax warning (Erik Arvstedt)
09ba739719 nbxplorer: remove deprecated option (Erik Arvstedt)
d6bae0a9eb python3Packages.clnrest: update to NixOS 24.11 (Erik Arvstedt)
b78116b0da python3Packages.clnrest: use `--replace-fail` (Erik Arvstedt)
dc8f969eea python3Packages.pyln-proto: update to NixOS 24.11 (Erik Arvstedt)
8af7fc4b80 python3Packages.joinmarket: update to NixOS 24.11 (Erik Arvstedt)
c66a6aab3a python3Packages.joinmarket: allow Python 3.12 (Erik Arvstedt)
3ce3a000b2 modules: update to NixOS 24.11 (Erik Arvstedt)
a3ded4cf74 update to NixOS 24.11 (Erik Arvstedt)
ba46d20a25 update-flake.sh: add workflow for updating the NixOS version (Erik Arvstedt)
f60a50607d update-flake.sh: remove support for Nix < 2.19 (Erik Arvstedt)

Pull request description:

ACKs for top commit:
  jonasnick:
    ACK b5e5974b8a

Tree-SHA512: a252a2e20266924c58877aebe03a25ef65166cf8404ecf6a5f8a0b0eb5bf569ec5f13894d08723058c8d6b354378c609cb626f6866f152b06d26e8a73181f02c
This commit is contained in:
Jonas Nick 2024-12-17 08:09:44 +00:00
commit 32b59a6b84
No known key found for this signature in database
GPG key ID: 4861DBF262123605
16 changed files with 53 additions and 53 deletions

View file

@ -9,7 +9,7 @@ task:
container:
# Defined in https://github.com/nix-community/docker-nixpkgs
image: nixpkgs/nix-flakes:nixos-24.05
image: nixpkgs/nix-flakes:nixos-24.11
matrix:
- name: modules_test

View file

@ -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.
## Switching to a new NixOS release
- [flake.nix](../flake.nix): update `nixpkgs.url`
- Run command `update-flake.sh 24.11`
- [cirrus.yml](../.cirrus.yml): update toplevel container -> image attribute
- [examples/configuration.nix](../examples/configuration.nix): update `system.stateVersion`
- [examples/flakes/flake.nix](../examples/flakes/flake.nix): update `inputs.nix-bitcoin.url`

View file

@ -318,7 +318,7 @@
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (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.
# When upgrading to a backwards-incompatible release, nix-bitcoin will display an

View file

@ -10,7 +10,7 @@
inputs.nix-bitcoin.url = "github:fort-nix/nix-bitcoin/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-unstable.follows = "nix-bitcoin/nixpkgs-unstable";

15
flake.lock generated
View file

@ -10,15 +10,16 @@
]
},
"locked": {
"lastModified": 1722175938,
"narHash": "sha256-HKyB4HD+NdX3T233bY31hm76v3/tdQBNeLLvopKbZeY=",
"lastModified": 1734005403,
"narHash": "sha256-vgh3TqfkFdnPxREBedw4MQehIDc3N8YyxBOB45n+AvU=",
"owner": "erikarvstedt",
"repo": "extra-container",
"rev": "37e7207ac9f857eedb58b208b9dc91cd6b24e651",
"rev": "f4de6c329b306a9d3a9798a30e060c166f781baa",
"type": "github"
},
"original": {
"owner": "erikarvstedt",
"ref": "0.13",
"repo": "extra-container",
"type": "github"
}
@ -43,16 +44,16 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1732749044,
"narHash": "sha256-T38FQOg0BV5M8FN1712fovzNakSOENEYs+CSkg31C9Y=",
"lastModified": 1733808091,
"narHash": "sha256-KWwINTQelKOoQgrXftxoqxmKFZb9pLVfnRvK270nkVk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "0c5b4ecbed5b155b705336aa96d878e55acd8685",
"rev": "a0f3e10d94359665dba45b71b4227b0aeb851f8e",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.05",
"ref": "nixos-24.11",
"repo": "nixpkgs",
"type": "github"
}

View file

@ -5,11 +5,11 @@
'';
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";
flake-utils.url = "github:numtide/flake-utils";
extra-container = {
url = "github:erikarvstedt/extra-container";
url = "github:erikarvstedt/extra-container/0.13";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};

View file

@ -2,7 +2,9 @@
set -euo pipefail
# 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:
# Pkg updates in nixpkgs unstable:
# bitcoin: 0.20.0 -> 0.21.1
@ -39,23 +41,11 @@ if [[ $forceRun ]] && ! git diff --quiet ../flake.{nix,lock}; then
exit 1
fi
# Support Nix >=2.19
{
versionGreaterThanOrEqual() {
[[ $1 != $(echo -e "$1\n$2" | sort -V | head -n1) || $1 == "$2" ]]
}
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
if [[ ! $nixosVersion ]]; then
echo "Updating flake 'nixos-search'"
nix flake update --flake ../test/nixos-search
echo
fi
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"
if [[ $nixosVersion ]]; then
sed -Ei "s|(nixpkgs.url = .*nixos-)[^\"]+|\1$nixosVersion|" ../flake.nix
nix flake update nixpkgs --flake ..
else
nix flake update --flake ..
fi
nix flake update $nixUpdateArg ..
echo
nix eval --raw -f update-flake.nix --argstr prevVersions "$versions" showUpdates; echo

View file

@ -168,7 +168,6 @@ in {
lbtcnodeendpoint=${nbLib.addressWithPort liquidd.address liquidd.whitelistedPort}
''}
postgres=User ID=${cfg.nbxplorer.user};Host=/run/postgresql;Database=nbxplorer
automigrate=1
'';
in rec {
wantedBy = [ "multi-user.target" ];

View file

@ -91,7 +91,7 @@ let
enabledServices = filterAttrs (n: v: isEnabled n) cfg.services;
isEnabled = x: config.services.${x}.enable;
ip = "${pkgs.iproute}/bin/ip";
ip = "${pkgs.iproute2}/bin/ip";
iptables = "${config.networking.firewall.package}/bin/iptables";
bridgeIp = "169.254.${toString cfg.addressblock}.10";

View file

@ -2,24 +2,25 @@
pkgs: pkgsUnstable:
{
inherit (pkgs)
charge-lnd
elementsd
extra-container
lightning-pool
lndconnect;
inherit (pkgsUnstable)
bitcoin
bitcoind
btcpayserver
charge-lnd
clboss
clightning
electrs
elementsd
extra-container
fulcrum
hwi
lightning-loop
lightning-pool
lnd
lndconnect
nbxplorer;
inherit (pkgsUnstable)
;
inherit pkgs pkgsUnstable;
}

View file

@ -26,8 +26,9 @@ let
postPatch = ''
substituteInPlace pyproject.toml \
--replace 'gevent = "^23.9.0.post1"' 'gevent = "24.2.1"' \
--replace 'flask = "^2.3.3"' 'flask = "3.0.3"'
--replace-fail 'gevent = "^23.9.0.post1"' 'gevent = "24.2.1"' \
--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
sed -i '/authors/a include = [ { path = "utilities", format = ["sdist", "wheel"] } ]' pyproject.toml

View file

@ -29,9 +29,8 @@ buildPythonPackage rec {
inherit version src;
format = "pyproject";
# Since v0.9.11, Python older than v3.8 is not supported. Python v3.12 is
# still not supported.
disabled = (pythonOlder "3.8") || (pythonAtLeast "3.12");
# Since v0.9.11, Python older than v3.8 is not supported.
disabled = pythonOlder "3.8";
nativeBuildInputs = [
setuptools
@ -75,9 +74,10 @@ buildPythonPackage rec {
postPatch = ''
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 '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'.
sed -i '/^\[tool.setuptools.packages.find\]/a include = ["jmbase", "jmbitcoin", "jmclient", "jmdaemon"]' pyproject.toml

View file

@ -29,4 +29,9 @@ buildPythonPackage rec {
checkInputs = [ pytestCheckHook ];
postUnpack = "sourceRoot=$sourceRoot/contrib/pyln-proto";
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail 'cryptography = "^42"' 'cryptography = "43.0.1"'
'';
}

View file

@ -14,6 +14,8 @@ let
clientBaseConfig = {
imports = [ ../modules/modules.nix ];
system.switch.enable = true;
nixpkgs.pkgs = pkgs;
nix-bitcoin.generateSecrets = true;

View file

@ -1,7 +1,7 @@
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 "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
# 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

View file

@ -452,10 +452,10 @@ def _():
def expect_clightning_log(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:
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: