This commit is contained in:
2025-07-02 15:48:57 +00:00
parent 6d490d8864
commit 69115bba71
8 changed files with 85 additions and 125 deletions

125
flake.lock generated
View File

@@ -2,11 +2,11 @@
"nodes": { "nodes": {
"filter": { "filter": {
"locked": { "locked": {
"lastModified": 1710156097, "lastModified": 1731533336,
"narHash": "sha256-1Wvk8UP7PXdf8bCCaEoMnOT1qe5/Duqgj+rL8sRQsSM=", "narHash": "sha256-oRam5PS1vcrr5UPgALW0eo1m/5/pls27Z/pabHNy2Ms=",
"owner": "numtide", "owner": "numtide",
"repo": "nix-filter", "repo": "nix-filter",
"rev": "3342559a24e85fc164b295c3444e8a139924675b", "rev": "f7653272fd234696ae94229839a99b73c9ab7de0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -34,11 +34,11 @@
"flake-compat_2": { "flake-compat_2": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1696426674, "lastModified": 1747046372,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
"owner": "edolstra", "owner": "edolstra",
"repo": "flake-compat", "repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -52,11 +52,11 @@
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1710146030, "lastModified": 1731533236,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -87,24 +87,6 @@
"inputs": { "inputs": {
"systems": "systems_3" "systems": "systems_3"
}, },
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_4": {
"inputs": {
"systems": "systems_4"
},
"locked": { "locked": {
"lastModified": 1694529238, "lastModified": 1694529238,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
@@ -126,16 +108,16 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1744743431, "lastModified": 1751468302,
"narHash": "sha256-iyn/WBYDc7OtjSawbegINDe/gIkok888kQxk3aVnkgg=", "narHash": "sha256-tWosziZTT039x6PgEZUhzGlV8oLvdDmIgKTE8ESMaEA=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "c61bfe3ae692f42ce688b5865fac9e0de58e1387", "rev": "501cfec8277f931a9c9af9f23d3105c537faeafe",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"ref": "release-24.11", "ref": "release-25.05",
"repo": "home-manager", "repo": "home-manager",
"type": "github" "type": "github"
} }
@@ -201,11 +183,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1724878143, "lastModified": 1751432711,
"narHash": "sha256-UjpKo92iZ25M05kgSOw/Ti6VZwpgdlOa73zHj8OcaDk=", "narHash": "sha256-136MeWtckSHTN9Z2WRNRdZ8oRP3vyx3L8UxeBYE+J9w=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "95c3dfe6ef2e96ddc1ccdd7194e3cda02ca9a8ef", "rev": "497ae1357f1ac97f1aea31a4cb74ad0d534ef41f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -217,17 +199,16 @@
"nixos-wsl": { "nixos-wsl": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_2", "flake-compat": "flake-compat_2",
"flake-utils": "flake-utils_3",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
] ]
}, },
"locked": { "locked": {
"lastModified": 1724664098, "lastModified": 1749574455,
"narHash": "sha256-4SgV4jCoN5RffR1Mtn3HI1cjgHmARh+rZrpVlBclj9U=", "narHash": "sha256-fm2/8KPOYvvIAnNVtjDlTt/My00lIbZQ+LMrfQIWVzs=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixos-wsl", "repo": "nixos-wsl",
"rev": "345dfa06658a37873ca18aa205f409e4aaf1caa6", "rev": "917af390377c573932d84b5e31dd9f2c1b5c0f09",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -238,43 +219,27 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1745186762, "lastModified": 1751464076,
"narHash": "sha256-vn1ixtFWtellgcZpdIoxCVu9agdK3647hi7lcc/58eQ=", "narHash": "sha256-zPbr0yYo4BDfkJSy86fUx6TFLEAErZlmsVcTynKkFmk=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "c16961fda203155a314b0c75c13961c29e9ea7b0", "rev": "fe1a3fe5e4a84304f4d5564ac0bf32fc2780303c",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "nixos",
"ref": "release-24.11", "ref": "release-25.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1721524707,
"narHash": "sha256-5NctRsoE54N86nWd0psae70YSLfrOek3Kv1e8KoXe/0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "556533a23879fc7e5f98dd2e0b31a6911a213171",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "release-24.05",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1724819573, "lastModified": 1751271578,
"narHash": "sha256-GnR7/ibgIH1vhoy8cYdmXE6iyZqKqFxQSVkFgosBh6w=", "narHash": "sha256-P/SQmKDu06x8yv7i0s8bvnnuJYkxVGBWLWHaU+tt4YY=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "71e91c409d1e654808b2621f28a327acfdad8dc2", "rev": "3016b4b15d13f3089db8a41ef937b13a9e33a8df",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -286,11 +251,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1721466660, "lastModified": 1744868846,
"narHash": "sha256-pFSxgSZqZ3h+5Du0KvEL1ccDZBwu4zvOil1zzrPNb3c=", "narHash": "sha256-5RJTdUHDmj12Qsv7XOhuospjAjATNiTMElplWnJE9Hs=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "6e14bbce7bea6c4efd7adfa88a40dac750d80100", "rev": "ebe4301cbd8f81c4f8d3244b3632338bbeb6d49c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -318,15 +283,14 @@
}, },
"sops-nix": { "sops-nix": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_2"
"nixpkgs-stable": "nixpkgs-stable"
}, },
"locked": { "locked": {
"lastModified": 1723501126, "lastModified": 1750119275,
"narHash": "sha256-N9IcHgj/p1+2Pvk8P4Zc1bfrMwld5PcosVA0nL6IGdE=", "narHash": "sha256-Rr7Pooz9zQbhdVxux16h7URa6mA80Pb/G07T4lHvh0M=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "be0eec2d27563590194a9206f551a6f73d52fa34", "rev": "77c423a03b9b2b79709ea2cb63336312e78b72e2",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -380,31 +344,16 @@
"type": "github" "type": "github"
} }
}, },
"systems_4": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"utils": { "utils": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_4" "flake-utils": "flake-utils_3"
}, },
"locked": { "locked": {
"lastModified": 1722363685, "lastModified": 1738591040,
"narHash": "sha256-XCf2PIAT6lH7BwytgioPmVf/wkzXjSKScC4KzcZgb64=", "narHash": "sha256-4WNeriUToshQ/L5J+dTSWC5OJIwT39SEP7V7oylndi8=",
"owner": "gytis-ivaskevicius", "owner": "gytis-ivaskevicius",
"repo": "flake-utils-plus", "repo": "flake-utils-plus",
"rev": "6b10f51ff73a66bb29f3bc8151a59d217713f496", "rev": "afcb15b845e74ac5e998358709b2b5fe42a948d1",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -3,14 +3,14 @@
inputs = { inputs = {
# Nixpkgs # Nixpkgs
nixpkgs.url = "github:nixos/nixpkgs/release-24.11"; nixpkgs.url = "github:nixos/nixpkgs/release-25.05";
# You can access packages and modules from different nixpkgs revs # You can access packages and modules from different nixpkgs revs
# at the same time. Here's an working example: # at the same time. Here's an working example:
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
# Also see the 'unstable-packages' overlay at 'overlays/default.nix'. # Also see the 'unstable-packages' overlay at 'overlays/default.nix'.
# Home manager # Home manager
home-manager.url = "github:nix-community/home-manager/release-24.11"; home-manager.url = "github:nix-community/home-manager/release-25.05";
home-manager.inputs.nixpkgs.follows = "nixpkgs"; home-manager.inputs.nixpkgs.follows = "nixpkgs";
# TODO: Add any other flake you might need # TODO: Add any other flake you might need

View File

@@ -64,6 +64,7 @@
# my.prometheus-api-client # my.prometheus-api-client
]; ];
custom = { custom = {
ssh-proxy.enable = false; ssh-proxy.enable = false;
beets.enable = true; beets.enable = true;

View File

@@ -65,7 +65,7 @@
# Enable networking # Enable networking
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
networking.search = ["node.dc1.consul" "service.dc1.consul"]; networking.search = ["node.dc1.consul" "service.dc1.consul"];
networking.nameservers = ["192.168.1.1" "1.1.1.1"]; networking.nameservers = ["192.168.4.1" "192.168.4.250" "1.1.1.1"];
# Select internationalisation properties. # Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8"; i18n.defaultLocale = "en_US.UTF-8";
@@ -90,9 +90,11 @@
pkgs.bitwarden-cli pkgs.bitwarden-cli
# pkgs.unstable.nano # pkgs.unstable.nano
# pkgs.python3Packages.pydub # pkgs.python3Packages.pydub
pkgs.python3Packages.numpy (pkgs.python3.withPackages (ps: with ps; [
pkgs.python3Packages.aubio numpy
pkgs.python3Packages.pydub aubio
pydub
]))
]; ];
nix.gc = { nix.gc = {

View File

@@ -6,6 +6,7 @@
}: }:
with lib; let with lib; let
cfg = config.custom.beets; cfg = config.custom.beets;
in { in {
options.custom.beets = { options.custom.beets = {
enable = mkOption { enable = mkOption {
@@ -37,7 +38,10 @@ in {
}; };
bpmanalyser = { bpmanalyser = {
enable = true; enable = true;
propagatedBuildInputs = [pkgs.beets-bpmanalyser pkgs.python3Packages.numpy pkgs.python3Packages.aubio pkgs.python3Packages.pydub]; #propagatedBuildInputs = [pkgs.beets-bpmanalyser pkgs.python3Packages.numpy pkgs.python3Packages.aubio pkgs.python3Packages.pydub];
propagatedBuildInputs = [
pkgs.beets-bpmanalyser
] ++ (with pkgs.python3Packages; [numpy aubio pydub]);
}; };
}; };
}; };

View File

@@ -52,7 +52,7 @@ in {
#interop.preserveArgvZero = true; #interop.preserveArgvZero = true;
# docker-native.enable = true; # docker-native.enable = true;
nativeSystemd = true; #nativeSystemd = true;
# Enable integration with Docker Desktop (needs to be installed) # Enable integration with Docker Desktop (needs to be installed)
# docker-desktop.enable = true; # docker-desktop.enable = true;
}; };

View File

@@ -5,5 +5,8 @@
npiperelay = pkgs.callPackage ./npiperelay {}; npiperelay = pkgs.callPackage ./npiperelay {};
beets-originquery = pkgs.callPackage ./beets-originquery {}; beets-originquery = pkgs.callPackage ./beets-originquery {};
beets-bpmanalyser = pkgs.callPackage ./beets-bpmanalyser {}; beets-bpmanalyser = pkgs.callPackage ./beets-bpmanalyser {};
prometheus-api-client = pkgs.callPackage ./prometheus-api-client {}; prometheus-api-client = pkgs.callPackage ./prometheus-api-client {
python = pkgs.python3;
};
} }

View File

@@ -1,20 +1,21 @@
{ { lib
python3Packages, , fetchurl
fetchurl, , python
lib,
}: }:
with python3Packages;
buildPythonPackage rec { python.pkgs.buildPythonPackage rec {
pname = "prometheus-api-client"; pname = "prometheus-api-client";
version = "0.5.4"; version = "0.5.4";
src = fetchurl { src = fetchurl {
url = "https://pypi.org/packages/source/p/prometheus-api-client/prometheus-api-client-0.5.4.tar.gz"; url = "https://pypi.org/packages/source/p/prometheus-api-client/prometheus-api-client-0.5.4.tar.gz";
sha256 = "sha256-OFaBB+GCqibyJZn3lCFeo93l7NPvFJRO72FO6qRsm2o="; sha256 = "sha256-OFaBB+GCqibyJZn3lCFeo93l7NPvFJRO72FO6qRsm2o=";
}; };
doCheck = false; doCheck = false;
pythonImportsCheck = ["prometheus_api_client"]; pythonImportsCheck = [ "prometheus_api_client" ];
propagatedBuildInputs = [
propagatedBuildInputs = with python.pkgs; [
matplotlib matplotlib
numpy numpy
pandas pandas
@@ -24,8 +25,8 @@ with python3Packages;
]; ];
meta = with lib; { meta = with lib; {
description = "A python wrapper for the prometheus http api"; description = "A Python wrapper for the Prometheus HTTP API";
homepage = "https://github.com/4n4nd/prometheus-api-client-python"; homepage = "https://github.com/4n4nd/prometheus-api-client-python";
licence = licences.mit; license = licenses.mit;
}; };
} }