refactor: remove precise inputs from lib.nix
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
e581ce4582
commit
22267e6c2e
13 changed files with 47 additions and 46 deletions
|
@ -8,11 +8,7 @@
|
|||
inherit (config.vars) neovimIde;
|
||||
inherit (pkgs) vimPlugins;
|
||||
|
||||
buildPlugin = pname: src:
|
||||
pkgs.vimUtils.buildVimPlugin {
|
||||
inherit pname src;
|
||||
version = src.shortRev;
|
||||
};
|
||||
inherit (import ../../../../lib.nix {inherit pkgs;}) buildPlugin;
|
||||
in
|
||||
lib.mkIf neovimIde {
|
||||
programs = {
|
||||
|
|
|
@ -9,11 +9,7 @@
|
|||
inherit (config.vars) neovimIde;
|
||||
inherit (pkgs) vimPlugins;
|
||||
|
||||
buildPlugin = pname: src:
|
||||
pkgs.vimUtils.buildVimPlugin {
|
||||
inherit pname src;
|
||||
version = src.shortRev;
|
||||
};
|
||||
inherit (import ../../../../lib.nix {inherit pkgs;}) buildPlugin;
|
||||
in
|
||||
lib.mkIf neovimIde {
|
||||
programs = {
|
||||
|
|
|
@ -5,11 +5,12 @@
|
|||
...
|
||||
}: let
|
||||
inherit (config.vars) hostName;
|
||||
inherit (import ../../lib.nix {}) mkVersion;
|
||||
|
||||
firefox-addons = pkgs.recurseIntoAttrs (pkgs.callPackage ./addons {});
|
||||
|
||||
firefox-gx = pkgs.callPackage ./firefox-gx {
|
||||
inherit firefox-gx-src;
|
||||
inherit firefox-gx-src mkVersion;
|
||||
};
|
||||
in {
|
||||
home.file = {
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
{
|
||||
lib,
|
||||
stdenvNoCC,
|
||||
firefox-gx-src,
|
||||
mkVersion,
|
||||
stdenvNoCC,
|
||||
}:
|
||||
stdenvNoCC.mkDerivation {
|
||||
pname = "firefox-gx";
|
||||
version = firefox-gx-src.shortRev;
|
||||
version = mkVersion firefox-gx-src;
|
||||
|
||||
src = firefox-gx-src;
|
||||
|
||||
|
@ -13,15 +14,14 @@ stdenvNoCC.mkDerivation {
|
|||
# Personal changes
|
||||
sed -i 's/var(--fuchsia))/var(--purple))/' ./chrome/components/ogx_root-personal.css
|
||||
sed -i 's#../newtab/wallpaper-dark1.png#../newtab/wallpaper-dark2.png#' ./chrome/components/ogx_root-personal.css
|
||||
#
|
||||
|
||||
mkdir -p $out
|
||||
cp -r ./* $out
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Firefox Theme CSS to Opera GX Lovers";
|
||||
homepage = "https://github.com/Godiesc/firefox-gx";
|
||||
license = licenses.mspl;
|
||||
license = lib.licenses.mspl;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
{pkgs, ...} @ inputs: {
|
||||
{pkgs, ...} @ inputs: let
|
||||
inherit (import ../../lib.nix {}) mkVersion;
|
||||
mpvScripts = import ./scripts (inputs // {inherit mkVersion;});
|
||||
in {
|
||||
# For kdialog-open-files
|
||||
home.packages = with pkgs; [
|
||||
kdialog
|
||||
|
@ -8,7 +11,7 @@
|
|||
enable = true;
|
||||
|
||||
# https://github.com/mpv-player/mpv/wiki/User-Scripts
|
||||
scripts = with (import ./scripts inputs); [
|
||||
scripts = with mpvScripts; [
|
||||
modernx
|
||||
# Dep of touch-gestures
|
||||
pointer-event
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
}:
|
||||
buildLua rec {
|
||||
pname = "zenity-open-files";
|
||||
version = "unstable";
|
||||
version = "0.0.0";
|
||||
|
||||
unpackPhase = ":";
|
||||
src = fetchurl {
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
{
|
||||
modernx-src,
|
||||
makeFontsConf,
|
||||
buildLua,
|
||||
makeFontsConf,
|
||||
mkVersion,
|
||||
modernx-src,
|
||||
...
|
||||
}:
|
||||
buildLua (finalAttrs: {
|
||||
pname = "modernx";
|
||||
version = modernx-src.shortRev;
|
||||
version = mkVersion modernx-src;
|
||||
|
||||
src = modernx-src;
|
||||
|
||||
|
@ -15,6 +16,7 @@ buildLua (finalAttrs: {
|
|||
mkdir -p $out/share/fonts
|
||||
cp -r ./Material-Design-Iconic-Font.ttf $out/share/fonts
|
||||
'';
|
||||
|
||||
passthru.extraWrapperArgs = [
|
||||
"--set"
|
||||
"FONTCONFIG_FILE"
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
{
|
||||
mpv-persist-properties-src,
|
||||
buildLua,
|
||||
mkVersion,
|
||||
mpv-persist-properties-src,
|
||||
...
|
||||
}:
|
||||
buildLua {
|
||||
pname = "persist-properties";
|
||||
version = mpv-persist-properties-src.shortRev;
|
||||
version = mkVersion mpv-persist-properties-src;
|
||||
|
||||
src = mpv-persist-properties-src;
|
||||
}
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
{
|
||||
mpv-pointer-event-src,
|
||||
buildLua,
|
||||
mkVersion,
|
||||
mpv-pointer-event-src,
|
||||
...
|
||||
}:
|
||||
buildLua {
|
||||
pname = "pointer-event";
|
||||
version = mpv-pointer-event-src.shortRev;
|
||||
version = mkVersion mpv-pointer-event-src;
|
||||
|
||||
src = mpv-pointer-event-src;
|
||||
}
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
{
|
||||
mpv-touch-gestures-src,
|
||||
buildLua,
|
||||
mkVersion,
|
||||
mpv-touch-gestures-src,
|
||||
...
|
||||
}:
|
||||
buildLua {
|
||||
pname = "touch-gestures";
|
||||
version = mpv-touch-gestures-src.shortRev;
|
||||
version = mkVersion mpv-touch-gestures-src;
|
||||
|
||||
src = mpv-touch-gestures-src;
|
||||
}
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
{
|
||||
eisa-scripts-src,
|
||||
buildLua,
|
||||
eisa-scripts-src,
|
||||
mkVersion,
|
||||
...
|
||||
}:
|
||||
buildLua rec {
|
||||
pname = "undo-redo";
|
||||
version = eisa-scripts-src.shortRev;
|
||||
version = mkVersion eisa-scripts-src;
|
||||
|
||||
src = eisa-scripts-src;
|
||||
scriptPath = "${src}/scripts/UndoRedo.lua";
|
||||
|
|
27
lib.nix
27
lib.nix
|
@ -1,21 +1,20 @@
|
|||
{
|
||||
grim-hyprland,
|
||||
home-manager,
|
||||
nix-on-droid,
|
||||
nixpkgs,
|
||||
nixpkgs-wayland,
|
||||
...
|
||||
} @ inputs: rec {
|
||||
{...} @ inputs: rec {
|
||||
mkVersion = src: "0pre+" + src.shortRev;
|
||||
|
||||
buildPlugin = pname: src:
|
||||
inputs.pkgs.vimUtils.buildVimPlugin {
|
||||
inherit pname src;
|
||||
version = mkVersion src;
|
||||
};
|
||||
|
||||
# Import pkgs from a nixpkgs
|
||||
mkPkgs = system: input:
|
||||
import input {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
overlays = [
|
||||
grim-hyprland.overlays.default
|
||||
nixpkgs-wayland.overlays.default
|
||||
inputs.grim-hyprland.overlays.default
|
||||
inputs.nixpkgs-wayland.overlays.default
|
||||
];
|
||||
};
|
||||
|
||||
|
@ -23,12 +22,12 @@
|
|||
mkArgs = system:
|
||||
inputs
|
||||
// {
|
||||
pkgs = mkPkgs system nixpkgs;
|
||||
pkgs = mkPkgs system inputs.nixpkgs;
|
||||
};
|
||||
|
||||
# Default system
|
||||
mkNixOS = mods:
|
||||
nixpkgs.lib.nixosSystem rec {
|
||||
inputs.nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = mkArgs system;
|
||||
modules =
|
||||
|
@ -40,9 +39,9 @@
|
|||
};
|
||||
|
||||
mkNixOnDroid = mods:
|
||||
nix-on-droid.lib.nixOnDroidConfiguration rec {
|
||||
inputs.nix-on-droid.lib.nixOnDroidConfiguration rec {
|
||||
extraSpecialArgs = mkArgs "aarch64-linux";
|
||||
home-manager-path = home-manager.outPath;
|
||||
home-manager-path = inputs.home-manager.outPath;
|
||||
pkgs = extraSpecialArgs.pkgs;
|
||||
|
||||
modules =
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
pkgs,
|
||||
piper-src,
|
||||
...
|
||||
} @ inputs: let
|
||||
inherit (import ../lib.nix inputs) mkVersion;
|
||||
}: let
|
||||
inherit (import ../lib.nix {}) mkVersion;
|
||||
in {
|
||||
services.ratbagd = {
|
||||
enable = true;
|
||||
|
|
Loading…
Reference in a new issue