This commit is contained in:
2024-01-24 22:36:34 +00:00
parent d2150a7470
commit 8c279674b0
12 changed files with 264 additions and 260 deletions

View File

@@ -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;};

View File

@@ -32,10 +32,8 @@
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,6 +63,7 @@
# deploy-rs
gnumake
unstable.keybase
# my.prometheus-api-client
];
custom = {

View File

@@ -5,5 +5,4 @@ pkgs.python3.withPackages (p:
setuptools # setup.py
paramiko # ssh library
prometheus-api-client
])

View File

@@ -1,7 +1,14 @@
{ lib, inputs, outputs, pkgs, config, ... }:
{
lib,
inputs,
outputs,
pkgs,
config,
...
}:
# Define qemu-arm-static source.
let qemu-arm-static = pkgs.stdenv.mkDerivation {
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";

View File

@@ -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 = ''
@@ -150,7 +156,6 @@ in {
use_origin_on_conflict = true;
};
paths = {
"albumtype:soundtrack" = "Soundtracks/$albumartist - $album%aunique{} ($year)/$myDisc$track - $artist - $title";
comp = "Compilations/$albumartist/($year) $album%aunique{}/$myDisc$track - $artist - $title";

View File

@@ -1,27 +1,24 @@
# 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 ++ [
pythonPackagesExtensions =
prev.pythonPackagesExtensions
++ [
(
python-final: python-prev:
{
prometheus-api-client = python-final.callPackage ../pkgs/python/prometheus-api-client { };
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

View File

@@ -1,9 +1,9 @@
{ python3Packages
, fetchFromGitHub
, beets
, lib
{
python3Packages,
fetchFromGitHub,
beets,
lib,
}:
with python3Packages;
buildPythonPackage rec {
pname = "beets-originquery";

View File

@@ -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 {};
}

View 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;
};
}

View File

@@ -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;
};
}