Skip to content

Commit 07e79e7

Browse files
Update to NixOS 25.05
1 parent 2a59c65 commit 07e79e7

File tree

4 files changed

+17
-19
lines changed

4 files changed

+17
-19
lines changed

checks/bird.nix

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
{ self, pkgs, ... }:
22

33
let
4-
bird = if pkgs.lib.versionAtLeast pkgs.lib.version "25.05" then "bird" else "bird2";
5-
6-
makeBird2Host = hostId: { pkgs, ... }: {
4+
makeBirdHost = hostId: { pkgs, ... }: {
75
imports = [
86
self.nixosModules.default
97
];
@@ -23,7 +21,7 @@ let
2321
networkConfig.Address = "10.0.0.${hostId}/24";
2422
};
2523

26-
services.${bird} = {
24+
services.bird = {
2725
enable = true;
2826

2927
routerId = "10.0.0.${hostId}";
@@ -101,15 +99,15 @@ in
10199
pkgs.testers.nixosTest {
102100
name = "bird";
103101

104-
nodes.host1 = makeBird2Host "1";
105-
nodes.host2 = makeBird2Host "2";
102+
nodes.host1 = makeBirdHost "1";
103+
nodes.host2 = makeBirdHost "2";
106104

107-
testScript = ''
105+
testScript = /* python */ ''
108106
start_all()
109107
110-
host1.wait_for_unit("${bird}.service")
111-
host2.wait_for_unit("${bird}.service")
112-
host1.succeed("systemctl reload ${bird}.service")
108+
host1.wait_for_unit("bird.service")
109+
host2.wait_for_unit("bird.service")
110+
host1.succeed("systemctl reload bird.service")
113111
114112
with subtest("Waiting for advertised IPv4 routes"):
115113
host1.wait_until_succeeds("ip --json r | jq -e 'map(select(.dst == \"10.10.0.2\")) | any'")

flake.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
inputs = {
3-
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
43
flake-utils.url = "github:numtide/flake-utils";
4+
5+
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
56
};
67

78
outputs = { self, nixpkgs, flake-utils, ... }:

modules/default.nix

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
{ config, lib, pkgs, ... }:
22
let
3-
bird = if lib.versionAtLeast lib.version "25.05" then "bird" else "bird2";
4-
cfg = config.services.${bird};
3+
cfg = config.services.bird;
54
in
65
{
7-
options.services.${bird} = {
6+
options.services.bird = {
87
# we do not wan't merged config's to result in multiple routerId's
98
routerId = lib.mkOption {
109
type = lib.types.str;
@@ -53,7 +52,7 @@ in
5352
);
5453

5554
config = lib.mkIf cfg.enable {
56-
services.${bird} = {
55+
services.bird = {
5756
config =
5857
let
5958
mkTemplate = { name, type, conf }: ''

0 commit comments

Comments
 (0)