chore(npins): Update #165
11 changed files with 122 additions and 65 deletions
|
@ -12,7 +12,7 @@ jobs:
|
||||||
- name: Check the validity of meta options
|
- name: Check the validity of meta options
|
||||||
run: nix-build meta/verify.nix -A meta
|
run: nix-build meta/verify.nix -A meta
|
||||||
name: Check meta
|
name: Check meta
|
||||||
'on':
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
|
@ -7,7 +7,7 @@ jobs:
|
||||||
run: nix-shell -A check-workflows --run '[ $(git status --porcelain | wc -l)
|
run: nix-shell -A check-workflows --run '[ $(git status --porcelain | wc -l)
|
||||||
-eq 0 ]'
|
-eq 0 ]'
|
||||||
name: Check workflows
|
name: Check workflows
|
||||||
'on':
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
|
@ -110,7 +110,7 @@ jobs:
|
||||||
name: Build and cache web03
|
name: Build and cache web03
|
||||||
run: nix-shell -A eval-nodes --run cache-node
|
run: nix-shell -A eval-nodes --run cache-node
|
||||||
name: Build all the nodes
|
name: Build all the nodes
|
||||||
'on':
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
|
@ -7,19 +7,19 @@ jobs:
|
||||||
depth: 0
|
depth: 0
|
||||||
token: ${{ secrets.TEA_DGNUM_CHORES_TOKEN }}
|
token: ${{ secrets.TEA_DGNUM_CHORES_TOKEN }}
|
||||||
- name: Update dependencies and open PR if necessary
|
- name: Update dependencies and open PR if necessary
|
||||||
run: "npins update\n\nif [ ! -z \"$(git diff --name-only)\" ]; then\n echo\
|
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\
|
\"[+] 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\
|
\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\"\
|
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\
|
\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 \
|
the server with the cli\n tea login add \\\n -n dgnum-chores \\\n -t
|
||||||
\ -t \"${{ secrets.TEA_DGNUM_CHORES_TOKEN }}\" \\\n -u https://git.dgnum.eu\n\
|
\"${{ 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\
|
\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):\
|
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\
|
Update dgnum-chores')\" ]; then\n tea pr create \\\n --description
|
||||||
\ \"Automatic npins update\" \\\n --title \"chore(npins): Update\" \\\
|
\"Automatic npins update\" \\\n --title \"chore(npins): Update\" \\\n\
|
||||||
\n --head npins-update\n fi\nfi\n"
|
\ --head npins-update\n fi\nfi\n"
|
||||||
name: npins update
|
name: npins update
|
||||||
'on':
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: 25 15 * * *
|
- cron: 25 15 * * *
|
||||||
|
|
|
@ -7,6 +7,6 @@ jobs:
|
||||||
run: nix-shell -A pre-commit --run 'pre-commit run --all-files --hook-stage
|
run: nix-shell -A pre-commit --run 'pre-commit run --all-files --hook-stage
|
||||||
pre-push --show-diff-on-failure'
|
pre-push --show-diff-on-failure'
|
||||||
name: Run pre-commit on all files
|
name: Run pre-commit on all files
|
||||||
'on':
|
on:
|
||||||
- push
|
- push
|
||||||
- pull_request
|
- pull_request
|
||||||
|
|
|
@ -10,7 +10,7 @@ let
|
||||||
# - push to a new branch dgn-v0.A.B where A.B is the new version
|
# - 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
|
# - finally, update the commit hash of the customization patch
|
||||||
|
|
||||||
dgn-id = "8f19cb1c9623f8da71f6512c1528d83acc35db57";
|
dgn-id = "d73e347b1cefe23092bfcb2d3f8a23903410203e";
|
||||||
port = 8084;
|
port = 8084;
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
{
|
{ config, pkgs, ... }:
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
nixpkgs,
|
|
||||||
sources,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
let
|
let
|
||||||
url = "https://git.dgnum.eu";
|
url = "https://git.dgnum.eu";
|
||||||
|
@ -30,8 +24,6 @@ let
|
||||||
options = "--cpus=4";
|
options = "--cpus=4";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
nix-pkgs = import sources.nix-pkgs { inherit pkgs; };
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
services.forgejo-nix-runners = {
|
services.forgejo-nix-runners = {
|
||||||
|
@ -43,10 +35,8 @@ in
|
||||||
tokenFile = config.age.secrets."forgejo_runners-token_file".path;
|
tokenFile = config.age.secrets."forgejo_runners-token_file".path;
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
nix-pkgs.colmena
|
|
||||||
pkgs.npins
|
pkgs.npins
|
||||||
pkgs.tea
|
pkgs.tea
|
||||||
nixpkgs.unstable.nixfmt-rfc-style
|
|
||||||
];
|
];
|
||||||
|
|
||||||
containerOptions = [ "--cpus=4" ];
|
containerOptions = [ "--cpus=4" ];
|
||||||
|
|
|
@ -13,7 +13,7 @@ in
|
||||||
services = {
|
services = {
|
||||||
netbox = {
|
netbox = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = nixpkgs.unstable.netbox_3_7;
|
package = nixpkgs.unstable.netbox_4_1;
|
||||||
secretKeyFile = "/dev/null";
|
secretKeyFile = "/dev/null";
|
||||||
listenAddress = "127.0.0.1";
|
listenAddress = "127.0.0.1";
|
||||||
plugins = p: [ p.netbox-qrcode ];
|
plugins = p: [ p.netbox-qrcode ];
|
||||||
|
|
|
@ -59,10 +59,10 @@
|
||||||
"pre_releases": false,
|
"pre_releases": false,
|
||||||
"version_upper_bound": null,
|
"version_upper_bound": null,
|
||||||
"release_prefix": null,
|
"release_prefix": null,
|
||||||
"version": "v1.8.2",
|
"version": "v1.9.0",
|
||||||
"revision": "0a97c6683ecb8d92ab0ce4c3c39e896e4a3fe388",
|
"revision": "49a4936cee640e27d74baee6fd1278285d29b100",
|
||||||
"url": "https://api.github.com/repos/nix-community/disko/tarball/v1.8.2",
|
"url": "https://api.github.com/repos/nix-community/disko/tarball/v1.9.0",
|
||||||
"hash": "1xivgibk1fa07z4xqxpyha6yyb0pmahf52caf1kgh8zxr231ai1v"
|
"hash": "0j76ar4qz320fakdii4659w5lww8wiz6yb7g47npywqvf2lbp388"
|
||||||
},
|
},
|
||||||
"dns.nix": {
|
"dns.nix": {
|
||||||
"type": "GitRelease",
|
"type": "GitRelease",
|
||||||
|
@ -87,9 +87,9 @@
|
||||||
"repo": "git-hooks.nix"
|
"repo": "git-hooks.nix"
|
||||||
},
|
},
|
||||||
"branch": "master",
|
"branch": "master",
|
||||||
"revision": "3c3e88f0f544d6bb54329832616af7eb971b6be6",
|
"revision": "cd1af27aa85026ac759d5d3fccf650abe7e1bbf0",
|
||||||
"url": "https://github.com/cachix/git-hooks.nix/archive/3c3e88f0f544d6bb54329832616af7eb971b6be6.tar.gz",
|
"url": "https://github.com/cachix/git-hooks.nix/archive/cd1af27aa85026ac759d5d3fccf650abe7e1bbf0.tar.gz",
|
||||||
"hash": "04pwjz423iq2nkazkys905gvsm5j39722ngavrnx42b8msr5k555"
|
"hash": "1icl4cz33lkr4bz7fvlf3jppmahgpzij81wfa5any3z7w7b5lnxw"
|
||||||
},
|
},
|
||||||
"kadenios": {
|
"kadenios": {
|
||||||
"type": "Git",
|
"type": "Git",
|
||||||
|
@ -144,9 +144,9 @@
|
||||||
"url": "https://git.lix.systems/lix-project/lix.git"
|
"url": "https://git.lix.systems/lix-project/lix.git"
|
||||||
},
|
},
|
||||||
"branch": "main",
|
"branch": "main",
|
||||||
"revision": "0ff8f9132552e03497b07e1e5c068660a7a04515",
|
"revision": "c859d03013712b349d82ee6223948d6d03e63a8d",
|
||||||
"url": null,
|
"url": null,
|
||||||
"hash": "0qdaiqp5q2nb0yffc03vhlbd55v1jk3jlxz26prhk0hxddz0xhyq"
|
"hash": "14bn1c3azvnkp1wl28x7y288vpd2gp96nswlnfzrcp13a4ivbbbf"
|
||||||
},
|
},
|
||||||
"lix-module": {
|
"lix-module": {
|
||||||
"type": "Git",
|
"type": "Git",
|
||||||
|
@ -155,9 +155,9 @@
|
||||||
"url": "https://git.lix.systems/lix-project/nixos-module.git"
|
"url": "https://git.lix.systems/lix-project/nixos-module.git"
|
||||||
},
|
},
|
||||||
"branch": "main",
|
"branch": "main",
|
||||||
"revision": "fd186f535a4ac7ae35d98c1dd5d79f0a81b7976d",
|
"revision": "691193879d96bdfd1e6ab5ebcca2fadc7604cf34",
|
||||||
"url": null,
|
"url": null,
|
||||||
"hash": "0jxpqaz12lqibg03iv36sa0shfvamn2yhg937llv3kl4csijd34f"
|
"hash": "1h4f2p6x8vq7bfc20hxk6zz9i4imsjjkmf0m28bzmx6vinxqimj4"
|
||||||
},
|
},
|
||||||
"lon": {
|
"lon": {
|
||||||
"type": "Git",
|
"type": "Git",
|
||||||
|
@ -240,15 +240,15 @@
|
||||||
"url": "https://git.hubrecht.ovh/hubrecht/nix-pkgs"
|
"url": "https://git.hubrecht.ovh/hubrecht/nix-pkgs"
|
||||||
},
|
},
|
||||||
"branch": "main",
|
"branch": "main",
|
||||||
"revision": "e3fac77b062c9fe98dc1b5a367b0a8e70cde9624",
|
"revision": "e27e07f9c03a3bc756f9447a2288ca6f14130ffc",
|
||||||
"url": null,
|
"url": null,
|
||||||
"hash": "12xqh19mv8zgvyrh4vfnc95acf45x81g398pyqsd1xy1l7030r7i"
|
"hash": "06vydk09wniygpy04yjh07g9raswimhwwfj1cysigx2lxrg0997a"
|
||||||
},
|
},
|
||||||
"nixos-24.05": {
|
"nixos-24.05": {
|
||||||
"type": "Channel",
|
"type": "Channel",
|
||||||
"name": "nixos-24.05",
|
"name": "nixos-24.05",
|
||||||
"url": "https://releases.nixos.org/nixos/24.05/nixos-24.05.5809.4eb33fe664af/nixexprs.tar.xz",
|
"url": "https://releases.nixos.org/nixos/24.05/nixos-24.05.6668.e8c38b73aeb2/nixexprs.tar.xz",
|
||||||
"hash": "02hxkkrpf33s6nsqkla1292zw64dqfq9wpkda5hry3vr3fhxwwg4"
|
"hash": "0lhh36z3fvd3b64dz7an08y3c3shb67aj17ny9z28bs21i3dc5yh"
|
||||||
},
|
},
|
||||||
"nixos-generators": {
|
"nixos-generators": {
|
||||||
"type": "Git",
|
"type": "Git",
|
||||||
|
@ -258,21 +258,21 @@
|
||||||
"repo": "nixos-generators"
|
"repo": "nixos-generators"
|
||||||
},
|
},
|
||||||
"branch": "master",
|
"branch": "master",
|
||||||
"revision": "dd28a0806e7124fe392c33c9ccaa12f21970401f",
|
"revision": "15a87ccb45e06d24a9fd5f99a49782efe11b23f0",
|
||||||
"url": "https://github.com/nix-community/nixos-generators/archive/dd28a0806e7124fe392c33c9ccaa12f21970401f.tar.gz",
|
"url": "https://github.com/nix-community/nixos-generators/archive/15a87ccb45e06d24a9fd5f99a49782efe11b23f0.tar.gz",
|
||||||
"hash": "09226kqddjg1m8m1q9n4l1hsln93hckhj238q0v851wxbwd0qq73"
|
"hash": "0mwllbwinr6cira94347vhzq3jn3zgp28xg6w1ga0ncls7s476q4"
|
||||||
},
|
},
|
||||||
"nixos-unstable": {
|
"nixos-unstable": {
|
||||||
"type": "Channel",
|
"type": "Channel",
|
||||||
"name": "nixos-unstable",
|
"name": "nixos-unstable",
|
||||||
"url": "https://releases.nixos.org/nixos/unstable/nixos-24.11pre694395.4c2fcb090b1f/nixexprs.tar.xz",
|
"url": "https://releases.nixos.org/nixos/unstable/nixos-25.05beta708622.5e4fbfb6b3de/nixexprs.tar.xz",
|
||||||
"hash": "05fszj13lci5gdbn5grn92wd3mzj6f7gy11kqj78xcsg69m2wbrl"
|
"hash": "18zd6qnn1zmz3pgq2q484lmdk486ncxyp8r5g9c71r9dc8jr5dnc"
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"type": "Channel",
|
"type": "Channel",
|
||||||
"name": "nixpkgs-unstable",
|
"name": "nixpkgs-unstable",
|
||||||
"url": "https://releases.nixos.org/nixpkgs/nixpkgs-24.11pre694416.ccc0c2126893/nixexprs.tar.xz",
|
"url": "https://releases.nixos.org/nixpkgs/nixpkgs-25.05pre709559.5083ec887760/nixexprs.tar.xz",
|
||||||
"hash": "0cn1z4wzps8nfqxzr6l5mbn81adcqy2cy2ic70z13fhzicmxfsbx"
|
"hash": "1z912j1lmrg8zp2hpmmi69dls9zlpvqfvdkvh5xc3x6iqkqwn0cd"
|
||||||
},
|
},
|
||||||
"proxmox-nixos": {
|
"proxmox-nixos": {
|
||||||
"type": "Git",
|
"type": "Git",
|
||||||
|
@ -282,9 +282,9 @@
|
||||||
"repo": "proxmox-nixos"
|
"repo": "proxmox-nixos"
|
||||||
},
|
},
|
||||||
"branch": "main",
|
"branch": "main",
|
||||||
"revision": "950e4cccac0f942076e8558f7f9f4d496cabfb18",
|
"revision": "93880e244b528deca89828bc1edf08e23ccc18c4",
|
||||||
"url": "https://github.com/SaumonNet/proxmox-nixos/archive/950e4cccac0f942076e8558f7f9f4d496cabfb18.tar.gz",
|
"url": "https://github.com/SaumonNet/proxmox-nixos/archive/93880e244b528deca89828bc1edf08e23ccc18c4.tar.gz",
|
||||||
"hash": "0bhqw42ydc0jfkfqw64xsg518a1pbxnvpqw92nna7lm8mzpxm6d4"
|
"hash": "0dyiv7mvvxc0zygfzfb6zhc0v3s7a9pv8xydprxgqhyy1sajp02h"
|
||||||
},
|
},
|
||||||
"signal-irc-bridge": {
|
"signal-irc-bridge": {
|
||||||
"type": "Git",
|
"type": "Git",
|
||||||
|
@ -316,9 +316,9 @@
|
||||||
"server": "https://git.helsinki.tools/"
|
"server": "https://git.helsinki.tools/"
|
||||||
},
|
},
|
||||||
"branch": "master",
|
"branch": "master",
|
||||||
"revision": "f72adfc39c18630b45f8c982910314246d4a8d92",
|
"revision": "10c3f658aecc0a54baf062137071b129f3897111",
|
||||||
"url": "https://git.helsinki.tools/api/v4/projects/helsinki-systems%2Fwp4nix/repository/archive.tar.gz?sha=f72adfc39c18630b45f8c982910314246d4a8d92",
|
"url": "https://git.helsinki.tools/api/v4/projects/helsinki-systems%2Fwp4nix/repository/archive.tar.gz?sha=10c3f658aecc0a54baf062137071b129f3897111",
|
||||||
"hash": "08qfaav3vb832dr3r6f2n1ah6zyryvab0dxsaxwi6gk5p3zad3l8"
|
"hash": "13gbzfrz9vv9iz43bfl67hl11lsmrh524mw6kkjavfwpzw5shm1g"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"version": 3
|
"version": 3
|
||||||
|
|
70
patches/06-netbox-qrcode.patch
Normal file
70
patches/06-netbox-qrcode.patch
Normal file
|
@ -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 { };
|
|
@ -1,10 +1,8 @@
|
||||||
{
|
{
|
||||||
"nixos-24.05" = [
|
"nixos-24.05" = [
|
||||||
# netbox qrcode plugin
|
|
||||||
{
|
{
|
||||||
_type = "commit";
|
_type = "static";
|
||||||
sha = "c82191d848e7a37e125ee15c485f32ac01afc0b2";
|
path = ./06-netbox-qrcode.patch;
|
||||||
hash = "sha256-TooktlqihtULzJJsHvm8EubbUdJZvbDKdIDcYu7Qcig=";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# nixos/nextcloud: Rename autocreate (a no-op) to verify_bucket_exists
|
# nixos/nextcloud: Rename autocreate (a no-op) to verify_bucket_exists
|
||||||
|
@ -50,9 +48,8 @@
|
||||||
"nixos-unstable" = [
|
"nixos-unstable" = [
|
||||||
# netbox qrcode plugin
|
# netbox qrcode plugin
|
||||||
{
|
{
|
||||||
_type = "commit";
|
_type = "static";
|
||||||
sha = "c82191d848e7a37e125ee15c485f32ac01afc0b2";
|
path = ./06-netbox-qrcode.patch;
|
||||||
hash = "sha256-TooktlqihtULzJJsHvm8EubbUdJZvbDKdIDcYu7Qcig=";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Build netbird-relay
|
# Build netbird-relay
|
||||||
|
|
Loading…
Reference in a new issue