amadaluzian-zsh: init amadaluzian-zsh

This commit is contained in:
Artur Manuel 2025-04-02 20:37:22 +01:00
commit e7b8922920
Signed by: amadaluzia
SSH key fingerprint: SHA256:ubvwT66gNUKSsgSzEb2UQnX8pzTq5N+r8eRVYGJJm4Q
20 changed files with 263 additions and 330 deletions

3
.envrc Normal file
View file

@ -0,0 +1,3 @@
# shellcheck disable=SC2148
use flake .#

5
.gitignore vendored
View file

@ -1,2 +1,7 @@
result
repl-result-out
result-*
*~
.\#*
\#*\#
.direnv

6
flake.lock generated
View file

@ -2,11 +2,11 @@
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1742069588,
"narHash": "sha256-C7jVfohcGzdZRF6DO+ybyG/sqpo1h6bZi9T56sxLy+k=",
"lastModified": 1743448293,
"narHash": "sha256-bmEPmSjJakAp/JojZRrUvNcDX2R5/nuX6bm+seVaGhs=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "c80f6a7e10b39afcc1894e02ef785b1ad0b0d7e5",
"rev": "77b584d61ff80b4cef9245829a6f1dfad5afdfa3",
"type": "github"
},
"original": {

View file

@ -1,34 +1,34 @@
{
description = "Alqages, packages from alqueva to here.";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
};
inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; };
outputs = inputs @ {
self,
nixpkgs,
}: let
outputs = inputs@{ self, nixpkgs, }:
let
inherit (nixpkgs) lib;
eachSystem = f:
nixpkgs.lib.genAttrs [ "x86_64-linux" "aarch64-linux" ] (system:
f {
inherit system;
pkgs = nixpkgs.legacyPackages.${system};
});
in {
overlays.default = _: prev: (builtins.listToAttrs (
builtins.map (
name: {
inherit name;
value = prev.callPackage ./packages/${name} {inherit inputs;};
}
) (builtins.attrNames (
nixpkgs.lib.filterAttrs (
_: v: v == "directory"
) (builtins.readDir ./packages)
))
));
overlays.default = _: prev:
lib.pipe (builtins.readDir ./packages) [
(lib.filterAttrs (_: v: v == "directory"))
(lib.concatMapAttrs (name: _: {
${name} = prev.callPackage ./packages/${name} { inherit inputs; };
}))
];
packages = eachSystem ({pkgs}: self.overlays.default pkgs pkgs);
formatter = eachSystem ({pkgs}: pkgs.alejandra);
packages = eachSystem ({ pkgs, ... }: self.overlays.default pkgs pkgs);
devShells = eachSystem ({ pkgs, ... }: {
default = pkgs.mkShell {
name = "alqages-dev";
packages =
builtins.attrValues { inherit (pkgs) nil nixfmt deadnix statix; };
};
});
formatter = eachSystem ({ pkgs, ... }: pkgs.nixfmt);
};
}

View file

@ -1,14 +1,10 @@
{ symlinkJoin, makeWrapper, neovide, ... }:
let
custom-neovide = neovide.overrideAttrs (finalAttrs: {
patches =
(finalAttrs.patches or [])
++ [
./0001-feat-env-add-NEOVIDE_CONFIG-env-var.patch
];
patches = (finalAttrs.patches or [ ])
++ [ ./0001-feat-env-add-NEOVIDE_CONFIG-env-var.patch ];
});
in
symlinkJoin {
in symlinkJoin {
name = "neovide";
paths = [ custom-neovide ];
nativeBuildInputs = [ makeWrapper ];

View file

@ -1,8 +1,4 @@
{
niri,
fetchFromGitHub,
...
}:
{ niri, fetchFromGitHub, ... }:
niri.overrideAttrs (finalAttrs: {
src = fetchFromGitHub {
owner = "YaLTeR";
@ -10,10 +6,7 @@ niri.overrideAttrs (finalAttrs: {
rev = "master";
hash = "sha256-BVTlrmelSAq+rlxwlRvsyZxHrmcviRu3aHJYG37Yq8c=";
};
patches =
(finalAttrs.patches or [])
++ [
./0001-ipc-_-90-180-270-Normal-90-180-270.patch
];
patches = (finalAttrs.patches or [ ])
++ [ ./0001-ipc-_-90-180-270-Normal-90-180-270.patch ];
cargoHash = "";
})

View file

@ -1,31 +1,15 @@
{
symlinkJoin,
nushell,
zoxide,
makeWrapper,
system,
inputs,
}:
{ symlinkJoin, nushell, zoxide, makeWrapper, system, inputs, }:
symlinkJoin {
name = "nu";
paths = [
nushell
inputs.self.packages.${system}.amadaluzian-starship
zoxide
];
paths =
[ nushell inputs.self.packages.${system}.amadaluzian-starship zoxide ];
nativeBuildInputs = [
makeWrapper
];
nativeBuildInputs = [ makeWrapper ];
passthru = {
inherit (nushell.passthru) shellPath;
};
passthru = { inherit (nushell.passthru) shellPath; };
meta = {
inherit (nushell.meta) mainProgram;
};
meta = { inherit (nushell.meta) mainProgram; };
postBuild = ''
wrapProgram $out/bin/nu \

View file

@ -1,10 +1,5 @@
{
symlinkJoin,
starship,
makeWrapper,
writers,
...
}: let
{ symlinkJoin, starship, makeWrapper, writers, ... }:
let
config = writers.writeTOML "starship.toml" {
aws = { symbol = "aws "; };
azure = { symbol = "az "; };
@ -57,7 +52,7 @@
meson = { symbol = "meson "; };
nats = { symbol = "nats "; };
nim = { symbol = "nim "; };
nix_shell = {format = "\\[[$state( \($name\))]($style)\\] ";};
nix_shell = { format = "\\[[$state( ($name))]($style)\\] "; };
nodejs = { symbol = "nodejs "; };
ocaml = { symbol = "ml "; };
opa = { symbol = "opa "; };
@ -142,15 +137,10 @@
format = "[$ssh_symbol$hostname]($style)";
};
};
in
symlinkJoin {
in symlinkJoin {
name = "starship";
paths = [
starship
];
nativeBuildInputs = [
makeWrapper
];
paths = [ starship ];
nativeBuildInputs = [ makeWrapper ];
postBuild = ''
wrapProgram $out/bin/starship \
--set STARSHIP_CONFIG ${config}

View file

@ -1,22 +1,13 @@
{
makeWrapper,
fetchFromGitHub,
symlinkJoin,
python3,
inputs,
system,
zoxide,
... # ffs nixpkgs
}: let
xonsh =
python3
.withPackages (ps: [
{ makeWrapper, fetchFromGitHub, symlinkJoin, python3, inputs, system, zoxide
, ... # ffs nixpkgs
}:
let
xonsh = python3.withPackages (ps: [
ps.xonsh
(let
pname = "xontrib-fish-completer";
version = "0.0.1";
in
ps.buildPythonPackage {
in ps.buildPythonPackage {
inherit pname version;
src = fetchFromGitHub {
owner = "xonsh";
@ -28,8 +19,7 @@
(let
pname = "xontrib-prompt-starship";
version = "0.3.6";
in
ps.buildPythonPackage {
in ps.buildPythonPackage {
inherit pname version;
src = fetchFromGitHub {
owner = "anki-code";
@ -41,17 +31,11 @@
(let
pname = "xontrib-init-ssh-agent";
version = "1.0.1";
in
ps.buildPythonPackage {
in ps.buildPythonPackage {
inherit pname version;
pyproject = true;
build-system = [
ps.setuptools
ps.wheel
];
dependencies = [
ps.xonsh
];
build-system = [ ps.setuptools ps.wheel ];
dependencies = [ ps.xonsh ];
src = fetchFromGitHub {
owner = "amadaluzia";
repo = pname;
@ -62,8 +46,7 @@
(let
pname = "xonsh-direnv";
version = "1.6.5";
in
ps.buildPythonPackage {
in ps.buildPythonPackage {
inherit pname version;
src = fetchFromGitHub {
owner = "74th";
@ -73,30 +56,19 @@
};
})
]);
in
symlinkJoin {
in symlinkJoin {
name = "xonsh";
paths = [
xonsh
inputs.self.packages.${system}.amadaluzian-starship
zoxide
];
paths = [ xonsh inputs.self.packages.${system}.amadaluzian-starship zoxide ];
nativeBuildInputs = [
makeWrapper
];
nativeBuildInputs = [ makeWrapper ];
postBuild = ''
wrapProgram $out/bin/xonsh \
--set XONSH_CONFIG_DIR ${./cfg}
'';
passthru = {
shellPath = "/bin/xonsh";
};
passthru = { shellPath = "/bin/xonsh"; };
meta = {
mainProgram = "xonsh";
};
meta = { mainProgram = "xonsh"; };
}

View file

@ -0,0 +1,18 @@
eval "$(@starshipPath@ init zsh)"
eval "$(@zoxidePath@ init zsh)"
source "@zsh-deferPath@"
zsh-defer source "@zsh-syntax-highlightingPath@"
zsh-defer source "@zsh-autosuggestionsPath@"
source "@fzf-tabPath@"
zstyle ':fzf-tab:*' fzf-command "@fzfPath@"
eza="@ezaPath@"
eza_options="--octal-permissions --group-directories-first --icons=never --colour=always"
alias ls="$eza -a $eza_options"
alias ll="$eza -la $eza_options"
alias tree="$eza -lT $eza_options"
alias switchbuild="nixos-rebuild switch --flake .#$HOST"

View file

@ -0,0 +1,27 @@
{ symlinkJoin, zsh, makeWrapper, inputs, system, zoxide, eza, zsh-fzf-tab, zsh-defer, zsh-autosuggestions, zsh-syntax-highlighting, lib, fzf }:
symlinkJoin {
name = "amadaluzian-zsh";
paths = [
zsh
inputs.self.packages.${system}.amadaluzian-starship
zoxide
];
nativeBuildInputs = [ makeWrapper ];
postBuild = ''
cp -Lr ${./config} $out/share/zshrc
substituteInPlace $out/share/zshrc/.zshrc \
--subst-var-by ezaPath ${lib.getExe' eza "eza"} \
--subst-var-by fzf-tabPath ${zsh-fzf-tab}/share/fzf-tab/fzf-tab.plugin.zsh \
--subst-var-by zsh-deferPath ${zsh-defer}/share/zsh-defer/zsh-defer.plugin.zsh \
--subst-var-by zsh-syntax-highlightingPath ${zsh-syntax-highlighting}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh \
--subst-var-by zsh-autosuggestionsPath ${zsh-autosuggestions}/share/zsh-autosuggestions/zsh-autosuggestions.zsh \
--subst-var-by starshipPath ${lib.getExe' inputs.self.packages.${system}.amadaluzian-starship "starship"} \
--subst-var-by zoxidePath ${lib.getExe' zoxide "zoxide"} \
--subst-var-by fzfPath ${lib.getExe' fzf "fzf"} \
wrapProgram $out/bin/zsh \
--set ZDOTDIR $out/share/zshrc \
'';
meta.mainProgram = "zsh";
passthru.shellPath = "/bin/zsh";
}

View file

@ -1,8 +1,4 @@
{
colloid-icon-theme,
fetchFromGitHub,
...
}:
{ colloid-icon-theme, fetchFromGitHub, ... }:
colloid-icon-theme.overrideAttrs (_finalAttrs: {
version = "master";
src = fetchFromGitHub {

View file

@ -1,4 +0,0 @@
{ dracula-theme, fetchFromGitHub, ... }:
dracula-theme.overrideAttrs (finalAttrs: {
})

View file

@ -1,16 +1,12 @@
{
stdenvNoCC,
fetchzip,
lib,
...
}:
{ stdenvNoCC, fetchzip, lib, ... }:
stdenvNoCC.mkDerivation {
pname = "fairfax";
version = "20240601";
src = lib.cleanSourceWith {
filter = _path: type: type == "regular";
src = fetchzip {
url = "https://github.com/kreativekorp/open-relay/releases/download/2024-06-01/Fairfax.zip";
url =
"https://github.com/kreativekorp/open-relay/releases/download/2024-06-01/Fairfax.zip";
hash = "sha256-rUl/C250pJBal69ThtWhPMFe182nnZmk5UUA7eDrZeA=";
stripRoot = false;
};

View file

@ -1,9 +1,4 @@
{
symlinkJoin,
nicotine-plus,
makeWrapper,
...
}:
{ symlinkJoin, nicotine-plus, makeWrapper, ... }:
symlinkJoin {
name = "nicotine";
paths = [ nicotine-plus ];

View file

@ -1,14 +1,9 @@
# generated by zon2nix (https://github.com/nix-community/zon2nix)
{
linkFarm,
fetchzip,
}:
linkFarm "zig-packages" [
{
{ linkFarm, fetchzip, }:
linkFarm "zig-packages" [{
name = "1220687c8c47a48ba285d26a05600f8700d37fc637e223ced3aa8324f3650bf52242";
path = fetchzip {
url = "https://codeberg.org/ifreund/zig-wayland/archive/v0.2.0.tar.gz";
hash = "sha256-dvit+yvc0MnipqWjxJdfIsA6fJaJZOaIpx4w4woCxbE=";
};
}
]
}]

View file

@ -1,14 +1,5 @@
{
stdenv,
fetchgit,
zig_0_13,
callPackage,
wayland-scanner,
wayland-protocols,
wayland,
pkg-config,
...
}:
{ stdenv, fetchgit, zig_0_13, callPackage, wayland-scanner, wayland-protocols
, wayland, pkg-config, ... }:
stdenv.mkDerivation (finalAttrs: {
pname = "river-bedload";
version = "0.1.1";
@ -21,19 +12,9 @@ stdenv.mkDerivation (finalAttrs: {
deps = callPackage ./build.zig.zon.nix { };
zigBuildFlags = [
"--system"
"${finalAttrs.deps}"
];
zigBuildFlags = [ "--system" "${finalAttrs.deps}" ];
nativeBuildInputs = [
zig_0_13.hook
pkg-config
wayland-scanner
];
nativeBuildInputs = [ zig_0_13.hook pkg-config wayland-scanner ];
buildInputs = [
wayland
wayland-protocols
];
buildInputs = [ wayland wayland-protocols ];
})

View file

@ -1,8 +1,4 @@
{
rose-pine-gtk-theme,
fetchFromGitHub,
...
}:
{ rose-pine-gtk-theme, fetchFromGitHub, ... }:
rose-pine-gtk-theme.overrideAttrs (_finalAttrs: {
version = "master";
src = fetchFromGitHub {

View file

@ -1,8 +1,5 @@
{ tela-circle-icon-theme, ... }:
tela-circle-icon-theme.overrideAttrs (finalAttrs: {
patches =
(finalAttrs.patches or [])
++ [
./0001-fix-links-remove-symbolic-links.patch
];
patches = (finalAttrs.patches or [ ])
++ [ ./0001-fix-links-remove-symbolic-links.patch ];
})

View file

@ -1,8 +1 @@
{
vesktop,
electron_32,
...
}:
vesktop.override {
electron = electron_32;
}
{ vesktop, electron_32, ... }: vesktop.override { electron = electron_32; }