From 8a5de73b473dbf15161ebb1ab08df2551b214896 Mon Sep 17 00:00:00 2001 From: DGNum Chores Date: Mon, 18 Nov 2024 15:29:55 +0000 Subject: [PATCH 1/5] chore(npins): Update --- npins/sources.json | 56 +++++++++++++++++++++++----------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/npins/sources.json b/npins/sources.json index de8fcdb..3ea0d3a 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -59,10 +59,10 @@ "pre_releases": false, "version_upper_bound": null, "release_prefix": null, - "version": "v1.8.2", - "revision": "0a97c6683ecb8d92ab0ce4c3c39e896e4a3fe388", - "url": "https://api.github.com/repos/nix-community/disko/tarball/v1.8.2", - "hash": "1xivgibk1fa07z4xqxpyha6yyb0pmahf52caf1kgh8zxr231ai1v" + "version": "v1.9.0", + "revision": "49a4936cee640e27d74baee6fd1278285d29b100", + "url": "https://api.github.com/repos/nix-community/disko/tarball/v1.9.0", + "hash": "0j76ar4qz320fakdii4659w5lww8wiz6yb7g47npywqvf2lbp388" }, "dns.nix": { "type": "GitRelease", @@ -87,9 +87,9 @@ "repo": "git-hooks.nix" }, "branch": "master", - "revision": "3c3e88f0f544d6bb54329832616af7eb971b6be6", - "url": "https://github.com/cachix/git-hooks.nix/archive/3c3e88f0f544d6bb54329832616af7eb971b6be6.tar.gz", - "hash": "04pwjz423iq2nkazkys905gvsm5j39722ngavrnx42b8msr5k555" + "revision": "cd1af27aa85026ac759d5d3fccf650abe7e1bbf0", + "url": "https://github.com/cachix/git-hooks.nix/archive/cd1af27aa85026ac759d5d3fccf650abe7e1bbf0.tar.gz", + "hash": "1icl4cz33lkr4bz7fvlf3jppmahgpzij81wfa5any3z7w7b5lnxw" }, "kadenios": { "type": "Git", @@ -144,9 +144,9 @@ "url": "https://git.lix.systems/lix-project/lix.git" }, "branch": "main", - "revision": "0ff8f9132552e03497b07e1e5c068660a7a04515", + "revision": "c859d03013712b349d82ee6223948d6d03e63a8d", "url": null, - "hash": "0qdaiqp5q2nb0yffc03vhlbd55v1jk3jlxz26prhk0hxddz0xhyq" + "hash": "14bn1c3azvnkp1wl28x7y288vpd2gp96nswlnfzrcp13a4ivbbbf" }, "lix-module": { "type": "Git", @@ -155,9 +155,9 @@ "url": "https://git.lix.systems/lix-project/nixos-module.git" }, "branch": "main", - "revision": "fd186f535a4ac7ae35d98c1dd5d79f0a81b7976d", + "revision": "691193879d96bdfd1e6ab5ebcca2fadc7604cf34", "url": null, - "hash": "0jxpqaz12lqibg03iv36sa0shfvamn2yhg937llv3kl4csijd34f" + "hash": "1h4f2p6x8vq7bfc20hxk6zz9i4imsjjkmf0m28bzmx6vinxqimj4" }, "lon": { "type": "Git", @@ -240,15 +240,15 @@ "url": "https://git.hubrecht.ovh/hubrecht/nix-pkgs" }, "branch": "main", - "revision": "e3fac77b062c9fe98dc1b5a367b0a8e70cde9624", + "revision": "e27e07f9c03a3bc756f9447a2288ca6f14130ffc", "url": null, - "hash": "12xqh19mv8zgvyrh4vfnc95acf45x81g398pyqsd1xy1l7030r7i" + "hash": "06vydk09wniygpy04yjh07g9raswimhwwfj1cysigx2lxrg0997a" }, "nixos-24.05": { "type": "Channel", "name": "nixos-24.05", - "url": "https://releases.nixos.org/nixos/24.05/nixos-24.05.5809.4eb33fe664af/nixexprs.tar.xz", - "hash": "02hxkkrpf33s6nsqkla1292zw64dqfq9wpkda5hry3vr3fhxwwg4" + "url": "https://releases.nixos.org/nixos/24.05/nixos-24.05.6668.e8c38b73aeb2/nixexprs.tar.xz", + "hash": "0lhh36z3fvd3b64dz7an08y3c3shb67aj17ny9z28bs21i3dc5yh" }, "nixos-generators": { "type": "Git", @@ -258,21 +258,21 @@ "repo": "nixos-generators" }, "branch": "master", - "revision": "dd28a0806e7124fe392c33c9ccaa12f21970401f", - "url": "https://github.com/nix-community/nixos-generators/archive/dd28a0806e7124fe392c33c9ccaa12f21970401f.tar.gz", - "hash": "09226kqddjg1m8m1q9n4l1hsln93hckhj238q0v851wxbwd0qq73" + "revision": "15a87ccb45e06d24a9fd5f99a49782efe11b23f0", + "url": "https://github.com/nix-community/nixos-generators/archive/15a87ccb45e06d24a9fd5f99a49782efe11b23f0.tar.gz", + "hash": "0mwllbwinr6cira94347vhzq3jn3zgp28xg6w1ga0ncls7s476q4" }, "nixos-unstable": { "type": "Channel", "name": "nixos-unstable", - "url": "https://releases.nixos.org/nixos/unstable/nixos-24.11pre694395.4c2fcb090b1f/nixexprs.tar.xz", - "hash": "05fszj13lci5gdbn5grn92wd3mzj6f7gy11kqj78xcsg69m2wbrl" + "url": "https://releases.nixos.org/nixos/unstable/nixos-25.05beta708622.5e4fbfb6b3de/nixexprs.tar.xz", + "hash": "18zd6qnn1zmz3pgq2q484lmdk486ncxyp8r5g9c71r9dc8jr5dnc" }, "nixpkgs": { "type": "Channel", "name": "nixpkgs-unstable", - "url": "https://releases.nixos.org/nixpkgs/nixpkgs-24.11pre694416.ccc0c2126893/nixexprs.tar.xz", - "hash": "0cn1z4wzps8nfqxzr6l5mbn81adcqy2cy2ic70z13fhzicmxfsbx" + "url": "https://releases.nixos.org/nixpkgs/nixpkgs-25.05pre709559.5083ec887760/nixexprs.tar.xz", + "hash": "1z912j1lmrg8zp2hpmmi69dls9zlpvqfvdkvh5xc3x6iqkqwn0cd" }, "proxmox-nixos": { "type": "Git", @@ -282,9 +282,9 @@ "repo": "proxmox-nixos" }, "branch": "main", - "revision": "950e4cccac0f942076e8558f7f9f4d496cabfb18", - "url": "https://github.com/SaumonNet/proxmox-nixos/archive/950e4cccac0f942076e8558f7f9f4d496cabfb18.tar.gz", - "hash": "0bhqw42ydc0jfkfqw64xsg518a1pbxnvpqw92nna7lm8mzpxm6d4" + "revision": "93880e244b528deca89828bc1edf08e23ccc18c4", + "url": "https://github.com/SaumonNet/proxmox-nixos/archive/93880e244b528deca89828bc1edf08e23ccc18c4.tar.gz", + "hash": "0dyiv7mvvxc0zygfzfb6zhc0v3s7a9pv8xydprxgqhyy1sajp02h" }, "signal-irc-bridge": { "type": "Git", @@ -316,9 +316,9 @@ "server": "https://git.helsinki.tools/" }, "branch": "master", - "revision": "f72adfc39c18630b45f8c982910314246d4a8d92", - "url": "https://git.helsinki.tools/api/v4/projects/helsinki-systems%2Fwp4nix/repository/archive.tar.gz?sha=f72adfc39c18630b45f8c982910314246d4a8d92", - "hash": "08qfaav3vb832dr3r6f2n1ah6zyryvab0dxsaxwi6gk5p3zad3l8" + "revision": "10c3f658aecc0a54baf062137071b129f3897111", + "url": "https://git.helsinki.tools/api/v4/projects/helsinki-systems%2Fwp4nix/repository/archive.tar.gz?sha=10c3f658aecc0a54baf062137071b129f3897111", + "hash": "13gbzfrz9vv9iz43bfl67hl11lsmrh524mw6kkjavfwpzw5shm1g" } }, "version": 3 -- 2.47.0 From aa4f972085362211cedf6cd45bea3d4b99414756 Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Tue, 19 Nov 2024 00:00:14 +0100 Subject: [PATCH 2/5] fix(forgejo-runners): Let the shell handle colmena --- machines/storage01/forgejo-runners.nix | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/machines/storage01/forgejo-runners.nix b/machines/storage01/forgejo-runners.nix index 5c94d2a..1418cbb 100644 --- a/machines/storage01/forgejo-runners.nix +++ b/machines/storage01/forgejo-runners.nix @@ -1,10 +1,4 @@ -{ - config, - pkgs, - nixpkgs, - sources, - ... -}: +{ config, pkgs, ... }: let url = "https://git.dgnum.eu"; @@ -30,8 +24,6 @@ let options = "--cpus=4"; }; }; - - nix-pkgs = import sources.nix-pkgs { inherit pkgs; }; in { services.forgejo-nix-runners = { @@ -43,10 +35,8 @@ in tokenFile = config.age.secrets."forgejo_runners-token_file".path; dependencies = [ - nix-pkgs.colmena pkgs.npins pkgs.tea - nixpkgs.unstable.nixfmt-rfc-style ]; containerOptions = [ "--cpus=4" ]; -- 2.47.0 From a50637d55e9b6bb63b4dcb1380b0f9b23c90a496 Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Tue, 19 Nov 2024 00:13:49 +0100 Subject: [PATCH 3/5] chore(stirling-pdf): New version --- machines/compute01/stirling-pdf/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/machines/compute01/stirling-pdf/default.nix b/machines/compute01/stirling-pdf/default.nix index 72045e8..ae9cf27 100644 --- a/machines/compute01/stirling-pdf/default.nix +++ b/machines/compute01/stirling-pdf/default.nix @@ -10,7 +10,7 @@ let # - push to a new branch dgn-v0.A.B where A.B is the new version # - finally, update the commit hash of the customization patch - dgn-id = "8f19cb1c9623f8da71f6512c1528d83acc35db57"; + dgn-id = "d73e347b1cefe23092bfcb2d3f8a23903410203e"; port = 8084; in -- 2.47.0 From b00e47ec85a830e5ef1eb386561a17ded2af26b5 Mon Sep 17 00:00:00 2001 From: sinavir Date: Mon, 11 Nov 2024 00:57:08 +0100 Subject: [PATCH 4/5] chore(netbox): Upgrade --- machines/web01/netbox.nix | 2 +- patches/06-netbox-qrcode.patch | 70 ++++++++++++++++++++++++++++++++++ patches/default.nix | 11 ++---- 3 files changed, 75 insertions(+), 8 deletions(-) create mode 100644 patches/06-netbox-qrcode.patch diff --git a/machines/web01/netbox.nix b/machines/web01/netbox.nix index 7c2157b..7d6f239 100644 --- a/machines/web01/netbox.nix +++ b/machines/web01/netbox.nix @@ -13,7 +13,7 @@ in services = { netbox = { enable = true; - package = nixpkgs.unstable.netbox_3_7; + package = nixpkgs.unstable.netbox_4_1; secretKeyFile = "/dev/null"; listenAddress = "127.0.0.1"; plugins = p: [ p.netbox-qrcode ]; diff --git a/patches/06-netbox-qrcode.patch b/patches/06-netbox-qrcode.patch new file mode 100644 index 0000000..73bfdc9 --- /dev/null +++ b/patches/06-netbox-qrcode.patch @@ -0,0 +1,70 @@ +diff --git a/pkgs/development/python-modules/netbox-qrcode/default.nix b/pkgs/development/python-modules/netbox-qrcode/default.nix +new file mode 100644 +index 000000000000..b378b839a8dc +--- /dev/null ++++ b/pkgs/development/python-modules/netbox-qrcode/default.nix +@@ -0,0 +1,51 @@ ++{ lib ++, buildPythonPackage ++, fetchFromGitHub ++, setuptools ++, wheel ++, pillow ++, qrcode ++, netbox ++}: ++ ++buildPythonPackage rec { ++ pname = "netbox-qrcode"; ++ version = "0.0.13"; ++ pyproject = true; ++ ++ src = fetchFromGitHub { ++ owner = "netbox-community"; ++ repo = "netbox-qrcode"; ++ rev = "v${version}"; ++ hash = "sha256-/labSZyB1SkU/uemuL946RDk8IVEAgCYJY2vrJFney0="; ++ }; ++ ++ nativeBuildInputs = [ ++ setuptools ++ wheel ++ ]; ++ ++ propagatedBuildInputs = [ ++ qrcode ++ pillow ++ ]; ++ ++ checkInputs = [ ++ netbox ++ ]; ++ ++ preFixup = '' ++ export PYTHONPATH=${netbox}/opt/netbox/netbox:$PYTHONPATH ++ ''; ++ ++ pythonImportsCheck = [ ++ "netbox_qrcode" ++ ]; ++ ++ meta = with lib; { ++ description = "NetBox Plugin for generate QR Codes"; ++ homepage = "https://github.com/netbox-community/netbox-qrcode"; ++ license = licenses.asl20; ++ maintainers = with maintainers; [ sinavir ]; ++ }; ++} +diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix +index 9999d745e3ac..b226e0063672 100644 +--- a/pkgs/top-level/python-packages.nix ++++ b/pkgs/top-level/python-packages.nix +@@ -8989,6 +8989,8 @@ self: super: with self; { + + netbox-reorder-rack = callPackage ../development/python-modules/netbox-reorder-rack { }; + ++ netbox-qrcode = callPackage ../development/python-modules/netbox-qrcode { }; ++ + netcdf4 = callPackage ../development/python-modules/netcdf4 { }; + + netdata = callPackage ../development/python-modules/netdata { }; diff --git a/patches/default.nix b/patches/default.nix index cf939c1..0cb2d81 100644 --- a/patches/default.nix +++ b/patches/default.nix @@ -1,10 +1,8 @@ { "nixos-24.05" = [ - # netbox qrcode plugin { - _type = "commit"; - sha = "c82191d848e7a37e125ee15c485f32ac01afc0b2"; - hash = "sha256-TooktlqihtULzJJsHvm8EubbUdJZvbDKdIDcYu7Qcig="; + _type = "static"; + path = ./06-netbox-qrcode.patch; } # nixos/nextcloud: Rename autocreate (a no-op) to verify_bucket_exists @@ -50,9 +48,8 @@ "nixos-unstable" = [ # netbox qrcode plugin { - _type = "commit"; - sha = "c82191d848e7a37e125ee15c485f32ac01afc0b2"; - hash = "sha256-TooktlqihtULzJJsHvm8EubbUdJZvbDKdIDcYu7Qcig="; + _type = "static"; + path = ./06-netbox-qrcode.patch; } # Build netbird-relay -- 2.47.0 From 32f68a54a92b3742030d43cb0402ea9de332a004 Mon Sep 17 00:00:00 2001 From: sinavir Date: Tue, 19 Nov 2024 00:53:33 +0100 Subject: [PATCH 5/5] chore(workflows): regenerate --- .forgejo/workflows/check-meta.yaml | 2 +- .forgejo/workflows/check-workflows.yaml | 2 +- .forgejo/workflows/eval-nodes.yaml | 2 +- .forgejo/workflows/npins-update.yaml | 26 ++++++++++++------------- .forgejo/workflows/pre-commit.yaml | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.forgejo/workflows/check-meta.yaml b/.forgejo/workflows/check-meta.yaml index df3a34a..035f953 100644 --- a/.forgejo/workflows/check-meta.yaml +++ b/.forgejo/workflows/check-meta.yaml @@ -12,7 +12,7 @@ jobs: - name: Check the validity of meta options run: nix-build meta/verify.nix -A meta name: Check meta -'on': +on: pull_request: branches: - main diff --git a/.forgejo/workflows/check-workflows.yaml b/.forgejo/workflows/check-workflows.yaml index 3aa1994..b5936ae 100644 --- a/.forgejo/workflows/check-workflows.yaml +++ b/.forgejo/workflows/check-workflows.yaml @@ -7,7 +7,7 @@ jobs: run: nix-shell -A check-workflows --run '[ $(git status --porcelain | wc -l) -eq 0 ]' name: Check workflows -'on': +on: pull_request: branches: - main diff --git a/.forgejo/workflows/eval-nodes.yaml b/.forgejo/workflows/eval-nodes.yaml index fb6df7f..0b3ef71 100644 --- a/.forgejo/workflows/eval-nodes.yaml +++ b/.forgejo/workflows/eval-nodes.yaml @@ -110,7 +110,7 @@ jobs: name: Build and cache web03 run: nix-shell -A eval-nodes --run cache-node name: Build all the nodes -'on': +on: pull_request: branches: - main diff --git a/.forgejo/workflows/npins-update.yaml b/.forgejo/workflows/npins-update.yaml index 17ab93b..9a268f2 100644 --- a/.forgejo/workflows/npins-update.yaml +++ b/.forgejo/workflows/npins-update.yaml @@ -7,19 +7,19 @@ jobs: depth: 0 token: ${{ secrets.TEA_DGNUM_CHORES_TOKEN }} - name: Update dependencies and open PR if necessary - run: "npins update\n\nif [ ! -z \"$(git diff --name-only)\" ]; then\n echo\ - \ \"[+] Changes detected, pushing updates.\"\n\n git switch -C npins-update\n\ - \n git add npins\n\n git config user.name \"DGNum Chores\"\n git config\ - \ user.email \"tech@dgnum.eu\"\n\n git commit --message \"chore(npins): Update\"\ - \n git push --set-upstream origin npins-update --force\n\n # Connect to\ - \ the server with the cli\n tea login add \\\n -n dgnum-chores \\\n \ - \ -t \"${{ secrets.TEA_DGNUM_CHORES_TOKEN }}\" \\\n -u https://git.dgnum.eu\n\ - \n # Create a pull request if needed\n # i.e. no PR with the same title\ - \ exists\n if [ -z \"$(tea pr ls -f='title,author' -o simple | grep 'chore(npins):\ - \ Update dgnum-chores')\" ]; then\n tea pr create \\\n --description\ - \ \"Automatic npins update\" \\\n --title \"chore(npins): Update\" \\\ - \n --head npins-update\n fi\nfi\n" + run: "npins update\n\nif [ ! -z \"$(git diff --name-only)\" ]; then\n echo + \"[+] Changes detected, pushing updates.\"\n\n git switch -C npins-update\n\ + \n git add npins\n\n git config user.name \"DGNum Chores\"\n git config + user.email \"tech@dgnum.eu\"\n\n git commit --message \"chore(npins): Update\"\ + \n git push --set-upstream origin npins-update --force\n\n # Connect to + the server with the cli\n tea login add \\\n -n dgnum-chores \\\n -t + \"${{ secrets.TEA_DGNUM_CHORES_TOKEN }}\" \\\n -u https://git.dgnum.eu\n\ + \n # Create a pull request if needed\n # i.e. no PR with the same title + exists\n if [ -z \"$(tea pr ls -f='title,author' -o simple | grep 'chore(npins): + Update dgnum-chores')\" ]; then\n tea pr create \\\n --description + \"Automatic npins update\" \\\n --title \"chore(npins): Update\" \\\n\ + \ --head npins-update\n fi\nfi\n" name: npins update -'on': +on: schedule: - cron: 25 15 * * * diff --git a/.forgejo/workflows/pre-commit.yaml b/.forgejo/workflows/pre-commit.yaml index d0573d6..13545ce 100644 --- a/.forgejo/workflows/pre-commit.yaml +++ b/.forgejo/workflows/pre-commit.yaml @@ -7,6 +7,6 @@ jobs: run: nix-shell -A pre-commit --run 'pre-commit run --all-files --hook-stage pre-push --show-diff-on-failure' name: Run pre-commit on all files -'on': +on: - push - pull_request -- 2.47.0