Compare commits

..

No commits in common. "f61416748aed28b6a610f265e67c8b62e7e68557" and "35dc72cd516c6a2ca71f29436f7887689761b960" have entirely different histories.

11 changed files with 6059 additions and 118 deletions

View File

@ -10,16 +10,16 @@
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
pname = "fortune-kind-custom"; pname = "fortune-kind-custom";
version = "0.1.13"; version = "0.1.9";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "cafkafk"; owner = "cafkafk";
repo = "fortune-kind"; repo = "fortune-kind";
rev = "v${version}"; rev = "v${version}";
hash = "sha256-Tpg0Jq2EhkwQuz5ZOtv6Rb5YESSlmzLoJPTxYJNNgac="; hash = "sha256-93BEy9FX3bZTYNewotBv1ejmMSnSdu9XnC4TgIvcYG0=";
}; };
cargoHash = "sha256-Kp3pv9amEz9oFMDhz0IZDmhpsok5VgrvJZfwSPyz2X0="; cargoHash = "sha256-w5nR+pduM64DvVXhJxFKCg8O7lYSa1ur7aBBZQbOdpk=";
buildInputs = lib.optionals stdenv.isDarwin [ libiconv darwin.apple_sdk.frameworks.Security ]; buildInputs = lib.optionals stdenv.isDarwin [ libiconv darwin.apple_sdk.frameworks.Security ];

5952
custom/uv.Cargo.lock generated Normal file

File diff suppressed because it is too large Load Diff

83
custom/uv.nix Normal file
View File

@ -0,0 +1,83 @@
{
lib,
cmake,
darwin,
fetchFromGitHub,
installShellFiles,
libiconv,
pkg-config,
python3Packages,
rustPlatform,
stdenv,
testers,
uv,
nix-update-script,
}:
python3Packages.buildPythonApplication rec {
pname = "uv";
version = "0.3.0";
pyproject = true;
src = fetchFromGitHub {
owner = "astral-sh";
repo = "uv";
rev = "refs/tags/${version}";
hash = "sha256-5tX7PvON/n2ntwunoKU/U9zUIVxU+SPVWXelfHapqDA=";
};
cargoDeps = rustPlatform.importCargoLock {
lockFile = ./uv.Cargo.lock;
outputHashes = {
"async_zip-0.0.17" = "sha256-3k9rc4yHWhqsCUJ17K55F8aQoCKdVamrWAn6IDWo3Ss=";
"pubgrub-0.2.1" = "sha256-OVR4ioUSbraMZYglIGzBA0KQ+XZY0P0+fw68v8/e9sQ=";
"reqwest-middleware-0.3.3" = "sha256-csQN7jZTifliSTsOm6YrjPVgsXBOfelY7LkHD1HkNGQ=";
};
};
nativeBuildInputs = [
cmake
installShellFiles
pkg-config
rustPlatform.cargoSetupHook
rustPlatform.maturinBuildHook
];
buildInputs = [
libiconv
] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ];
dontUseCmakeConfigure = true;
cargoBuildFlags = [
"--package"
"uv"
];
postInstall = ''
export HOME=$TMPDIR
installShellCompletion --cmd uv \
--bash <($out/bin/uv --generate-shell-completion bash) \
--fish <($out/bin/uv --generate-shell-completion fish) \
--zsh <($out/bin/uv --generate-shell-completion zsh)
'';
pythonImportsCheck = [ "uv" ];
passthru = {
tests.version = testers.testVersion { package = uv; };
updateScript = nix-update-script { };
};
meta = {
description = "Extremely fast Python package installer and resolver, written in Rust";
homepage = "https://github.com/astral-sh/uv";
changelog = "https://github.com/astral-sh/uv/blob/${src.rev}/CHANGELOG.md";
license = with lib.licenses; [
asl20
mit
];
maintainers = with lib.maintainers; [ GaetanLepage ];
mainProgram = "uv";
};
}

View File

@ -4,7 +4,6 @@
enable = true; enable = true;
userName = "Leonora Tindall"; userName = "Leonora Tindall";
userEmail = "nora@nora.codes"; userEmail = "nora@nora.codes";
lfs.enable = true;
delta.enable = true; delta.enable = true;
extraConfig = { extraConfig = {
init.defaultBranch = "main"; init.defaultBranch = "main";

View File

@ -1,12 +0,0 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
hare
haredoc
haredo
];
programs.neovim.plugins = with pkgs.vimPlugins; [
hare-vim
];
}

View File

@ -1,53 +1,10 @@
/*
This file is provided under the MIT licence:
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the Software), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
# Generated by npins. Do not modify; will be overwritten regularly # Generated by npins. Do not modify; will be overwritten regularly
let let
data = builtins.fromJSON (builtins.readFile ./sources.json); data = builtins.fromJSON (builtins.readFile ./sources.json);
version = data.version; version = data.version;
# https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/lists.nix#L295
range =
first: last: if first > last then [ ] else builtins.genList (n: first + n) (last - first + 1);
# https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/strings.nix#L257
stringToCharacters = s: map (p: builtins.substring p 1 s) (range 0 (builtins.stringLength s - 1));
# https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/strings.nix#L269
stringAsChars = f: s: concatStrings (map f (stringToCharacters s));
concatMapStrings = f: list: concatStrings (map f list);
concatStrings = builtins.concatStringsSep "";
# If the environment variable NPINS_OVERRIDE_${name} is set, then use
# the path directly as opposed to the fetched source.
# (Taken from Niv for compatibility)
mayOverride =
name: path:
let
envVarName = "NPINS_OVERRIDE_${saneName}";
saneName = stringAsChars (c: if (builtins.match "[a-zA-Z0-9]" c) == null then "_" else c) name;
ersatz = builtins.getEnv envVarName;
in
if ersatz == "" then
path
else
# this turns the string into an actual Nix path (for both absolute and
# relative paths)
builtins.trace "Overriding path of \"${name}\" with \"${ersatz}\" due to set \"${envVarName}\"" (
if builtins.substring 0 1 ersatz == "/" then
/. + ersatz
else
/. + builtins.getEnv "PWD" + "/${ersatz}"
);
mkSource = mkSource =
name: spec: spec:
assert spec ? type; assert spec ? type;
let let
path = path =
@ -59,19 +16,16 @@ let
mkPyPiSource spec mkPyPiSource spec
else if spec.type == "Channel" then else if spec.type == "Channel" then
mkChannelSource spec mkChannelSource spec
else if spec.type == "Tarball" then
mkTarballSource spec
else else
builtins.throw "Unknown source type ${spec.type}"; builtins.throw "Unknown source type ${spec.type}";
in in
spec // { outPath = mayOverride name path; }; spec // { outPath = path; };
mkGitSource = mkGitSource =
{ {
repository, repository,
revision, revision,
url ? null, url ? null,
submodules,
hash, hash,
branch ? null, branch ? null,
... ...
@ -79,39 +33,31 @@ let
assert repository ? type; assert repository ? type;
# At the moment, either it is a plain git repository (which has an url), or it is a GitHub/GitLab repository # At the moment, either it is a plain git repository (which has an url), or it is a GitHub/GitLab repository
# In the latter case, there we will always be an url to the tarball # In the latter case, there we will always be an url to the tarball
if url != null && !submodules then if url != null then
builtins.fetchTarball { (builtins.fetchTarball {
inherit url; inherit url;
sha256 = hash; # FIXME: check nix version & use SRI hashes sha256 = hash; # FIXME: check nix version & use SRI hashes
} })
else else
assert repository.type == "Git";
let let
url =
if repository.type == "Git" then
repository.url
else if repository.type == "GitHub" then
"https://github.com/${repository.owner}/${repository.repo}.git"
else if repository.type == "GitLab" then
"${repository.server}/${repository.repo_path}.git"
else
throw "Unrecognized repository type ${repository.type}";
urlToName = urlToName =
url: rev: url: rev:
let let
matched = builtins.match "^.*/([^/]*)(\\.git)?$" url; matched = builtins.match "^.*/([^/]*)(\\.git)?$" repository.url;
short = builtins.substring 0 7 rev; short = builtins.substring 0 7 rev;
appendShort = if (builtins.match "[a-f0-9]*" rev) != null then "-${short}" else ""; appendShort = if (builtins.match "[a-f0-9]*" rev) != null then "-${short}" else "";
in in
"${if matched == null then "source" else builtins.head matched}${appendShort}"; "${if matched == null then "source" else builtins.head matched}${appendShort}";
name = urlToName url revision; name = urlToName repository.url revision;
in in
builtins.fetchGit { builtins.fetchGit {
url = repository.url;
rev = revision; rev = revision;
inherit name; inherit name;
# hash = hash; # hash = hash;
inherit url submodules;
}; };
mkPyPiSource = mkPyPiSource =
@ -127,20 +73,8 @@ let
inherit url; inherit url;
sha256 = hash; sha256 = hash;
}; };
mkTarballSource =
{
url,
locked_url ? url,
hash,
...
}:
builtins.fetchTarball {
url = locked_url;
sha256 = hash;
};
in in
if version == 5 then if version == 3 then
builtins.mapAttrs mkSource data.pins builtins.mapAttrs (_: mkSource) data.pins
else else
throw "Unsupported format version ${toString version} in sources.json. Try running `npins upgrade`" throw "Unsupported format version ${toString version} in sources.json. Try running `npins upgrade`"

View File

@ -8,10 +8,9 @@
"repo": "home-manager" "repo": "home-manager"
}, },
"branch": "master", "branch": "master",
"submodules": false, "revision": "d963ed335b890a70ed53eecf14cdb21528eda9b8",
"revision": "1fa73bb2cc39e250eb01e511ae6ac83bfbf9f38c", "url": "https://github.com/nix-community/home-manager/archive/d963ed335b890a70ed53eecf14cdb21528eda9b8.tar.gz",
"url": "https://github.com/nix-community/home-manager/archive/1fa73bb2cc39e250eb01e511ae6ac83bfbf9f38c.tar.gz", "hash": "1lmgp4snkskqmvgdbc8wgxjm6fv7can3gjdmmdd6q09vfda63vhi"
"hash": "06mz6f8b55x9hiyvbr8s77vmscyskqv00hv5zmcihdw5hhkrl8ls"
}, },
"nixgl": { "nixgl": {
"type": "Git", "type": "Git",
@ -21,7 +20,6 @@
"repo": "nixGL" "repo": "nixGL"
}, },
"branch": "main", "branch": "main",
"submodules": false,
"revision": "310f8e49a149e4c9ea52f1adf70cdc768ec53f8a", "revision": "310f8e49a149e4c9ea52f1adf70cdc768ec53f8a",
"url": "https://github.com/guibou/nixGL/archive/310f8e49a149e4c9ea52f1adf70cdc768ec53f8a.tar.gz", "url": "https://github.com/guibou/nixGL/archive/310f8e49a149e4c9ea52f1adf70cdc768ec53f8a.tar.gz",
"hash": "1crnbv3mdx83xjwl2j63rwwl9qfgi2f1lr53zzjlby5lh50xjz4n" "hash": "1crnbv3mdx83xjwl2j63rwwl9qfgi2f1lr53zzjlby5lh50xjz4n"
@ -29,9 +27,9 @@
"nixpkgs": { "nixpkgs": {
"type": "Channel", "type": "Channel",
"name": "nixos-unstable", "name": "nixos-unstable",
"url": "https://releases.nixos.org/nixos/unstable/nixos-25.11pre823481.3016b4b15d13/nixexprs.tar.xz", "url": "https://releases.nixos.org/nixos/unstable/nixos-25.05beta745286.9d3ae807ebd2/nixexprs.tar.xz",
"hash": "1ml7yaq7r15rfpx9vqh32bisc2w7kdsv6kmclnb2g113fbv6fd85" "hash": "01n74f9kan5z6bbkkal0mzfbb259iy3hb7m22v8vld99wbpvbypn"
} }
}, },
"version": 5 "version": 3
} }

View File

@ -1,10 +0,0 @@
{ config, pkgs, ... }:
{
services.ollama = {
enable = true;
acceleration = "rocm";
environmentVariables = {
HSA_OVERRIDE_GFX_VERSION = "10.3.0";
};
};
}

View File

@ -14,7 +14,7 @@
graphviz graphviz
nix-output-monitor nix-output-monitor
npins npins
uv (pkgs.callPackage ./custom/uv.nix {})
exercism exercism
pandoc pandoc
act act
@ -24,7 +24,6 @@
wl-clipboard wl-clipboard
neocities neocities
deno deno
decker
# from "mort.io/blog/nu-posix" # from "mort.io/blog/nu-posix"
bat # better cat bat # better cat
@ -45,6 +44,7 @@
just # updated gnumake replacement just # updated gnumake replacement
procs # better ps procs # better ps
ripgrep # rg ~ `grep` replacement ripgrep # rg ~ `grep` replacement
sudo-rs # memory-safe `sudo`
uutils-coreutils-noprefix # replaces GNU `coreutils` uutils-coreutils-noprefix # replaces GNU `coreutils`
viddy # better watch viddy # better watch

View File

@ -16,8 +16,6 @@ in
./fzf.nix ./fzf.nix
./zellij.nix ./zellij.nix
./jj.nix ./jj.nix
./hare.nix
./ollama.nix
./packages-min.nix ./packages-min.nix
]; ];

View File

@ -2,7 +2,6 @@
{ {
home.shellAliases = { home.shellAliases = {
idot = "dot -Tpng -Gbgcolor=#232627 -Ncolor=white -Nfontcolor=white -Npencolor=white -Ecolor=white -Efontcolor=white -Epencolor=white -Npenwidth=2 -Epenwidth=2 -Nfontname=\"Courier bold\" -Efontname=\"Courier bold\" | timg -"; idot = "dot -Tpng -Gbgcolor=#232627 -Ncolor=white -Nfontcolor=white -Npencolor=white -Ecolor=white -Efontcolor=white -Epencolor=white -Npenwidth=2 -Epenwidth=2 -Nfontname=\"Courier bold\" -Efontname=\"Courier bold\" | timg -";
sudo = "sudo --preserve-env=PATH env";
}; };
programs.zsh = { programs.zsh = {
@ -10,6 +9,6 @@
autosuggestion.enable = false; autosuggestion.enable = false;
enableCompletion = true; enableCompletion = true;
enableVteIntegration = true; enableVteIntegration = true;
initContent = (builtins.readFile ./rcfiles/zshrc); initExtra = (builtins.readFile ./rcfiles/zshrc);
}; };
} }