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