1
0
Fork 0
mirror of https://git.sr.ht/~neverness/ultima synced 2025-05-13 06:15:15 +00:00

i made very big work for u ❤️

This commit is contained in:
nixzoid 2025-02-16 20:30:49 +09:00
parent 9c1d857248
commit 8e82c4e6e3
28 changed files with 216 additions and 221 deletions
flake.lockflake.nix
lib/builder
machines
embrace/home
jetpure/home
modules
home
programs/gui/qutebrowser
themes/stylix
nixos
programs/torrserver
services/transmission
pkgs

20
flake.lock generated
View file

@ -495,7 +495,8 @@
"nixpkgs": "nixpkgs_2",
"spicetify": "spicetify",
"stylix": "stylix",
"wallpapers": "wallpapers"
"wallpapers": "wallpapers",
"xpk": "xpk"
}
},
"spicetify": {
@ -713,6 +714,23 @@
"repo": "design",
"type": "sourcehut"
}
},
"xpk": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1,
"narHash": "sha256-wzJSmpRgN6GVKbHEynnkyCpVSuzSGYDSM37QCBbpJqo=",
"path": "./pkgs",
"type": "path"
},
"original": {
"path": "./pkgs",
"type": "path"
}
}
},
"root": "root",

View file

@ -40,6 +40,10 @@
inputs.nixpkgs.follows = "nixpkgs";
};
xpk = {
url = "path:./pkgs";
inputs.nixpkgs.follows = "nixpkgs";
};
base16 = {
url = "sourcehut:~neverness/design/base16";
flake = false;

View file

@ -70,7 +70,7 @@ let
{
home-manager = {
sharedModules = [ nixcord.homeManagerModules.nixcord ];
backupFileExtension = "backup";
backupFileExtension = "backupr";
extraSpecialArgs = spArgs;
useGlobalPkgs = true;
useUserPackages = true;

View file

@ -1,11 +1,11 @@
{
inputs,
pkgs,
lib,
...
}:
let
inherit (lib.x) customPkgs;
inherit (inputs) xpk;
in
{
@ -31,8 +31,7 @@ in
hut
sd
(customPkgs "lowfi" { })
(customPkgs "anicli" { })
xpk.lowfi
];
};
}

View file

@ -1,11 +1,11 @@
{
inputs,
pkgs,
lib,
...
}:
let
inherit (lib.x) customPkgs;
inherit (inputs) xpk;
in
{
@ -37,8 +37,8 @@ in
hut
sd
(customPkgs "lowfi" { })
(customPkgs "anicli" { })
xpk.lowfi
xpk.anicliru
];
};
}

View file

@ -1,12 +1,13 @@
{
inputs,
lib,
...
}:
let
inherit (lib) x;
tranPopup = x.customPkgs "qute/tranPopup.nix" { };
translate = x.customPkgs "qute/translate.nix" { };
transPop = inputs.xpk.qTransPop;
transPag = inputs.xpk.qTransPag;
in
{
@ -22,8 +23,8 @@ in
# keepassxc
",p" = "spawn --userscript qute-keepass -p ${x.path.pass}";
# transPopup
",t" = "spawn --userscript ${translate}/exe -s en -t ru";
",T" = "spawn --userscript ${tranPopup}/exe --target_lang ru";
",t" = "spawn --userscript ${transPag}/exe -s en -t ru";
",T" = "spawn --userscript ${transPop}/exe --target_lang ru";
# tabs
",b" = "config-cycle tabs.show always switching";
",s" = "config-cycle statusbar.show in-mode always";

View file

@ -1,4 +1,5 @@
{
inputs,
pkgs,
lib,
config,
@ -32,7 +33,7 @@ in
on
// import ./sets.nix { inherit lib config; }
// {
keyBindings = import ./binds.nix { inherit lib; };
keyBindings = import ./binds.nix { inherit inputs lib; };
greasemonkey = import ./plugins.nix { inherit pkgs; };
};
};

View file

@ -15,6 +15,7 @@
homemanager = "home-manager-options.extranix.com/?query=&release=master";
hydra = "hydra.nixos.org";
prTracker = "nixpk.gs/pr-tracker.html";
cachix = "app.cachix.org/cache/xache";
# git
ultima = "git.sr.ht/~neverness/ultima";
# social

View file

@ -1,8 +1,8 @@
{
inputs,
pkgs,
lib,
config,
inputs,
...
}:
@ -30,7 +30,7 @@ in
tinos
code-new-roman
dejavu-sans-mono
(customPkgs "base16-preview" { })
inputs.xpk.base16-preview
];
stylix = on // {
autoEnable = false;

View file

@ -1,4 +1,5 @@
{
inputs,
lib,
config,
...
@ -8,7 +9,6 @@ with lib;
with x;
let
cfg = config.module.programs.torrserver;
torr = customPkgs "torrserver" { };
in
{
@ -28,7 +28,7 @@ in
];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = "${torr}/bin/torrserver";
ExecStart = "${inputs.xpk.torrserver}/bin/torrserver";
Restart = "on-failure";
Type = "simple";
TimeoutSec = 30;

View file

@ -1,4 +1,5 @@
{
inputs,
pkgs,
lib,
config,
@ -22,7 +23,7 @@ in
config = mkMerge [
(mkIf cfg.tui.enable {
environment.systemPackages = with pkgs; [
(customPkgs "torque" { })
inputs.xpk.torque
rustmission
];
})

View file

@ -1,28 +0,0 @@
{
fetchPypi,
python3Packages,
verApi ? null,
}:
python3Packages.buildPythonApplication rec {
pname = "anicli_api";
version = verApi;
pyproject = true;
dontCheckRuntimeDeps = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-nnJWi87WDr8pDEUb9IQocDoPFS41DlS/l7qKjeTD73Q=";
};
build-system = with python3Packages; [
poetry-core
];
dependencies = with python3Packages; [
# (python3.withPackages (ps: with ps; [ httpx ] ++ httpx.optional-dependencies.http2))
attrs
parsel
tqdm
];
}

View file

@ -1,22 +0,0 @@
{
fetchPypi,
python3Packages,
}:
let
setup = with python3Packages; [ setuptools ];
in
python3Packages.buildPythonApplication rec {
pname = "chompjs";
version = "1.3.0";
pyproject = true;
build-system = setup;
dependencies = setup;
src = fetchPypi {
inherit pname version;
hash = "sha256-isCzF1XpOTSPsq8cwBw1fbUMhU+j1QbOeSGPwV8FaGg=";
};
}

View file

@ -1,31 +0,0 @@
{
verCli ? "5.0.12",
verApi ? "0.7.2",
#
pkgs,
fetchPypi,
python3Packages,
}:
python3Packages.buildPythonApplication rec {
pname = "anicli_ru";
version = verCli;
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-s8uI0ch+SPqthHy+d0jcB6o5/Zqx89JHM68Q00nwCFA=";
};
build-system = with python3Packages; [
hatchling
setuptools
];
dependencies = with pkgs; [
python3Packages.hatchling
(callPackage ./eggella.nix { })
(callPackage ./chompjs.nix { })
(callPackage ./api.nix { verApi = verApi; })
];
}

36
pkgs/anicliru/api.nix Normal file
View file

@ -0,0 +1,36 @@
{ pkgs }:
pkgs.python3Packages.buildPythonApplication rec {
pname = "anicli_api";
version = "0.7.3";
pyproject = true;
dontCheckRuntimeDeps = true;
src = pkgs.fetchPypi {
inherit pname version;
hash = "sha256-eFAVr43lE+c7hFIyyKcq4W8MmzkPHdZ1z4fiYQxaHY8=";
};
build-system = with pkgs.python3Packages; [
poetry-core
];
dependencies = with pkgs.python3Packages; [
(pkgs.python3.withPackages (ps: [
h2
socksio
(pkgs.python3Packages.httpx.overrideAttrs {
version = "0.27.2";
src = pkgs.fetchFromGitHub {
owner = "encode";
repo = "httpx";
tag = version;
hash = "sha256-N0ztVA/KMui9kKIovmOfNTwwrdvSimmNkSvvC+3gpck=";
};
})
]))
attrs
parsel
tqdm
];
}

20
pkgs/anicliru/chompjs.nix Normal file
View file

@ -0,0 +1,20 @@
{ pkgs }:
pkgs.python3Packages.buildPythonApplication rec {
pname = "chompjs";
version = "1.3.0";
pyproject = true;
src = pkgs.fetchPypi {
inherit pname version;
hash = "sha256-isCzF1XpOTSPsq8cwBw1fbUMhU+j1QbOeSGPwV8FaGg=";
};
build-system = with pkgs.python3Packages; [
setuptools
];
dependencies = with pkgs.python3Packages; [
setuptools
];
}

25
pkgs/anicliru/default.nix Normal file
View file

@ -0,0 +1,25 @@
{ pkgs }:
pkgs.python3Packages.buildPythonApplication rec {
pname = "anicli_ru";
version = "5.0.14";
pyproject = true;
src = pkgs.fetchPypi {
inherit pname version;
hash = "sha256-P4dJL9V1uihNsF9mqjay3PbncjnBuKbmPhufDv5l7Uk=";
};
build-system = with pkgs.python3Packages; [
hatchling
setuptools
];
dependencies = with pkgs; [
python3Packages.hatchling
python3Packages.setuptools
(callPackage ./eggella.nix { })
(callPackage ./chompjs.nix { })
(callPackage ./api.nix { })
];
}

View file

@ -1,26 +1,21 @@
{
fetchPypi,
python3Packages,
}:
{ pkgs }:
python3Packages.buildPythonApplication rec {
pkgs.python3Packages.buildPythonApplication rec {
pname = "eggella";
version = "0.1.7";
pyproject = true;
src = fetchPypi {
src = pkgs.fetchPypi {
inherit pname version;
hash = "sha256-8Vo39BePA86wcLKs/F+u2N7tpIpPrEyEPp3POszy050=";
};
build-system = with python3Packages; [
build-system = with pkgs.python3Packages; [
hatchling
setuptools
];
dependencies = with python3Packages; [
dependencies = with pkgs.python3Packages; [
prompt-toolkit
rich
typer
];
}

View file

@ -1,12 +1,10 @@
{
writeScriptBin,
fetchurl,
...
}:
{ pkgs }:
writeScriptBin "base16-preview" (
builtins.readFile (fetchurl {
url = "https://raw.githubusercontent.com/uwuwuwde/base16/refs/heads/master/preview-for-nix.py";
sha256 = "sha256-NQdCm73E7BS6EXrygIS6TmjwkVIwZwIyBaHuvo6p8B0=";
})
pkgs.writeScriptBin "base16-preview" (
builtins.readFile (
pkgs.fetchurl {
url = "https://raw.githubusercontent.com/uwuwuwde/base16/refs/heads/master/preview-for-nix.py";
sha256 = "sha256-NQdCm73E7BS6EXrygIS6TmjwkVIwZwIyBaHuvo6p8B0=";
}
)
)

32
pkgs/canvas/default.nix Normal file
View file

@ -0,0 +1,32 @@
{ pkgs }:
pkgs.stdenv.mkDerivation rec {
pname = "canvas";
version = "unstable-2023-08-22";
src = pkgs.fetchFromGitHub {
owner = "adi1090x";
repo = pname;
rev = "b4b1e3456d86db98052bd7735ae3c0a8799b1061";
hash = "sha256-yyZjwU3n1UJfVQ05if3oKBNKfjURmvfHFe2zC91Zu8g=";
};
nativeBuildInputs = [ pkgs.makeWrapper ];
phases = [ "installPhase" ];
installPhase = ''
mkdir -p $out/bin
cp $src/canvas $out/bin
chmod +x $out/bin/canvas
wrapProgram $out/bin/canvas \
--prefix PATH : ${
with pkgs;
lib.makeBinPath [
imagemagick
feh
xcolor
xorg.xrandr
]
}
'';
}

33
pkgs/flake.lock generated
View file

@ -16,40 +16,9 @@
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1738452942,
"narHash": "sha256-vJzFZGaCpnmo7I6i416HaBLpC+hvcURh/BQwROcGIp8=",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/072a6db25e947df2f31aab9eccd0ab75d5b2da11.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/072a6db25e947df2f31aab9eccd0ab75d5b2da11.tar.gz"
}
},
"parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1738453229,
"narHash": "sha256-7H9XgNiGLKN1G1CgRh0vUL4AheZSYzPm+zmZ7vxbJdo=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "32ea77a06711b758da0ad9bd6a844c5740a87abd",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs",
"parts": "parts"
"nixpkgs": "nixpkgs"
}
}
},

View file

@ -1,28 +1,19 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
parts.url = "github:hercules-ci/flake-parts";
};
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
outputs =
inputs:
inputs.parts.lib.mkFlake { inherit inputs; } {
systems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
import ./outputs.nix {
inherit inputs;
list = [
"qTransPop"
"qTransPag"
"base16-preview"
"torrserver"
"anicliru"
"canvas"
"torque"
"lowfi"
];
perSystem =
{ pkgs, ... }:
let
mk = dir: pkgs.callPackage dir { };
in
{
packages = {
anicli-ru = mk ./anicli;
lowfi = mk ./lowfi;
};
};
};
}

View file

@ -1,42 +1,35 @@
{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
openssl,
stdenv,
darwin,
alsa-lib,
}:
{ pkgs }:
rustPlatform.buildRustPackage {
pkgs.rustPlatform.buildRustPackage {
pname = "lowfi";
version = "unstable-2025-02-15";
src = fetchFromGitHub {
src = pkgs.fetchFromGitHub {
owner = "talwat";
repo = "lowfi";
rev = "923ac05cf87c17c4283a25a25ca65d33e1693457";
hash = "sha256-U4rTOkkEN6M2lKEXuf+xicEA2WVTqifuOpeZqFpzOEc=";
};
cargoHash = "sha256-lPr/qNlTBn+o/VLhqBF6mGiGf+YuSDpW44GdudmGtI4=";
useFetchCargoVendor = true;
cargoHash = "sha256-GPQ2O0agNAQ01MEzLTzK3mJHmBrtg5OjgyI9YOLp7FU=";
nativeBuildInputs = [
nativeBuildInputs = with pkgs; [
pkg-config
rustPlatform.bindgenHook
];
buildInputs =
with pkgs;
[
openssl
]
++ lib.optionals stdenv.isDarwin [
++ lib.optionals pkgs.stdenv.isDarwin [
darwin.apple_sdk.frameworks.CoreAudio
darwin.apple_sdk.frameworks.Security
darwin.apple_sdk.frameworks.SystemConfiguration
]
++ lib.optionals stdenv.isLinux [
++ lib.optionals pkgs.stdenv.isLinux [
alsa-lib
];
}

7
pkgs/outputs.nix Normal file
View file

@ -0,0 +1,7 @@
{ inputs, list, ... }:
let
pkgs = inputs.nixpkgs.legacyPackages."x86_64-linux";
lib = inputs.nixpkgs.lib;
mk = n: lib.genAttrs n (p: pkgs.callPackage ./${p} { });
in
mk list

View file

@ -1,12 +1,9 @@
{
stdenv,
fetchFromGitHub,
}:
{ pkgs }:
stdenv.mkDerivation {
pkgs.stdenv.mkDerivation {
name = "translate";
src = fetchFromGitHub {
src = pkgs.fetchFromGitHub {
owner = "AckslD";
repo = "Qute-Translate";
rev = "cd2d201d17bb2d7490700b20d94495327af15e78";

View file

@ -1,20 +1,16 @@
{
stdenv,
fetchFromGitHub,
python313Packages,
}:
{ pkgs }:
stdenv.mkDerivation {
pkgs.stdenv.mkDerivation {
name = "tranPopup";
src = fetchFromGitHub {
src = pkgs.fetchFromGitHub {
owner = "uwuwuwde";
repo = "qute-translate-popup";
rev = "7d239fc1078da12cc643c2065233cea54010bad2";
hash = "sha256-lZzdS4pxjhBO1GdYfLok9ss8AwE9r0uD+m0+XVRngJ0=";
};
nativeBuildInputs = [ python313Packages.requests ];
nativeBuildInputs = [ pkgs.python312Packages.requests ];
installPhase = ''install -Dm555 translate $out/exe'';
}

View file

@ -1,13 +1,10 @@
{
stdenv,
fetchurl,
}:
{ pkgs }:
stdenv.mkDerivation {
pkgs.stdenv.mkDerivation {
name = "torque";
dontUnpack = true;
src = fetchurl {
src = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/dylanaraps/torque/refs/heads/master/torque";
sha256 = "sha256-4PoO7Vn1/Lu2uB3UttH1PJbSMBq/dE+oJl8OoQ4YQC4=";
};

View file

@ -1,18 +1,13 @@
{
stdenv,
fetchurl,
autoPatchelfHook,
}:
let
version = "134";
in
stdenv.mkDerivation {
{ pkgs }:
pkgs.stdenv.mkDerivation rec {
name = "torrserver";
version = "134";
dontUnpack = true;
nativeBuildInputs = [ autoPatchelfHook ];
nativeBuildInputs = [ pkgs.autoPatchelfHook ];
src = fetchurl {
src = pkgs.fetchurl {
url = "https://github.com/YouROK/TorrServer/releases/download/MatriX.${version}/TorrServer-linux-amd64";
sha256 = "sha256-WDygG9aGnD20nGxtG0t+T2KEwbJ+fZ0uRaCndirrsXI=";
};