mirror of
https://github.com/sstent/vmimages.git
synced 2025-12-06 06:01:51 +00:00
sync
This commit is contained in:
18
flake.nix
18
flake.nix
@@ -72,8 +72,9 @@
|
||||
config.allowUnfree = true; # forgive me Stallman senpai
|
||||
overlays = extraOverlays ++ (lib.attrValues self.overlays);
|
||||
};
|
||||
pkgs = mkPkgs nixpkgs [self.overlay];
|
||||
pkgs' = mkPkgs nixpkgs-unstable [];
|
||||
# pkgs = mkPkgs nixpkgs [self.overlay];
|
||||
pkgs = mkPkgs nixpkgs [];
|
||||
# pkgs' = mkPkgs nixpkgs-unstable [];
|
||||
|
||||
lib =
|
||||
nixpkgs.lib.extend
|
||||
@@ -87,18 +88,17 @@
|
||||
// home-manager.lib);
|
||||
in {
|
||||
lib = lib.my;
|
||||
packages."${system}" =
|
||||
mapModules ./pkgs (p: pkgs.callPackage p {});
|
||||
packages."${system}" = mapModules ./pkgs (p: pkgs.callPackage p {});
|
||||
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra;
|
||||
|
||||
devShell."${system}" =
|
||||
import ./shell.nix {inherit pkgs;};
|
||||
|
||||
overlay = final: prev: {
|
||||
unstable = pkgs';
|
||||
my = self.packages."${system}";
|
||||
keybase = pkgs'.keybase;
|
||||
};
|
||||
# overlay = final: prev: {
|
||||
# unstable = pkgs';
|
||||
# my = self.packages."${system}";
|
||||
# keybase = pkgs'.keybase;
|
||||
# };
|
||||
|
||||
overlays = import ./overlays {inherit inputs;};
|
||||
|
||||
|
||||
@@ -31,11 +31,9 @@
|
||||
# home.file."/home/sstent/justfile".source = ./justfile;
|
||||
home.file."/home/sstent/justfile".source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/vmimages/dotfiles/${config.home.username}/justfile";
|
||||
home.file."/home/sstent/.config/bash-completions/nomad_.bash".source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/vmimages/dotfiles/${config.home.username}/nomad_.bash";
|
||||
|
||||
|
||||
# home.file."/home/sstent/.config/beets/test".source = config.lib.file.mkOutOfStoreSymlink /run/user/1000/secrets/test;
|
||||
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
home.packages = with pkgs; [
|
||||
@@ -65,7 +63,8 @@
|
||||
# deploy-rs
|
||||
gnumake
|
||||
unstable.keybase
|
||||
];
|
||||
# my.prometheus-api-client
|
||||
];
|
||||
|
||||
custom = {
|
||||
ssh-proxy.enable = false;
|
||||
@@ -107,7 +106,7 @@
|
||||
export LANG=C
|
||||
|
||||
|
||||
for command in $({ just --summary; just -l | grep "# alias for " | awk "{print \$1}"; } | tr " " "\\n" | sed "/^default\$/d" | xargs);
|
||||
for command in $({ just --summary; just -l | grep "# alias for " | awk "{print \$1}"; } | tr " " "\\n" | sed "/^default\$/d" | xargs);
|
||||
do
|
||||
alias $command="just $command"
|
||||
done
|
||||
@@ -124,9 +123,9 @@
|
||||
ssh = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
StrictHostKeyChecking no
|
||||
UpdateHostKeys yes
|
||||
identityFile = "~/.ssh/id_rsa"
|
||||
StrictHostKeyChecking no
|
||||
UpdateHostKeys yes
|
||||
identityFile = "~/.ssh/id_rsa"
|
||||
'';
|
||||
matchBlocks = {
|
||||
# "*" = {
|
||||
@@ -145,7 +144,7 @@
|
||||
};
|
||||
};
|
||||
##pr2100
|
||||
"192.168.1.109" = {
|
||||
"192.168.1.109" = {
|
||||
user = "sshd";
|
||||
extraOptions = {
|
||||
StrictHostKeyChecking = "no";
|
||||
@@ -154,7 +153,7 @@
|
||||
};
|
||||
};
|
||||
##USG
|
||||
"192.168.1.1" = {
|
||||
"192.168.1.1" = {
|
||||
user = "fbleagh";
|
||||
extraOptions = {
|
||||
StrictHostKeyChecking = "no";
|
||||
@@ -162,7 +161,7 @@
|
||||
PubkeyAcceptedKeyTypes = "+ssh-rsa"; ##needed to allow the USG to login with ssh key
|
||||
};
|
||||
};
|
||||
"router" = {
|
||||
"router" = {
|
||||
user = "fbleagh";
|
||||
extraOptions = {
|
||||
StrictHostKeyChecking = "no";
|
||||
|
||||
@@ -5,5 +5,4 @@ pkgs.python3.withPackages (p:
|
||||
setuptools # setup.py
|
||||
paramiko # ssh library
|
||||
prometheus-api-client
|
||||
|
||||
])
|
||||
|
||||
@@ -1,26 +1,33 @@
|
||||
|
||||
{ lib, inputs, outputs, pkgs, config, ... }:
|
||||
# Define qemu-arm-static source.
|
||||
let qemu-arm-static = pkgs.stdenv.mkDerivation {
|
||||
name = "qemu-arm-static";
|
||||
src = builtins.fetchurl {
|
||||
url = "https://github.com/multiarch/qemu-user-static/releases/download/v6.1.0-8/qemu-arm-static";
|
||||
sha256 = "06344d77d4f08b3e1b26ff440cb115179c63ca8047afb978602d7922a51231e3";
|
||||
};
|
||||
dontUnpack = true;
|
||||
installPhase = "install -D -m 0755 $src $out/bin/qemu-arm-static";
|
||||
};
|
||||
in {
|
||||
# Enable binfmt emulation of extra binary formats (armv7l-linux, for exmaple).
|
||||
boot.binfmt.registrations.arm = {
|
||||
interpreter = "${qemu-arm-static}/bin/qemu-arm-static";
|
||||
magicOrExtension = ''\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00'';
|
||||
mask = ''\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\x00\xff\xfe\xff\xff\xff'';
|
||||
};
|
||||
|
||||
# Define additional settings for nix.
|
||||
nix.extraOptions = ''
|
||||
extra-platforms = armv7l-linux aarch64-linux
|
||||
'';
|
||||
nix.settings.extra-sandbox-paths = [ "/run/binfmt/arm=${qemu-arm-static}/bin/qemu-arm-static" ];
|
||||
}
|
||||
{
|
||||
lib,
|
||||
inputs,
|
||||
outputs,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
# Define qemu-arm-static source.
|
||||
let
|
||||
qemu-arm-static = pkgs.stdenv.mkDerivation {
|
||||
name = "qemu-arm-static";
|
||||
src = builtins.fetchurl {
|
||||
url = "https://github.com/multiarch/qemu-user-static/releases/download/v6.1.0-8/qemu-arm-static";
|
||||
sha256 = "06344d77d4f08b3e1b26ff440cb115179c63ca8047afb978602d7922a51231e3";
|
||||
};
|
||||
dontUnpack = true;
|
||||
installPhase = "install -D -m 0755 $src $out/bin/qemu-arm-static";
|
||||
};
|
||||
in {
|
||||
# Enable binfmt emulation of extra binary formats (armv7l-linux, for exmaple).
|
||||
boot.binfmt.registrations.arm = {
|
||||
interpreter = "${qemu-arm-static}/bin/qemu-arm-static";
|
||||
magicOrExtension = ''\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00'';
|
||||
mask = ''\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\x00\xff\xfe\xff\xff\xff'';
|
||||
};
|
||||
|
||||
# Define additional settings for nix.
|
||||
nix.extraOptions = ''
|
||||
extra-platforms = armv7l-linux aarch64-linux
|
||||
'';
|
||||
nix.settings.extra-sandbox-paths = ["/run/binfmt/arm=${qemu-arm-static}/bin/qemu-arm-static"];
|
||||
}
|
||||
|
||||
202
hosts/common.nix
202
hosts/common.nix
@@ -1,101 +1,101 @@
|
||||
# This file (and the global directory) holds config that i use on all hosts
|
||||
{
|
||||
lib,
|
||||
inputs,
|
||||
outputs,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
imports =
|
||||
[
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
]
|
||||
++ (builtins.attrValues outputs.nixosModules);
|
||||
|
||||
###dotfiles path variable
|
||||
options._dotfiles = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "${inputs.self}/home-manager/dotfiles";
|
||||
description = "Path to the dotfiles in this repository";
|
||||
};
|
||||
|
||||
###secrets path variable
|
||||
options._secrets = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "/run/user/1000/secrets";
|
||||
description = "Path to the Secrets runtime";
|
||||
};
|
||||
|
||||
###secretstore path variable
|
||||
options._secretstore = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "${inputs.self}/secrets";
|
||||
description = "Path to the Secrets storage";
|
||||
};
|
||||
|
||||
config = {
|
||||
system.stateVersion = "23.05";
|
||||
|
||||
sops = {
|
||||
defaultSopsFile = "${config._secretstore}/host-secrets.yaml";
|
||||
age.sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"];
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
useUserPackages = true;
|
||||
extraSpecialArgs = {inherit inputs outputs;};
|
||||
sharedModules = [
|
||||
inputs.sops-nix.homeManagerModules.sops
|
||||
];
|
||||
};
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
programs.fuse.userAllowOther = true;
|
||||
security.sudo.wheelNeedsPassword = false;
|
||||
virtualisation.docker.enable = true;
|
||||
|
||||
# nixpkgs.overlays = overlays;
|
||||
# Enable nix flakes
|
||||
nix.package = pkgs.nixFlakes;
|
||||
nix.extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
nix.nixPath = ["nixpkgs=${inputs.nixpkgs}"];
|
||||
# nix.nixPath = [ "nixpkgs=pkgs.outPath" ];
|
||||
networking.search = ["node.dc1.consul" "service.dc1.consul"];
|
||||
networking.nameservers = ["192.168.1.1" "1.1.1.1"];
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_US.UTF-8";
|
||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||
LC_MEASUREMENT = "en_US.UTF-8";
|
||||
LC_MONETARY = "en_US.UTF-8";
|
||||
LC_NAME = "en_US.UTF-8";
|
||||
LC_PAPER = "en_US.UTF-8";
|
||||
LC_TELEPHONE = "en_US.UTF-8";
|
||||
};
|
||||
|
||||
#services.envfs.enable = true;
|
||||
environment.systemPackages = [
|
||||
pkgs.git
|
||||
pkgs.home-manager
|
||||
pkgs.sops
|
||||
pkgs.ssh-to-age
|
||||
pkgs.age
|
||||
pkgs.bitwarden-cli
|
||||
];
|
||||
|
||||
nix.gc = {
|
||||
automatic = true; # Enable the automatic garbage collector
|
||||
dates = "03:15"; # When to run the garbage collector
|
||||
options = "-d"; # Arguments to pass to nix-collect-garbage
|
||||
};
|
||||
};
|
||||
}
|
||||
# This file (and the global directory) holds config that i use on all hosts
|
||||
{
|
||||
lib,
|
||||
inputs,
|
||||
outputs,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
imports =
|
||||
[
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
]
|
||||
++ (builtins.attrValues outputs.nixosModules);
|
||||
|
||||
###dotfiles path variable
|
||||
options._dotfiles = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "${inputs.self}/home-manager/dotfiles";
|
||||
description = "Path to the dotfiles in this repository";
|
||||
};
|
||||
|
||||
###secrets path variable
|
||||
options._secrets = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "/run/user/1000/secrets";
|
||||
description = "Path to the Secrets runtime";
|
||||
};
|
||||
|
||||
###secretstore path variable
|
||||
options._secretstore = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "${inputs.self}/secrets";
|
||||
description = "Path to the Secrets storage";
|
||||
};
|
||||
|
||||
config = {
|
||||
system.stateVersion = "23.05";
|
||||
|
||||
sops = {
|
||||
defaultSopsFile = "${config._secretstore}/host-secrets.yaml";
|
||||
age.sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"];
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
useUserPackages = true;
|
||||
extraSpecialArgs = {inherit inputs outputs;};
|
||||
sharedModules = [
|
||||
inputs.sops-nix.homeManagerModules.sops
|
||||
];
|
||||
};
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
programs.fuse.userAllowOther = true;
|
||||
security.sudo.wheelNeedsPassword = false;
|
||||
virtualisation.docker.enable = true;
|
||||
|
||||
# nixpkgs.overlays = overlays;
|
||||
# Enable nix flakes
|
||||
nix.package = pkgs.nixFlakes;
|
||||
nix.extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
nix.nixPath = ["nixpkgs=${inputs.nixpkgs}"];
|
||||
# nix.nixPath = [ "nixpkgs=pkgs.outPath" ];
|
||||
networking.search = ["node.dc1.consul" "service.dc1.consul"];
|
||||
networking.nameservers = ["192.168.1.1" "1.1.1.1"];
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_US.UTF-8";
|
||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||
LC_MEASUREMENT = "en_US.UTF-8";
|
||||
LC_MONETARY = "en_US.UTF-8";
|
||||
LC_NAME = "en_US.UTF-8";
|
||||
LC_PAPER = "en_US.UTF-8";
|
||||
LC_TELEPHONE = "en_US.UTF-8";
|
||||
};
|
||||
|
||||
#services.envfs.enable = true;
|
||||
environment.systemPackages = [
|
||||
pkgs.git
|
||||
pkgs.home-manager
|
||||
pkgs.sops
|
||||
pkgs.ssh-to-age
|
||||
pkgs.age
|
||||
pkgs.bitwarden-cli
|
||||
];
|
||||
|
||||
nix.gc = {
|
||||
automatic = true; # Enable the automatic garbage collector
|
||||
dates = "03:15"; # When to run the garbage collector
|
||||
options = "-d"; # Arguments to pass to nix-collect-garbage
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -18,7 +18,6 @@ in {
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = [
|
||||
pkgs.ffmpeg # for replaygain
|
||||
|
||||
];
|
||||
|
||||
sops = {
|
||||
@@ -29,7 +28,14 @@ in {
|
||||
|
||||
programs.beets = {
|
||||
enable = true;
|
||||
package = (pkgs.beets.override { pluginOverrides = { originquery = {enable = true; propagatedBuildInputs = [ pkgs.beets-originquery ]; }; };});
|
||||
package = pkgs.beets.override {
|
||||
pluginOverrides = {
|
||||
originquery = {
|
||||
enable = true;
|
||||
propagatedBuildInputs = [pkgs.beets-originquery];
|
||||
};
|
||||
};
|
||||
};
|
||||
settings = {
|
||||
album_fields = {
|
||||
artist_grouping = ''
|
||||
@@ -131,25 +137,24 @@ in {
|
||||
format_item = "$albumartist - $album [$albumtype]$atype: $track/$tracktotal $title";
|
||||
};
|
||||
musicbrainz = {
|
||||
extra_tags= ["year" "catalognum" "country" "media" "label"];
|
||||
extra_tags = ["year" "catalognum" "country" "media" "label"];
|
||||
pass = "7ANCLPczDNFn6Sf65vdZ";
|
||||
user = "shapechecker";
|
||||
};
|
||||
original_date = true;
|
||||
originquery = {
|
||||
origin_file = "origin.yaml";
|
||||
originquery = {
|
||||
origin_file = "origin.yaml";
|
||||
|
||||
tag_patterns = {
|
||||
media = ''$.Media'';
|
||||
year = ''$."Edition year"'';
|
||||
label = ''$."Record label"'';
|
||||
catalognum = ''$."Catalog number"'';
|
||||
albumdisambig = ''$.Edition'';
|
||||
};
|
||||
|
||||
use_origin_on_conflict = true;
|
||||
};
|
||||
tag_patterns = {
|
||||
media = ''$.Media'';
|
||||
year = ''$."Edition year"'';
|
||||
label = ''$."Record label"'';
|
||||
catalognum = ''$."Catalog number"'';
|
||||
albumdisambig = ''$.Edition'';
|
||||
};
|
||||
|
||||
use_origin_on_conflict = true;
|
||||
};
|
||||
|
||||
paths = {
|
||||
"albumtype:soundtrack" = "Soundtracks/$albumartist - $album%aunique{} ($year)/$myDisc$track - $artist - $title";
|
||||
|
||||
@@ -18,17 +18,17 @@ in {
|
||||
wsl.extraBin = [
|
||||
# Required by VS Code's Remote WSL extension
|
||||
# Required by VS Code's Remote WSL extension
|
||||
{ src = "${pkgs.coreutils}/bin/dirname"; }
|
||||
{ src = "${pkgs.coreutils}/bin/readlink"; }
|
||||
{ src = "${pkgs.coreutils}/bin/uname"; }
|
||||
{ src = "${pkgs.coreutils}/bin/mkdir"; }
|
||||
{ src = "${pkgs.coreutils}/bin/rm"; }
|
||||
{ src = "${pkgs.coreutils}/bin/wc"; }
|
||||
{ src = "${pkgs.coreutils}/bin/date"; }
|
||||
{ src = "${pkgs.coreutils}/bin/mv"; }
|
||||
{ src = "${pkgs.coreutils}/bin/sleep"; }
|
||||
{ src = "${pkgs.gnutar}/bin/tar"; }
|
||||
{ src = "${pkgs.gzip}/bin/gzip"; }
|
||||
{src = "${pkgs.coreutils}/bin/dirname";}
|
||||
{src = "${pkgs.coreutils}/bin/readlink";}
|
||||
{src = "${pkgs.coreutils}/bin/uname";}
|
||||
{src = "${pkgs.coreutils}/bin/mkdir";}
|
||||
{src = "${pkgs.coreutils}/bin/rm";}
|
||||
{src = "${pkgs.coreutils}/bin/wc";}
|
||||
{src = "${pkgs.coreutils}/bin/date";}
|
||||
{src = "${pkgs.coreutils}/bin/mv";}
|
||||
{src = "${pkgs.coreutils}/bin/sleep";}
|
||||
{src = "${pkgs.gnutar}/bin/tar";}
|
||||
{src = "${pkgs.gzip}/bin/gzip";}
|
||||
];
|
||||
programs.nix-ld = {
|
||||
enable = true;
|
||||
|
||||
@@ -1,31 +1,28 @@
|
||||
# This file defines overlays
|
||||
# ex
|
||||
{inputs, ...}: {
|
||||
# This one brings our custom packages from the 'pkgs' directory
|
||||
## this overrides the 'my.' strcuture
|
||||
additions = final: _prev: import ../pkgs {pkgs = final;};
|
||||
|
||||
# This one contains whatever you want to overlay
|
||||
# You can change versions, add patches, set compilation flags, anything really.
|
||||
# https://nixos.wiki/wiki/Overlays
|
||||
modifications = final: prev: {
|
||||
# example = prev.example.overrideAttrs (oldAttrs: rec {
|
||||
# ...
|
||||
# });
|
||||
|
||||
pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [
|
||||
(
|
||||
python-final: python-prev:
|
||||
{
|
||||
prometheus-api-client = python-final.callPackage ../pkgs/python/prometheus-api-client { };
|
||||
}
|
||||
)
|
||||
];
|
||||
|
||||
|
||||
|
||||
pythonPackagesExtensions =
|
||||
prev.pythonPackagesExtensions
|
||||
++ [
|
||||
(
|
||||
python-final: python-prev: {
|
||||
prometheus-api-client = python-final.callPackage ../pkgs/prometheus-api-client {};
|
||||
}
|
||||
)
|
||||
];
|
||||
keybase = final.unstable.keybase;
|
||||
};
|
||||
|
||||
# When applied, the unstable nixpkgs set (declared in the flake inputs) will
|
||||
# be accessible through 'pkgs.unstable'
|
||||
#When applied, the unstable nixpkgs set (declared in the flake inputs) will
|
||||
#be accessible through 'pkgs.unstable'
|
||||
unstable-packages = final: _prev: {
|
||||
unstable = import inputs.nixpkgs-unstable {
|
||||
system = final.system;
|
||||
|
||||
@@ -1,35 +1,35 @@
|
||||
{ python3Packages
|
||||
, fetchFromGitHub
|
||||
, beets
|
||||
, lib
|
||||
}:
|
||||
|
||||
with python3Packages;
|
||||
buildPythonPackage rec {
|
||||
pname = "beets-originquery";
|
||||
version = "unstable-2022-03-11";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "x1ppy";
|
||||
repo = "beets-originquery";
|
||||
rev = "c353e2b68804cb4dabca0f0f177cee1137888ca4";
|
||||
hash = "sha256-vNROKZgCoWtoou9B8hpJwl4Yf6TzQU0TbKJUd94v7vk=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
beets
|
||||
setuptools-scm
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [ jsonpath_rw ];
|
||||
|
||||
# There's no test
|
||||
doCheck = false;
|
||||
|
||||
pythonImportsCheck = [ "beetsplug.originquery" ];
|
||||
|
||||
meta = {
|
||||
description = "Plugin for beets that improves album matching";
|
||||
homepage = "https://github.com/x1ppy/beets-originquery";
|
||||
};
|
||||
}
|
||||
{
|
||||
python3Packages,
|
||||
fetchFromGitHub,
|
||||
beets,
|
||||
lib,
|
||||
}:
|
||||
with python3Packages;
|
||||
buildPythonPackage rec {
|
||||
pname = "beets-originquery";
|
||||
version = "unstable-2022-03-11";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "x1ppy";
|
||||
repo = "beets-originquery";
|
||||
rev = "c353e2b68804cb4dabca0f0f177cee1137888ca4";
|
||||
hash = "sha256-vNROKZgCoWtoou9B8hpJwl4Yf6TzQU0TbKJUd94v7vk=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
beets
|
||||
setuptools-scm
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [jsonpath_rw];
|
||||
|
||||
# There's no test
|
||||
doCheck = false;
|
||||
|
||||
pythonImportsCheck = ["beetsplug.originquery"];
|
||||
|
||||
meta = {
|
||||
description = "Plugin for beets that improves album matching";
|
||||
homepage = "https://github.com/x1ppy/beets-originquery";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -4,4 +4,5 @@
|
||||
# example = pkgs.callPackage ./example { };
|
||||
npiperelay = pkgs.callPackage ./npiperelay {};
|
||||
beets-originquery = pkgs.callPackage ./beets-originquery {};
|
||||
prometheus-api-client = pkgs.callPackage ./prometheus-api-client {};
|
||||
}
|
||||
|
||||
31
pkgs/prometheus-api-client/default.nix
Normal file
31
pkgs/prometheus-api-client/default.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
python3Packages,
|
||||
fetchurl,
|
||||
lib,
|
||||
}:
|
||||
with python3Packages;
|
||||
buildPythonPackage rec {
|
||||
pname = "prometheus-api-client";
|
||||
version = "0.5.4";
|
||||
src = fetchurl {
|
||||
url = "https://pypi.org/packages/source/p/prometheus-api-client/prometheus-api-client-0.5.4.tar.gz";
|
||||
sha256 = "sha256-OFaBB+GCqibyJZn3lCFeo93l7NPvFJRO72FO6qRsm2o=";
|
||||
};
|
||||
|
||||
doCheck = false;
|
||||
pythonImportsCheck = ["prometheus_api_client"];
|
||||
propagatedBuildInputs = [
|
||||
matplotlib
|
||||
numpy
|
||||
pandas
|
||||
requests
|
||||
dateparser
|
||||
httmock
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A python wrapper for the prometheus http api";
|
||||
homepage = "https://github.com/4n4nd/prometheus-api-client-python";
|
||||
licence = licences.mit;
|
||||
};
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
{ lib, python3, pkgs, callPackage, fetchurl,python3Packages, ... }:
|
||||
|
||||
let
|
||||
pname = "prometheus-api-client";
|
||||
version = "0.5.4";
|
||||
src = fetchurl {
|
||||
url = "https://pypi.org/packages/source/p/prometheus-api-client/prometheus-api-client-0.5.4.tar.gz";
|
||||
sha256 = "sha256-OFaBB+GCqibyJZn3lCFeo93l7NPvFJRO72FO6qRsm2o=";
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
python3.pkgs.buildPythonPackage {
|
||||
pname = pname;
|
||||
version = version;
|
||||
src = src;
|
||||
|
||||
|
||||
doCheck = false;
|
||||
|
||||
propagatedBuildInputs = with pkgs.python3Packages; [
|
||||
matplotlib
|
||||
numpy
|
||||
pandas
|
||||
requests
|
||||
dateparser
|
||||
httmock
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A python wrapper for the prometheus http api";
|
||||
homepage = "https://github.com/4n4nd/prometheus-api-client-python";
|
||||
licence = licences.mit;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user