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 config.allowUnfree = true; # forgive me Stallman senpai
overlays = extraOverlays ++ (lib.attrValues self.overlays); overlays = extraOverlays ++ (lib.attrValues self.overlays);
}; };
pkgs = mkPkgs nixpkgs [self.overlay]; # pkgs = mkPkgs nixpkgs [self.overlay];
pkgs' = mkPkgs nixpkgs-unstable []; pkgs = mkPkgs nixpkgs [];
# pkgs' = mkPkgs nixpkgs-unstable [];
lib = lib =
nixpkgs.lib.extend nixpkgs.lib.extend
@@ -87,18 +88,17 @@
// home-manager.lib); // home-manager.lib);
in { in {
lib = lib.my; lib = lib.my;
packages."${system}" = packages."${system}" = mapModules ./pkgs (p: pkgs.callPackage p {});
mapModules ./pkgs (p: pkgs.callPackage p {});
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra; formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra;
devShell."${system}" = devShell."${system}" =
import ./shell.nix {inherit pkgs;}; import ./shell.nix {inherit pkgs;};
overlay = final: prev: { # overlay = final: prev: {
unstable = pkgs'; # unstable = pkgs';
my = self.packages."${system}"; # my = self.packages."${system}";
keybase = pkgs'.keybase; # keybase = pkgs'.keybase;
}; # };
overlays = import ./overlays {inherit inputs;}; 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/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/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; # home.file."/home/sstent/.config/beets/test".source = config.lib.file.mkOutOfStoreSymlink /run/user/1000/secrets/test;
# Let Home Manager install and manage itself. # Let Home Manager install and manage itself.
programs.home-manager.enable = true; programs.home-manager.enable = true;
home.packages = with pkgs; [ home.packages = with pkgs; [
@@ -65,6 +63,7 @@
# deploy-rs # deploy-rs
gnumake gnumake
unstable.keybase unstable.keybase
# my.prometheus-api-client
]; ];
custom = { custom = {

View File

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

View File

@@ -1,7 +1,14 @@
{
{ lib, inputs, outputs, pkgs, config, ... }: lib,
inputs,
outputs,
pkgs,
config,
...
}:
# Define qemu-arm-static source. # Define qemu-arm-static source.
let qemu-arm-static = pkgs.stdenv.mkDerivation { let
qemu-arm-static = pkgs.stdenv.mkDerivation {
name = "qemu-arm-static"; name = "qemu-arm-static";
src = builtins.fetchurl { src = builtins.fetchurl {
url = "https://github.com/multiarch/qemu-user-static/releases/download/v6.1.0-8/qemu-arm-static"; 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 { config = mkIf cfg.enable {
home.packages = [ home.packages = [
pkgs.ffmpeg # for replaygain pkgs.ffmpeg # for replaygain
]; ];
sops = { sops = {
@@ -29,7 +28,14 @@ in {
programs.beets = { programs.beets = {
enable = true; 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 = { settings = {
album_fields = { album_fields = {
artist_grouping = '' artist_grouping = ''
@@ -150,7 +156,6 @@ in {
use_origin_on_conflict = true; use_origin_on_conflict = true;
}; };
paths = { paths = {
"albumtype:soundtrack" = "Soundtracks/$albumartist - $album%aunique{} ($year)/$myDisc$track - $artist - $title"; "albumtype:soundtrack" = "Soundtracks/$albumartist - $album%aunique{} ($year)/$myDisc$track - $artist - $title";
comp = "Compilations/$albumartist/($year) $album%aunique{}/$myDisc$track - $artist - $title"; comp = "Compilations/$albumartist/($year) $album%aunique{}/$myDisc$track - $artist - $title";

View File

@@ -1,27 +1,24 @@
# This file defines overlays # This file defines overlays
# ex
{inputs, ...}: { {inputs, ...}: {
# This one brings our custom packages from the 'pkgs' directory # This one brings our custom packages from the 'pkgs' directory
## this overrides the 'my.' strcuture
additions = final: _prev: import ../pkgs {pkgs = final;}; additions = final: _prev: import ../pkgs {pkgs = final;};
# This one contains whatever you want to overlay # This one contains whatever you want to overlay
# You can change versions, add patches, set compilation flags, anything really. # You can change versions, add patches, set compilation flags, anything really.
# https://nixos.wiki/wiki/Overlays # https://nixos.wiki/wiki/Overlays
modifications = final: prev: { modifications = final: prev: {
# example = prev.example.overrideAttrs (oldAttrs: rec { pythonPackagesExtensions =
# ... prev.pythonPackagesExtensions
# }); ++ [
pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [
( (
python-final: python-prev: python-final: python-prev: {
{ prometheus-api-client = python-final.callPackage ../pkgs/prometheus-api-client {};
prometheus-api-client = python-final.callPackage ../pkgs/python/prometheus-api-client { };
} }
) )
]; ];
keybase = final.unstable.keybase;
}; };
#When applied, the unstable nixpkgs set (declared in the flake inputs) will #When applied, the unstable nixpkgs set (declared in the flake inputs) will

View File

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

View File

@@ -4,4 +4,5 @@
# example = pkgs.callPackage ./example { }; # example = pkgs.callPackage ./example { };
npiperelay = pkgs.callPackage ./npiperelay {}; npiperelay = pkgs.callPackage ./npiperelay {};
beets-originquery = pkgs.callPackage ./beets-originquery {}; 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;
};
}