flake: use nixfmt-rfc-style

This commit is contained in:
Artur Manuel 2025-04-02 21:06:44 +01:00
commit 3307e8259d
Signed by: amadaluzia
SSH key fingerprint: SHA256:ubvwT66gNUKSsgSzEb2UQnX8pzTq5N+r8eRVYGJJm4Q
13 changed files with 398 additions and 167 deletions

View file

@ -1,34 +1,53 @@
{ {
description = "Alqages, packages from alqueva to here."; 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, }: outputs =
inputs@{ self, nixpkgs }:
let let
inherit (nixpkgs) lib; inherit (nixpkgs) lib;
eachSystem = f: eachSystem =
nixpkgs.lib.genAttrs [ "x86_64-linux" "aarch64-linux" ] (system: f:
nixpkgs.lib.genAttrs [ "x86_64-linux" "aarch64-linux" ] (
system:
f { f {
inherit system; inherit system;
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
}); }
in { );
overlays.default = _: prev: in
{
overlays.default =
_: prev:
lib.pipe (builtins.readDir ./packages) [ lib.pipe (builtins.readDir ./packages) [
(lib.filterAttrs (_: v: v == "directory")) (lib.filterAttrs (_: v: v == "directory"))
(lib.concatMapAttrs (name: _: { (lib.concatMapAttrs (
${name} = prev.callPackage ./packages/${name} { inherit inputs; }; name: _: {
})) ${name} = prev.callPackage ./packages/${name} { inherit inputs; };
}
))
]; ];
packages = eachSystem ({ pkgs, ... }: self.overlays.default pkgs pkgs); packages = eachSystem ({ pkgs, ... }: self.overlays.default pkgs pkgs);
devShells = eachSystem ({ pkgs, ... }: { devShells = eachSystem (
default = pkgs.mkShell { { pkgs, ... }:
name = "alqages-dev"; {
packages = default = pkgs.mkShell {
builtins.attrValues { inherit (pkgs) nil nixfmt deadnix statix; }; name = "alqages-dev";
}; packages = builtins.attrValues {
}); inherit (pkgs)
formatter = eachSystem ({ pkgs, ... }: pkgs.nixfmt); nil
nixfmt
deadnix
statix
;
};
};
}
);
formatter = eachSystem ({ pkgs, ... }: pkgs.nixfmt-rfc-style);
}; };
} }

View file

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

View file

@ -6,7 +6,6 @@ niri.overrideAttrs (finalAttrs: {
rev = "master"; rev = "master";
hash = "sha256-BVTlrmelSAq+rlxwlRvsyZxHrmcviRu3aHJYG37Yq8c="; hash = "sha256-BVTlrmelSAq+rlxwlRvsyZxHrmcviRu3aHJYG37Yq8c=";
}; };
patches = (finalAttrs.patches or [ ]) patches = (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,9 +1,19 @@
{ symlinkJoin, nushell, zoxide, makeWrapper, system, inputs, }: {
symlinkJoin,
nushell,
zoxide,
makeWrapper,
system,
inputs,
}:
symlinkJoin { symlinkJoin {
name = "nu"; name = "nu";
paths = paths = [
[ nushell inputs.self.packages.${system}.amadaluzian-starship zoxide ]; nushell
inputs.self.packages.${system}.amadaluzian-starship
zoxide
];
nativeBuildInputs = [ makeWrapper ]; nativeBuildInputs = [ makeWrapper ];

View file

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

View file

@ -1,65 +1,92 @@
{ makeWrapper, fetchFromGitHub, symlinkJoin, python3, inputs, system, zoxide {
, ... # ffs nixpkgs makeWrapper,
fetchFromGitHub,
symlinkJoin,
python3,
inputs,
system,
zoxide,
... # ffs nixpkgs
}: }:
let let
xonsh = python3.withPackages (ps: [ xonsh = python3.withPackages (ps: [
ps.xonsh ps.xonsh
(let (
pname = "xontrib-fish-completer"; let
version = "0.0.1"; pname = "xontrib-fish-completer";
in ps.buildPythonPackage { version = "0.0.1";
inherit pname version; in
src = fetchFromGitHub { ps.buildPythonPackage {
owner = "xonsh"; inherit pname version;
repo = pname; src = fetchFromGitHub {
rev = version; owner = "xonsh";
hash = "sha256-PhhdZ3iLPDEIG9uDeR5ctJ9zz2+YORHBhbsiLrJckyA="; repo = pname;
}; rev = version;
}) hash = "sha256-PhhdZ3iLPDEIG9uDeR5ctJ9zz2+YORHBhbsiLrJckyA=";
(let };
pname = "xontrib-prompt-starship"; }
version = "0.3.6"; )
in ps.buildPythonPackage { (
inherit pname version; let
src = fetchFromGitHub { pname = "xontrib-prompt-starship";
owner = "anki-code"; version = "0.3.6";
repo = pname; in
tag = version; ps.buildPythonPackage {
hash = "sha256-CLOvMa3L4XnH53H/k6/1W9URrPakPjbX1T1U43+eSR0="; inherit pname version;
}; src = fetchFromGitHub {
}) owner = "anki-code";
(let repo = pname;
pname = "xontrib-init-ssh-agent"; tag = version;
version = "1.0.1"; hash = "sha256-CLOvMa3L4XnH53H/k6/1W9URrPakPjbX1T1U43+eSR0=";
in ps.buildPythonPackage { };
inherit pname version; }
pyproject = true; )
build-system = [ ps.setuptools ps.wheel ]; (
dependencies = [ ps.xonsh ]; let
src = fetchFromGitHub { pname = "xontrib-init-ssh-agent";
owner = "amadaluzia"; version = "1.0.1";
repo = pname; in
rev = "cac9cfec70ec15b0ed4f1c8a18154ea9b4f8fb47"; ps.buildPythonPackage {
hash = "sha256-UkRPdaZFNP8qv7lMwsTUalnre3k2UMfqMzmiTveLiBM="; inherit pname version;
}; pyproject = true;
}) build-system = [
(let ps.setuptools
pname = "xonsh-direnv"; ps.wheel
version = "1.6.5"; ];
in ps.buildPythonPackage { dependencies = [ ps.xonsh ];
inherit pname version; src = fetchFromGitHub {
src = fetchFromGitHub { owner = "amadaluzia";
owner = "74th"; repo = pname;
repo = pname; rev = "cac9cfec70ec15b0ed4f1c8a18154ea9b4f8fb47";
tag = version; hash = "sha256-UkRPdaZFNP8qv7lMwsTUalnre3k2UMfqMzmiTveLiBM=";
hash = "sha256-huBJ7WknVCk+WgZaXHlL+Y1sqsn6TYqMP29/fsUPSyU="; };
}; }
}) )
(
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 { in
symlinkJoin {
name = "xonsh"; name = "xonsh";
paths = [ xonsh inputs.self.packages.${system}.amadaluzian-starship zoxide ]; paths = [
xonsh
inputs.self.packages.${system}.amadaluzian-starship
zoxide
];
nativeBuildInputs = [ makeWrapper ]; nativeBuildInputs = [ makeWrapper ];
@ -68,7 +95,11 @@ in symlinkJoin {
--set XONSH_CONFIG_DIR ${./cfg} --set XONSH_CONFIG_DIR ${./cfg}
''; '';
passthru = { shellPath = "/bin/xonsh"; }; passthru = {
shellPath = "/bin/xonsh";
};
meta = { mainProgram = "xonsh"; }; meta = {
mainProgram = "xonsh";
};
} }

View file

@ -1,6 +1,5 @@
eval "$(@starshipPath@ init zsh)" eval "$(@starshipPath@ init zsh)"
eval "$(@zoxidePath@ init zsh)" eval "$(@zoxidePath@ init zsh --cmd j)"
source "@zsh-deferPath@" source "@zsh-deferPath@"

View file

@ -1,4 +1,18 @@
{ symlinkJoin, zsh, makeWrapper, inputs, system, zoxide, eza, zsh-fzf-tab, zsh-defer, zsh-autosuggestions, zsh-syntax-highlighting, lib, fzf }: {
symlinkJoin,
zsh,
makeWrapper,
inputs,
system,
zoxide,
eza,
zsh-fzf-tab,
zsh-defer,
zsh-autosuggestions,
zsh-syntax-highlighting,
lib,
fzf,
}:
symlinkJoin { symlinkJoin {
name = "amadaluzian-zsh"; name = "amadaluzian-zsh";
paths = [ paths = [
@ -15,7 +29,9 @@ symlinkJoin {
--subst-var-by zsh-deferPath ${zsh-defer}/share/zsh-defer/zsh-defer.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-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 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 starshipPath ${
lib.getExe' inputs.self.packages.${system}.amadaluzian-starship "starship"
} \
--subst-var-by zoxidePath ${lib.getExe' zoxide "zoxide"} \ --subst-var-by zoxidePath ${lib.getExe' zoxide "zoxide"} \
--subst-var-by fzfPath ${lib.getExe' fzf "fzf"} \ --subst-var-by fzfPath ${lib.getExe' fzf "fzf"} \

View file

@ -1,12 +1,16 @@
{ 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 = url = "https://github.com/kreativekorp/open-relay/releases/download/2024-06-01/Fairfax.zip";
"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,4 +1,9 @@
{ symlinkJoin, nicotine-plus, makeWrapper, ... }: {
symlinkJoin,
nicotine-plus,
makeWrapper,
...
}:
symlinkJoin { symlinkJoin {
name = "nicotine"; name = "nicotine";
paths = [ nicotine-plus ]; paths = [ nicotine-plus ];

View file

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

View file

@ -1,5 +1,14 @@
{ 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: { stdenv.mkDerivation (finalAttrs: {
pname = "river-bedload"; pname = "river-bedload";
version = "0.1.1"; version = "0.1.1";
@ -12,9 +21,19 @@ stdenv.mkDerivation (finalAttrs: {
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,5 +1,4 @@
{ tela-circle-icon-theme, ... }: { tela-circle-icon-theme, ... }:
tela-circle-icon-theme.overrideAttrs (finalAttrs: { tela-circle-icon-theme.overrideAttrs (finalAttrs: {
patches = (finalAttrs.patches or [ ]) patches = (finalAttrs.patches or [ ]) ++ [ ./0001-fix-links-remove-symbolic-links.patch ];
++ [ ./0001-fix-links-remove-symbolic-links.patch ];
}) })