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 result
repl-result-out repl-result-out
result-*
*~
.\#*
\#*\#
.direnv

6
flake.lock generated
View file

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

View file

@ -1,34 +1,34 @@
{ {
description = "Alqages, packages from alqueva to here."; description = "Alqages, packages from alqueva to here.";
inputs = { inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; };
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
};
outputs = inputs @ { outputs = inputs@{ self, nixpkgs, }:
self, let
nixpkgs, inherit (nixpkgs) lib;
}: let
eachSystem = f: eachSystem = f:
nixpkgs.lib.genAttrs [ "x86_64-linux" "aarch64-linux" ] (system: nixpkgs.lib.genAttrs [ "x86_64-linux" "aarch64-linux" ] (system:
f { f {
inherit system;
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
}); });
in { in {
overlays.default = _: prev: (builtins.listToAttrs ( overlays.default = _: prev:
builtins.map ( lib.pipe (builtins.readDir ./packages) [
name: { (lib.filterAttrs (_: v: v == "directory"))
inherit name; (lib.concatMapAttrs (name: _: {
value = prev.callPackage ./packages/${name} {inherit inputs;}; ${name} = prev.callPackage ./packages/${name} { inherit inputs; };
} }))
) (builtins.attrNames ( ];
nixpkgs.lib.filterAttrs (
_: v: v == "directory"
) (builtins.readDir ./packages)
))
));
packages = eachSystem ({pkgs}: self.overlays.default pkgs pkgs); packages = eachSystem ({ pkgs, ... }: self.overlays.default pkgs pkgs);
formatter = eachSystem ({pkgs}: pkgs.alejandra); 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, ... }: { symlinkJoin, makeWrapper, neovide, ... }:
let let
custom-neovide = neovide.overrideAttrs (finalAttrs: { custom-neovide = neovide.overrideAttrs (finalAttrs: {
patches = patches = (finalAttrs.patches or [ ])
(finalAttrs.patches or []) ++ [ ./0001-feat-env-add-NEOVIDE_CONFIG-env-var.patch ];
++ [
./0001-feat-env-add-NEOVIDE_CONFIG-env-var.patch
];
}); });
in in symlinkJoin {
symlinkJoin {
name = "neovide"; name = "neovide";
paths = [ custom-neovide ]; paths = [ custom-neovide ];
nativeBuildInputs = [ makeWrapper ]; nativeBuildInputs = [ makeWrapper ];

View file

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

View file

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

View file

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

View file

@ -1,22 +1,13 @@
{ { makeWrapper, fetchFromGitHub, symlinkJoin, python3, inputs, system, zoxide
makeWrapper, , ... # ffs nixpkgs
fetchFromGitHub, }:
symlinkJoin, let
python3, xonsh = python3.withPackages (ps: [
inputs,
system,
zoxide,
... # ffs nixpkgs
}: let
xonsh =
python3
.withPackages (ps: [
ps.xonsh ps.xonsh
(let (let
pname = "xontrib-fish-completer"; pname = "xontrib-fish-completer";
version = "0.0.1"; version = "0.0.1";
in in ps.buildPythonPackage {
ps.buildPythonPackage {
inherit pname version; inherit pname version;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "xonsh"; owner = "xonsh";
@ -28,8 +19,7 @@
(let (let
pname = "xontrib-prompt-starship"; pname = "xontrib-prompt-starship";
version = "0.3.6"; version = "0.3.6";
in in ps.buildPythonPackage {
ps.buildPythonPackage {
inherit pname version; inherit pname version;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "anki-code"; owner = "anki-code";
@ -41,17 +31,11 @@
(let (let
pname = "xontrib-init-ssh-agent"; pname = "xontrib-init-ssh-agent";
version = "1.0.1"; version = "1.0.1";
in in ps.buildPythonPackage {
ps.buildPythonPackage {
inherit pname version; inherit pname version;
pyproject = true; pyproject = true;
build-system = [ build-system = [ ps.setuptools ps.wheel ];
ps.setuptools dependencies = [ ps.xonsh ];
ps.wheel
];
dependencies = [
ps.xonsh
];
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "amadaluzia"; owner = "amadaluzia";
repo = pname; repo = pname;
@ -62,8 +46,7 @@
(let (let
pname = "xonsh-direnv"; pname = "xonsh-direnv";
version = "1.6.5"; version = "1.6.5";
in in ps.buildPythonPackage {
ps.buildPythonPackage {
inherit pname version; inherit pname version;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "74th"; owner = "74th";
@ -73,30 +56,19 @@
}; };
}) })
]); ]);
in in symlinkJoin {
symlinkJoin {
name = "xonsh"; name = "xonsh";
paths = [ paths = [ xonsh inputs.self.packages.${system}.amadaluzian-starship zoxide ];
xonsh
inputs.self.packages.${system}.amadaluzian-starship
zoxide
];
nativeBuildInputs = [ nativeBuildInputs = [ makeWrapper ];
makeWrapper
];
postBuild = '' postBuild = ''
wrapProgram $out/bin/xonsh \ wrapProgram $out/bin/xonsh \
--set XONSH_CONFIG_DIR ${./cfg} --set XONSH_CONFIG_DIR ${./cfg}
''; '';
passthru = { passthru = { shellPath = "/bin/xonsh"; };
shellPath = "/bin/xonsh";
};
meta = { meta = { mainProgram = "xonsh"; };
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: { colloid-icon-theme.overrideAttrs (_finalAttrs: {
version = "master"; version = "master";
src = fetchFromGitHub { 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 { stdenvNoCC.mkDerivation {
pname = "fairfax"; pname = "fairfax";
version = "20240601"; version = "20240601";
src = lib.cleanSourceWith { src = lib.cleanSourceWith {
filter = _path: type: type == "regular"; filter = _path: type: type == "regular";
src = fetchzip { 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="; hash = "sha256-rUl/C250pJBal69ThtWhPMFe182nnZmk5UUA7eDrZeA=";
stripRoot = false; stripRoot = false;
}; };

View file

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

View file

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

View file

@ -1,14 +1,5 @@
{ { stdenv, fetchgit, zig_0_13, callPackage, wayland-scanner, wayland-protocols
stdenv, , wayland, pkg-config, ... }:
fetchgit,
zig_0_13,
callPackage,
wayland-scanner,
wayland-protocols,
wayland,
pkg-config,
...
}:
stdenv.mkDerivation (finalAttrs: { stdenv.mkDerivation (finalAttrs: {
pname = "river-bedload"; pname = "river-bedload";
version = "0.1.1"; version = "0.1.1";
@ -21,19 +12,9 @@ stdenv.mkDerivation (finalAttrs: {
deps = callPackage ./build.zig.zon.nix { }; deps = callPackage ./build.zig.zon.nix { };
zigBuildFlags = [ zigBuildFlags = [ "--system" "${finalAttrs.deps}" ];
"--system"
"${finalAttrs.deps}"
];
nativeBuildInputs = [ nativeBuildInputs = [ zig_0_13.hook pkg-config wayland-scanner ];
zig_0_13.hook
pkg-config
wayland-scanner
];
buildInputs = [ buildInputs = [ wayland wayland-protocols ];
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: { rose-pine-gtk-theme.overrideAttrs (_finalAttrs: {
version = "master"; version = "master";
src = fetchFromGitHub { src = fetchFromGitHub {

View file

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