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
eachSystem = f:
nixpkgs.lib.genAttrs ["x86_64-linux" "aarch64-linux"] (system:
f {
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)
))
));
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:
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,17 +1,13 @@
{symlinkJoin, makeWrapper, neovide, ...}:
{ 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];
paths = [ custom-neovide ];
nativeBuildInputs = [ makeWrapper ];
postBuild = ''
wrapProgram $out/bin/neovide \
--set-default NEOVIDE_CONFIG ${../../test_dirs/neovide/config.toml}

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,41 +1,36 @@
{
symlinkJoin,
starship,
makeWrapper,
writers,
...
}: let
{ symlinkJoin, starship, makeWrapper, writers, ... }:
let
config = writers.writeTOML "starship.toml" {
aws = {symbol = "aws ";};
azure = {symbol = "az ";};
bun = {symbol = "bun ";};
c = {symbol = "C ";};
aws = { symbol = "aws "; };
azure = { symbol = "az "; };
bun = { symbol = "bun "; };
c = { symbol = "C "; };
character = {
error_symbol = "[x](bold red)";
success_symbol = "[>](bold green)";
vimcmd_symbol = "[<](bold green)";
};
cmake = {symbol = "cmake ";};
cmd_duration = {format = "\\[[$duration]($style)\\] ";};
cobol = {symbol = "cobol ";};
conda = {symbol = "conda ";};
crystal = {symbol = "cr ";};
daml = {symbol = "daml ";};
dart = {symbol = "dart ";};
deno = {symbol = "deno ";};
cmake = { symbol = "cmake "; };
cmd_duration = { format = "\\[[$duration]($style)\\] "; };
cobol = { symbol = "cobol "; };
conda = { symbol = "conda "; };
crystal = { symbol = "cr "; };
daml = { symbol = "daml "; };
dart = { symbol = "dart "; };
deno = { symbol = "deno "; };
directory = {
read_only = " ro";
format = ":[$path]($style) ";
};
docker_context = {symbol = "docker ";};
dotnet = {symbol = ".NET ";};
elixir = {symbol = "exs ";};
elm = {symbol = "elm ";};
fennel = {symbol = "fnl ";};
fossil_branch = {symbol = "fossil ";};
gcloud = {symbol = "gcp ";};
git_branch = {format = "\\[[$branch(:$remote_branch)]($style)\\] ";};
git_commit = {tag_symbol = " tag ";};
docker_context = { symbol = "docker "; };
dotnet = { symbol = ".NET "; };
elixir = { symbol = "exs "; };
elm = { symbol = "elm "; };
fennel = { symbol = "fnl "; };
fossil_branch = { symbol = "fossil "; };
gcloud = { symbol = "gcp "; };
git_branch = { format = "\\[[$branch(:$remote_branch)]($style)\\] "; };
git_commit = { tag_symbol = " tag "; };
git_status = {
ahead = ">";
behind = "<";
@ -44,23 +39,23 @@
renamed = "r";
format = "\\[[$all_status$ahead_behind]($style)\\] ";
};
gleam = {symbol = "gleam ";};
golang = {symbol = "go ";};
gradle = {symbol = "gradle ";};
guix_shell = {symbol = "guix ";};
hg_branch = {symbol = "hg ";};
java = {symbol = "java ";};
julia = {symbol = "jl ";};
kotlin = {symbol = "kt ";};
lua = {symbol = "lua ";};
memory_usage = {symbol = "memory ";};
meson = {symbol = "meson ";};
nats = {symbol = "nats ";};
nim = {symbol = "nim ";};
nix_shell = {format = "\\[[$state( \($name\))]($style)\\] ";};
nodejs = {symbol = "nodejs ";};
ocaml = {symbol = "ml ";};
opa = {symbol = "opa ";};
gleam = { symbol = "gleam "; };
golang = { symbol = "go "; };
gradle = { symbol = "gradle "; };
guix_shell = { symbol = "guix "; };
hg_branch = { symbol = "hg "; };
java = { symbol = "java "; };
julia = { symbol = "jl "; };
kotlin = { symbol = "kt "; };
lua = { symbol = "lua "; };
memory_usage = { symbol = "memory "; };
meson = { symbol = "meson "; };
nats = { symbol = "nats "; };
nim = { symbol = "nim "; };
nix_shell = { format = "\\[[$state( ($name))]($style)\\] "; };
nodejs = { symbol = "nodejs "; };
ocaml = { symbol = "ml "; };
opa = { symbol = "opa "; };
os = {
disabled = false;
symbols = {
@ -113,26 +108,26 @@
openSUSE = "osuse ";
};
};
package = {symbol = "pkg ";};
perl = {symbol = "pl ";};
php = {symbol = "php ";};
pijul_channel = {symbol = "pijul ";};
pulumi = {symbol = "pulumi ";};
purescript = {symbol = "purs ";};
python = {symbol = "py ";};
quarto = {symbol = "quarto ";};
raku = {symbol = "raku ";};
ruby = {symbol = "rb ";};
rust = {symbol = "rs ";};
scala = {symbol = "scala ";};
solidity = {symbol = "solidity ";};
spack = {symbol = "spack ";};
status = {symbol = "[x](bold red) ";};
sudo = {symbol = "sudo ";};
swift = {symbol = "swift ";};
terraform = {symbol = "terraform ";};
typst = {symbol = "typst ";};
zig = {symbol = "zig ";};
package = { symbol = "pkg "; };
perl = { symbol = "pl "; };
php = { symbol = "php "; };
pijul_channel = { symbol = "pijul "; };
pulumi = { symbol = "pulumi "; };
purescript = { symbol = "purs "; };
python = { symbol = "py "; };
quarto = { symbol = "quarto "; };
raku = { symbol = "raku "; };
ruby = { symbol = "rb "; };
rust = { symbol = "rs "; };
scala = { symbol = "scala "; };
solidity = { symbol = "solidity "; };
spack = { symbol = "spack "; };
status = { symbol = "[x](bold red) "; };
sudo = { symbol = "sudo "; };
swift = { symbol = "swift "; };
terraform = { symbol = "terraform "; };
typst = { symbol = "typst "; };
zig = { symbol = "zig "; };
username = {
show_always = true;
format = "[$user]($style)@";
@ -142,17 +137,12 @@
format = "[$ssh_symbol$hostname]($style)";
};
};
in
symlinkJoin {
name = "starship";
paths = [
starship
];
nativeBuildInputs = [
makeWrapper
];
postBuild = ''
wrapProgram $out/bin/starship \
--set STARSHIP_CONFIG ${config}
'';
}
in symlinkJoin {
name = "starship";
paths = [ starship ];
nativeBuildInputs = [ makeWrapper ];
postBuild = ''
wrapProgram $out/bin/starship \
--set STARSHIP_CONFIG ${config}
'';
}

View file

@ -1,102 +1,74 @@
{
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 {
inherit pname version;
src = fetchFromGitHub {
owner = "xonsh";
repo = pname;
rev = version;
hash = "sha256-PhhdZ3iLPDEIG9uDeR5ctJ9zz2+YORHBhbsiLrJckyA=";
};
})
(let
pname = "xontrib-prompt-starship";
version = "0.3.6";
in
ps.buildPythonPackage {
inherit pname version;
src = fetchFromGitHub {
owner = "anki-code";
repo = pname;
tag = version;
hash = "sha256-CLOvMa3L4XnH53H/k6/1W9URrPakPjbX1T1U43+eSR0=";
};
})
(let
pname = "xontrib-init-ssh-agent";
version = "1.0.1";
in
ps.buildPythonPackage {
inherit pname version;
pyproject = true;
build-system = [
ps.setuptools
ps.wheel
];
dependencies = [
ps.xonsh
];
src = fetchFromGitHub {
owner = "amadaluzia";
repo = pname;
rev = "cac9cfec70ec15b0ed4f1c8a18154ea9b4f8fb47";
hash = "sha256-UkRPdaZFNP8qv7lMwsTUalnre3k2UMfqMzmiTveLiBM=";
};
})
(let
pname = "xonsh-direnv";
version = "1.6.5";
in
ps.buildPythonPackage {
inherit pname version;
src = fetchFromGitHub {
owner = "74th";
repo = pname;
tag = version;
hash = "sha256-huBJ7WknVCk+WgZaXHlL+Y1sqsn6TYqMP29/fsUPSyU=";
};
})
]);
in
symlinkJoin {
name = "xonsh";
{ 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 {
inherit pname version;
src = fetchFromGitHub {
owner = "xonsh";
repo = pname;
rev = version;
hash = "sha256-PhhdZ3iLPDEIG9uDeR5ctJ9zz2+YORHBhbsiLrJckyA=";
};
})
(let
pname = "xontrib-prompt-starship";
version = "0.3.6";
in ps.buildPythonPackage {
inherit pname version;
src = fetchFromGitHub {
owner = "anki-code";
repo = pname;
tag = version;
hash = "sha256-CLOvMa3L4XnH53H/k6/1W9URrPakPjbX1T1U43+eSR0=";
};
})
(let
pname = "xontrib-init-ssh-agent";
version = "1.0.1";
in ps.buildPythonPackage {
inherit pname version;
pyproject = true;
build-system = [ ps.setuptools ps.wheel ];
dependencies = [ ps.xonsh ];
src = fetchFromGitHub {
owner = "amadaluzia";
repo = pname;
rev = "cac9cfec70ec15b0ed4f1c8a18154ea9b4f8fb47";
hash = "sha256-UkRPdaZFNP8qv7lMwsTUalnre3k2UMfqMzmiTveLiBM=";
};
})
(let
pname = "xonsh-direnv";
version = "1.6.5";
in ps.buildPythonPackage {
inherit pname version;
src = fetchFromGitHub {
owner = "74th";
repo = pname;
tag = version;
hash = "sha256-huBJ7WknVCk+WgZaXHlL+Y1sqsn6TYqMP29/fsUPSyU=";
};
})
]);
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}
'';
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,13 +1,8 @@
{
symlinkJoin,
nicotine-plus,
makeWrapper,
...
}:
{ symlinkJoin, nicotine-plus, makeWrapper, ... }:
symlinkJoin {
name = "nicotine";
paths = [nicotine-plus];
nativeBuildInputs = [makeWrapper];
paths = [ nicotine-plus ];
nativeBuildInputs = [ makeWrapper ];
postBuild = ''
wrapProgram $out/bin/nicotine \
--set-default NICOTINE_LIBADWAITA 1

View file

@ -1,14 +1,9 @@
# generated by zon2nix (https://github.com/nix-community/zon2nix)
{
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=";
};
}
]
{ 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";
@ -19,21 +10,11 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-AMxFdKVy4E1xVdimqxm8KZW39krk/Mt27MWLxEiq1JA=";
};
deps = callPackage ./build.zig.zon.nix {};
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, ... }:
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; }