nix: rework flake input

This commit is contained in:
Primrose 2024-08-02 02:46:55 +02:00
parent 16cbf92ec3
commit f5755d11a3
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA
11 changed files with 128 additions and 132 deletions

View file

@ -1,13 +1,13 @@
{ pkgs, ... }:
let
inherit (pkgs) myPkgs ghc-pin;
inherit (pkgs) myPkgs;
in
{
imports = [ ./fonts.nix ];
home.packages = [
ghc-pin.ghc
ghc-pin.haskell-language-server
pkgs.qmk
pkgs.wally-cli

View file

@ -137,7 +137,8 @@ in
addons.sponsorblock
addons.tridactyl
addons.languagetool
addons.bypass-paywalls-clean
# flaky, find a better source to be fetched
# addons.bypass-paywalls-clean
addons.news-feed-eradicator
];
};

View file

@ -1,7 +1,14 @@
{ pkgs, ... }:
let
inherit (pkgs) myPkgs wired;
inherit (pkgs) myPkgs;
wired = pkgs.fetchFromGitHub {
owner = "Toqozz";
repo = "wired-notify";
rev = "0.10.6";
hash = "sha256-AWIV/+vVwDZECZ4lFMSFyuyUKJc/gb72PiBJv6lbhnc=";
};
in
{

View file

@ -4,21 +4,18 @@
lib,
...
}:
let
inherit (pkgs) ghc-pin myPkgs;
inherit (pkgs) myPkgs;
in
{
home = {
username = "ychiang";
homeDirectory = "/udd/ychiang";
};
home.packages = [
ghc-pin.ghc
ghc-pin.cabal-install
ghc-pin.haskell-language-server
myPkgs.necrolib
];
home.packages = [ myPkgs.necrolib ];
home.file."hiosevka-font" = {
source = "${myPkgs.hiosevka-nerd-font-mono}/share/fonts/truetype";

View file

@ -4,15 +4,14 @@
flake.lib.mkNerdFont = ./mkNerdFont.nix;
perSystem =
{ pkgs, lib, ... }:
{ pkgs-stable, lib, ... }:
let
inherit (pkgs) alt-ergo-pin;
mkNerdFont = pkgs.callPackage self.lib.mkNerdFont { };
mkNerdFont = pkgs-stable.callPackage self.lib.mkNerdFont { };
in
{
# Export my package set
packages = rec {
hiosevka = pkgs.callPackage ./hiosevka { };
hiosevka = pkgs-stable.callPackage ./hiosevka { };
hiosevka-nerd-font-mono = mkNerdFont {
font = hiosevka;
extraArgs = [
@ -27,18 +26,18 @@
"--variable-width-glyphs"
];
};
altiosevka = pkgs.callPackage ./altiosevka { };
altiosevka = pkgs-stable.callPackage ./altiosevka { };
logisim-evolution = pkgs.callPackage ./logisim-evolution.nix { };
necrolib = pkgs.callPackage ./necrolib.nix { };
why3 = pkgs.callPackage ./why3.nix { inherit (alt-ergo-pin) alt-ergo; };
logisim-evolution = pkgs-stable.callPackage ./logisim-evolution.nix { };
necrolib = pkgs-stable.callPackage ./necrolib.nix { };
why3 = pkgs-stable.callPackage ./why3.nix { };
dl-librescore = pkgs.callPackage ./dl-librescore.nix { };
fish-lsp = pkgs.callPackage ./fish-lsp { };
maeel = pkgs.callPackage ./maeel.nix { };
tokei = pkgs.callPackage ./tokei { }; # alpha tokei with typst, skel, hledger
dl-librescore = pkgs-stable.callPackage ./dl-librescore.nix { };
fish-lsp = pkgs-stable.callPackage ./fish-lsp { };
maeel = pkgs-stable.callPackage ./maeel.nix { };
tokei = pkgs-stable.callPackage ./tokei { }; # alpha tokei with typst, skel, hledger
posy-cursor = pkgs.callPackage ./posy-cursor.nix { };
posy-cursor = pkgs-stable.callPackage ./posy-cursor.nix { };
};
};
}

View file

@ -2,9 +2,11 @@
symlinkJoin,
makeWrapper,
why3,
alt-ergo,
cvc4,
z3_4_12,
fetchFromGitHub,
system,
}:
let
provers = [
@ -12,6 +14,22 @@ let
cvc4
z3_4_12
];
inherit
(import
(fetchFromGitHub {
owner = "NixOS";
repo = "nixpkgs";
rev = "1b95daa381fa4a0963217a5d386433c20008208a";
hash = "sha256-vwEtkxIEQjymeTk89Ty1MGfRVSWL1/3j1wt5xB5ua88=";
})
{
inherit system;
config.allowUnfree = true;
}
)
alt-ergo
;
in
symlinkJoin {
name = "why3";

View file

@ -9,41 +9,36 @@
...
}:
{
_module.args.pkgs = import inputs.nixpkgs {
inherit system;
overlays = [
(_: _: {
agenix = inputs'.agenix.packages.default;
audio-lint = inputs'.audio-lint.packages.default;
})
_module.args =
let
overlays = [
(_: _: {
agenix = inputs'.agenix.packages.default;
audio-lint = inputs'.audio-lint.packages.default;
})
(final: _: {
wired = final.fetchFromGitHub {
owner = "Toqozz";
repo = "wired-notify";
rev = "0.10.6";
hash = "sha256-AWIV/+vVwDZECZ4lFMSFyuyUKJc/gb72PiBJv6lbhnc=";
};
})
inputs.nur.overlay
(final: _: {
nur = import inputs.nur {
nurpkgs = final;
pkgs = final;
};
})
(_: _: { myPkgs = self'.packages; }) # extend pkgs with my custom set
(import ./pins.nix)
(import ./patches.nix)
];
config.allowUnfreePredicate =
pkg:
builtins.elem (inputs.nixpkgs.lib.getName pkg) [
"discord"
"languagetool"
(_: _: { myPkgs = self'.packages; }) # extend pkgs with my custom set
];
};
in
{
pkgs-stable = import inputs.nixpkgs-stable {
inherit system;
inherit overlays;
};
pkgs = import inputs.nixpkgs {
inherit system;
inherit overlays;
config.allowUnfreePredicate =
pkg:
builtins.elem (inputs.nixpkgs.lib.getName pkg) [
"discord"
"languagetool"
];
};
};
};
}

View file

@ -1,13 +0,0 @@
_: prev: {
# https://github.com/tmux/tmux/issues/3983
# fix tmux crashing when neovim is used in a nested session
tmux = prev.tmux.overrideAttrs (oa: {
patches = (oa.patches or [ ]) ++ [
(prev.fetchpatch {
name = "sixel-patch";
url = "https://github.com/tmux/tmux/commit/aa17f0e0c1c8b3f1d6fc8617613c74f07de66fae.patch";
hash = "sha256-jhWGnC9tsGqTTA5tU+i4G3wlwZ7HGz4P0UHl17dVRU4=";
})
];
});
}

View file

@ -1,26 +0,0 @@
final: _:
let
inherit (final) system;
in
{
# stackage LTS 22.22 / ghc965 (May 19 2024) / hls 2.8.0.0
ghc-pin = import (final.fetchFromGitHub {
owner = "NixOS";
repo = "nixpkgs";
rev = "1faadcf5147b9789aa05bdb85b35061b642500a4";
hash = "sha256-KTUFPrsI0YW/S8ZcbIAXnWI2BiGm/IGqNAFco88lBYU=";
}) { inherit system; };
alt-ergo-pin =
import
(final.fetchFromGitHub {
owner = "NixOS";
repo = "nixpkgs";
rev = "1b95daa381fa4a0963217a5d386433c20008208a";
hash = "sha256-vwEtkxIEQjymeTk89Ty1MGfRVSWL1/3j1wt5xB5ua88=";
})
{
inherit system;
config.allowUnfree = true;
};
}