Compare commits

...

6 Commits

Author SHA1 Message Date
Brian Hicks 7f23bf4a30
set up the right themes and settings for Helix 2022-09-14 17:06:38 -05:00
Brian Hicks 20abcb48b7
use HorizonDark (Gogh) for the terminal 2022-09-14 17:05:15 -05:00
Brian Hicks 871871bd67
not on a nightly anymore 2022-09-14 16:56:56 -05:00
Brian Hicks 3313b7a71d
use node 16 2022-09-13 12:22:47 -05:00
Brian Hicks e7343404c8
update kak-ayu deps 2022-09-13 11:10:36 -05:00
Brian Hicks bc8cd122ed
update inputs 2022-09-13 11:05:05 -05:00
7 changed files with 146 additions and 109 deletions

View File

@ -6,6 +6,16 @@
auto-format = true;
}];
settings.keys.insert.f.d = "normal_mode";
settings = {
theme = "monokai_pro_machine";
editor = {
lsp.display-messages = true;
file-picker.hidden = false;
};
keys = { insert.f.d = "normal_mode"; };
};
};
}

View File

@ -1,17 +1,11 @@
{ ... }: {
# note: there was a macOS bug in the 20220319 build that meant alt+shift would
# not send esc+shift, but a composed key. It's fixed in the nightly so that's
# what I have installed now. Updates will not automatically apply from this
# version, however!
#
# Issue link: https://github.com/wez/wezterm/issues/1826
home.file.".config/wezterm/wezterm.lua".text = ''
local wezterm = require('wezterm');
return {
-- anything in https://wezfurlong.org/wezterm/colorschemes/index.html
-- another good one: BlulocoDark
color_scheme = "Ayu Mirage",
color_scheme = "HorizonDark (Gogh)",
hide_tab_bar_if_only_one_tab = true,

View File

@ -40,11 +40,11 @@
]
},
"locked": {
"lastModified": 1661882940,
"narHash": "sha256-4LaVFnV22WrOA0aolqqk9dXrM8crikcrLQt29G18F7M=",
"lastModified": 1662478528,
"narHash": "sha256-Myjd0HPL5lXri3NXOcJ6gP7IKod2eMweQBKM4uxgEGw=",
"owner": "LnL7",
"repo": "nix-darwin",
"rev": "80cec5115aae74accc4ccfb9f84306d7863f0632",
"rev": "3b69bf3cc26ae19de847bfe54d6ab22d7381a90a",
"type": "github"
},
"original": {
@ -86,11 +86,11 @@
},
"flake-utils_2": {
"locked": {
"lastModified": 1656065134,
"narHash": "sha256-oc6E6ByIw3oJaIyc67maaFcnjYOz1mMcOtHxbEf9NwQ=",
"lastModified": 1659877975,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "bee6a7250dd1b01844a2de7e02e4df7d8a0a206c",
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
"type": "github"
},
"original": {
@ -269,11 +269,11 @@
]
},
"locked": {
"lastModified": 1662136632,
"narHash": "sha256-RwW/aA3ueQPsilQLi7NOfUnn8MgM6WMV+oRpW+nkDMI=",
"lastModified": 1662220400,
"narHash": "sha256-9o2OGQqu4xyLZP9K6kNe1pTHnyPz0Wr3raGYnr9AIgY=",
"owner": "nix-community",
"repo": "naersk",
"rev": "8d2f4d00cb24cda8e5bdd802b827a0eaeff34eec",
"rev": "6944160c19cb591eb85bbf9b2f2768a935623ed3",
"type": "github"
},
"original": {
@ -321,11 +321,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1662092548,
"narHash": "sha256-nmAbyJ5+DBXcNJ2Rcy/Gx84maqtLdr6xEe82+AXCaY8=",
"lastModified": 1662714967,
"narHash": "sha256-IOTq5tAGGmBFj7tQbkcyLE261JUeTUucEE3p0WLZ4qM=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "786633331724f36967853b98d9100b5cfaa4d798",
"rev": "1fec8fda86dac5701146c77d5f8a414b14ed1ff6",
"type": "github"
},
"original": {
@ -336,11 +336,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1661799568,
"narHash": "sha256-P3xXCyYfd6WzVC3anpb5ZvUeZ6vMttcs05OWGWvgc+E=",
"lastModified": 1662934689,
"narHash": "sha256-mXi8hmhiunOVTeHiuouWXb0vTqjzp9v9kshMmI561Us=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c3e4dc4f6d23c7e41dda5ce98956c75c7779e2fa",
"rev": "a0b7e70db7a55088d3de0cc370a59f9fbcc906c3",
"type": "github"
},
"original": {
@ -507,11 +507,11 @@
"tree-sitter-typescript": "tree-sitter-typescript"
},
"locked": {
"lastModified": 1662112956,
"narHash": "sha256-he8wErKP1QwE+WBIKUhzZWGW4u5xIhoe9NwVHpKEwe8=",
"lastModified": 1663063912,
"narHash": "sha256-hcDV0+ipeoCbGElchjw7oAgwcgTLKqFwB4pp/GnlRco=",
"owner": "BrianHicks",
"repo": "tree-grepper",
"rev": "666b0589f0ecbbbacc567df09ffde5d60a393cef",
"rev": "8f10640ccdfdc70f1838a467bc98ab5ca2c5e5c9",
"type": "github"
},
"original": {
@ -523,11 +523,11 @@
"tree-sitter-cpp": {
"flake": false,
"locked": {
"lastModified": 1653935753,
"narHash": "sha256-Fg+1m/TaFyf1sFG/OSxH/dXeRUJYSfoNV8kr8IFGk1E=",
"lastModified": 1659393295,
"narHash": "sha256-8xfns5jhHznvGsQZ3gWsEEobHvamuHxgO8hhd5BefZ4=",
"owner": "tree-sitter",
"repo": "tree-sitter-cpp",
"rev": "38d8b495bd43977498f0eb122e0f9cfef8526d18",
"rev": "f40125503642845492d87fa56ece3ed26a4ef4db",
"type": "github"
},
"original": {
@ -539,11 +539,11 @@
"tree-sitter-elixir": {
"flake": false,
"locked": {
"lastModified": 1651162668,
"narHash": "sha256-vwo0nzlEYLEUZ07BDbfVnHMJCeOq/1jjCAqbbOYTzsU=",
"lastModified": 1659637723,
"narHash": "sha256-5nopPahI6VDxu9z2lKaXWMPZ+1EWYRM2S9k3cfRrxGM=",
"owner": "elixir-lang",
"repo": "tree-sitter-elixir",
"rev": "5d0c1bfcdf8aaad225525acad930a972b319a675",
"rev": "05e3631c6a0701c1fa518b0fee7be95a2ceef5e2",
"type": "github"
},
"original": {
@ -556,11 +556,11 @@
"tree-sitter-elm": {
"flake": false,
"locked": {
"lastModified": 1654637013,
"narHash": "sha256-iihQnLUJajrUq4EDy6O0lK3XP9HIvZM7LShiuHymqYU=",
"lastModified": 1662202946,
"narHash": "sha256-WtR+XEYr0zqObBFS/4fzDQyFJCKcMK8j9YFGu5C8siw=",
"owner": "elm-tooling",
"repo": "tree-sitter-elm",
"rev": "a9a8efad446f78db3989d7ed8517987daf510c83",
"rev": "cce0e5938e7779f86cf8bf445eadf7df4b88229d",
"type": "github"
},
"original": {
@ -573,11 +573,11 @@
"tree-sitter-haskell": {
"flake": false,
"locked": {
"lastModified": 1655471690,
"narHash": "sha256-gg7anmOA1jgXf8gIBd5wQwne8U+JoCNj1wh/t6bC6eU=",
"lastModified": 1662169786,
"narHash": "sha256-94zxdt3JjC3iki639taHYmRwQIzOlOM6H9C3sKnRj/o=",
"owner": "tree-sitter",
"repo": "tree-sitter-haskell",
"rev": "14bf3061a3fbcadab428fb5e50eb2c5b1f9be0c3",
"rev": "e30bdfd53eb28c73f26a68b77d436fd2140af167",
"type": "github"
},
"original": {
@ -589,11 +589,11 @@
"tree-sitter-javascript": {
"flake": false,
"locked": {
"lastModified": 1653918556,
"narHash": "sha256-b9QAhQRrYK0x+G6rUEpULvezhAMGgDBBNwhPL4//aUI=",
"lastModified": 1660825759,
"narHash": "sha256-uZW1L9ZE1YSZbwxiqSDiKycWv5mSRG4k4MlWFYoWRbw=",
"owner": "tree-sitter",
"repo": "tree-sitter-javascript",
"rev": "785831303ce3d36f5dd8ada7c4c7d63518d4d2f5",
"rev": "936d976a782e75395d9b1c8c7c7bf4ba6fe0d86b",
"type": "github"
},
"original": {
@ -637,11 +637,11 @@
"tree-sitter-php": {
"flake": false,
"locked": {
"lastModified": 1656110308,
"narHash": "sha256-BFG6hu1hoZWXc3TtOrZnbVdjkD0ASnY45u/CIQ85/T0=",
"lastModified": 1657967105,
"narHash": "sha256-wGGKAf8ZcYWEznkdSfKMwqcvXrMaE09WR4swZY1ucwY=",
"owner": "tree-sitter",
"repo": "tree-sitter-php",
"rev": "ece74b20942a5b23acaf3622512c6d0db1491a7e",
"rev": "670d1eb6822d8c7ade1c71232e0bef42757b9da7",
"type": "github"
},
"original": {
@ -653,11 +653,11 @@
"tree-sitter-ruby": {
"flake": false,
"locked": {
"lastModified": 1656324185,
"narHash": "sha256-rLYnbU0AEhmzGyvzkYe+cQxVyXifRSSLxTW/4yHW8fM=",
"lastModified": 1662136138,
"narHash": "sha256-BjdgNxXoaZ+nYrszd8trL0Cu4hnQNZkSWejTThkAn0o=",
"owner": "tree-sitter",
"repo": "tree-sitter-ruby",
"rev": "5b305c3cd32db10494cedd2743de6bbe32f1a573",
"rev": "656abef0645caea793e33c1c773570722463e1d8",
"type": "github"
},
"original": {
@ -669,11 +669,11 @@
"tree-sitter-rust": {
"flake": false,
"locked": {
"lastModified": 1653918523,
"narHash": "sha256-6tAXuy1PoixBqBarP/cJPEodPrB+lXFuFr6OjiwjM/Q=",
"lastModified": 1660820867,
"narHash": "sha256-v6ExAQxXIOeLfCjxbIhVEd7XBCkXHCiukRyrUqEBxIA=",
"owner": "tree-sitter",
"repo": "tree-sitter-rust",
"rev": "36ae187ed6dd3803a8a89dbb54f3124c8ee74662",
"rev": "47b061c1e1ba3a7e9c2f450363a50e87de3f7c61",
"type": "github"
},
"original": {
@ -685,11 +685,11 @@
"tree-sitter-typescript": {
"flake": false,
"locked": {
"lastModified": 1656075921,
"narHash": "sha256-qKfhoHBlyeoCt+ed6j1ASn8Wf4ajapRdncs06Up72EQ=",
"lastModified": 1661450839,
"narHash": "sha256-PSOfb96ROwjs8OUomwRuiCY2fNGzJ2EohQvW1+giLHg=",
"owner": "tree-sitter",
"repo": "tree-sitter-typescript",
"rev": "391803ed80081b483d7ef3a6a412b0fb4d335329",
"rev": "082da44a5263599186dadafd2c974c19f3a73d28",
"type": "github"
},
"original": {
@ -725,11 +725,11 @@
]
},
"locked": {
"lastModified": 1662155938,
"narHash": "sha256-CCCS7pwt5ThhLBpGLwOjY6Sf37Gns8vnoeNnBnqcneQ=",
"lastModified": 1662404095,
"narHash": "sha256-lMEPvHxfEc30N6KSsMrgY4j1aeTtCrdoM3qOoZ83CF0=",
"owner": "BrianHicks",
"repo": "xbar-pr-status",
"rev": "d36086181f70bb410abac840eff62ea3f29f8d19",
"rev": "6a99ba8049e3cbb28b240cf6b92e1730f3ecdf9f",
"type": "github"
},
"original": {
@ -749,11 +749,11 @@
]
},
"locked": {
"lastModified": 1661994233,
"narHash": "sha256-v+OrXh7BFspjkh2X8ZRuJ0ARSNujymGkVe8POlzEGRY=",
"lastModified": 1663032013,
"narHash": "sha256-Z37yO65XUSdNfdMopz9o/n8JkB5wYf+Ghh5z7mGc7s8=",
"owner": "BrianHicks",
"repo": "xbar-review-request-status",
"rev": "81965fd018096fb0aed3a73aabf8fd0334208c96",
"rev": "5113905b872658f93affdcea3bcaadb1abee6c13",
"type": "github"
},
"original": {

View File

@ -1,6 +1,6 @@
# This file originates from node2nix
{lib, stdenv, nodejs, python2, pkgs, libtool, runCommand, writeTextFile}:
{lib, stdenv, nodejs, python2, pkgs, libtool, runCommand, writeTextFile, writeShellScript}:
let
# Workaround to cope with utillinux in Nixpkgs 20.09 and util-linux in Nixpkgs master
@ -40,36 +40,22 @@ let
'';
};
includeDependencies = {dependencies}:
lib.optionalString (dependencies != [])
(lib.concatMapStrings (dependency:
''
# Bundle the dependencies of the package
mkdir -p node_modules
cd node_modules
# Common shell logic
installPackage = writeShellScript "install-package" ''
installPackage() {
local packageName=$1 src=$2
# Only include dependencies if they don't exist. They may also be bundled in the package.
if [ ! -e "${dependency.name}" ]
then
${composePackage dependency}
fi
local strippedName
cd ..
''
) dependencies);
# Recursively composes the dependencies of a package
composePackage = { name, packageName, src, dependencies ? [], ... }@args:
builtins.addErrorContext "while evaluating node package '${packageName}'" ''
DIR=$(pwd)
local DIR=$PWD
cd $TMPDIR
unpackFile ${src}
unpackFile $src
# Make the base dir in which the target dependency resides first
mkdir -p "$(dirname "$DIR/${packageName}")"
mkdir -p "$(dirname "$DIR/$packageName")"
if [ -f "${src}" ]
if [ -f "$src" ]
then
# Figure out what directory has been unpacked
packageDir="$(find . -maxdepth 1 -type d | tail -1)"
@ -79,28 +65,53 @@ let
chmod -R u+w "$packageDir"
# Move the extracted tarball into the output folder
mv "$packageDir" "$DIR/${packageName}"
elif [ -d "${src}" ]
mv "$packageDir" "$DIR/$packageName"
elif [ -d "$src" ]
then
# Get a stripped name (without hash) of the source directory.
# On old nixpkgs it's already set internally.
if [ -z "$strippedName" ]
then
strippedName="$(stripHash ${src})"
strippedName="$(stripHash $src)"
fi
# Restore write permissions to make building work
chmod -R u+w "$strippedName"
# Move the extracted directory into the output folder
mv "$strippedName" "$DIR/${packageName}"
mv "$strippedName" "$DIR/$packageName"
fi
# Unset the stripped name to not confuse the next unpack step
unset strippedName
# Change to the package directory to install dependencies
cd "$DIR/$packageName"
}
'';
# Include the dependencies of the package
cd "$DIR/${packageName}"
# Bundle the dependencies of the package
#
# Only include dependencies if they don't exist. They may also be bundled in the package.
includeDependencies = {dependencies}:
lib.optionalString (dependencies != []) (
''
mkdir -p node_modules
cd node_modules
''
+ (lib.concatMapStrings (dependency:
''
if [ ! -e "${dependency.packageName}" ]; then
${composePackage dependency}
fi
''
) dependencies)
+ ''
cd ..
''
);
# Recursively composes the dependencies of a package
composePackage = { name, packageName, src, dependencies ? [], ... }@args:
builtins.addErrorContext "while evaluating node package '${packageName}'" ''
installPackage "${packageName}" "${src}"
${includeDependencies { inherit dependencies; }}
cd ..
${lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."}
@ -246,8 +257,8 @@ let
var packageLock = JSON.parse(fs.readFileSync("./package-lock.json"));
if(![1, 2].includes(packageLock.lockfileVersion)) {
process.stderr.write("Sorry, I only understand lock file versions 1 and 2!\n");
process.exit(1);
process.stderr.write("Sorry, I only understand lock file versions 1 and 2!\n");
process.exit(1);
}
if(packageLock.dependencies !== undefined) {
@ -379,7 +390,7 @@ let
buildNodePackage =
{ name
, packageName
, version
, version ? null
, dependencies ? []
, buildInputs ? []
, production ? true
@ -391,13 +402,14 @@ let
, dontStrip ? true
, unpackPhase ? "true"
, buildPhase ? "true"
, meta ? {}
, ... }@args:
let
extraArgs = removeAttrs args [ "name" "dependencies" "buildInputs" "dontStrip" "dontNpmInstall" "preRebuild" "unpackPhase" "buildPhase" ];
extraArgs = removeAttrs args [ "name" "dependencies" "buildInputs" "dontStrip" "dontNpmInstall" "preRebuild" "unpackPhase" "buildPhase" "meta" ];
in
stdenv.mkDerivation ({
name = "node_${name}-${version}";
name = "${name}${if version == null then "" else "-${version}"}";
buildInputs = [ tarWrapper python nodejs ]
++ lib.optional (stdenv.isLinux) utillinux
++ lib.optional (stdenv.isDarwin) libtool
@ -414,6 +426,8 @@ let
passAsFile = [ "compositionScript" "pinpointDependenciesScript" ];
installPhase = ''
source ${installPackage}
# Create and enter a root node_modules/ folder
mkdir -p $out/lib/node_modules
cd $out/lib/node_modules
@ -427,6 +441,14 @@ let
if [ -d "$out/lib/node_modules/.bin" ]
then
ln -s $out/lib/node_modules/.bin $out/bin
# Patch the shebang lines of all the executables
ls $out/bin/* | while read i
do
file="$(readlink -f "$i")"
chmod u+rwx "$file"
patchShebangs "$file"
done
fi
# Create symlinks to the deployed manual page folders, if applicable
@ -446,13 +468,18 @@ let
# Run post install hook, if provided
runHook postInstall
'';
meta = {
# default to Node.js' platforms
platforms = nodejs.meta.platforms;
} // meta;
} // extraArgs);
# Builds a node environment (a node_modules folder and a set of binaries)
buildNodeDependencies =
{ name
, packageName
, version
, version ? null
, src
, dependencies ? []
, buildInputs ? []
@ -470,7 +497,7 @@ let
extraArgs = removeAttrs args [ "name" "dependencies" "buildInputs" ];
in
stdenv.mkDerivation ({
name = "node-dependencies-${name}-${version}";
name = "node-dependencies-${name}${if version == null then "" else "-${version}"}";
buildInputs = [ tarWrapper python nodejs ]
++ lib.optional (stdenv.isLinux) utillinux
@ -486,6 +513,8 @@ let
passAsFile = [ "includeScript" "pinpointDependenciesScript" ];
installPhase = ''
source ${installPackage}
mkdir -p $out/${packageName}
cd $out/${packageName}
@ -498,6 +527,7 @@ let
if [ -f ${src}/package-lock.json ]
then
cp ${src}/package-lock.json .
chmod 644 package-lock.json
fi
''}
@ -520,7 +550,7 @@ let
buildNodeShell =
{ name
, packageName
, version
, version ? null
, src
, dependencies ? []
, buildInputs ? []
@ -536,9 +566,10 @@ let
let
nodeDependencies = buildNodeDependencies args;
extraArgs = removeAttrs args [ "name" "dependencies" "buildInputs" "dontStrip" "dontNpmInstall" "unpackPhase" "buildPhase" ];
in
stdenv.mkDerivation {
name = "node-shell-${name}-${version}";
stdenv.mkDerivation ({
name = "node-shell-${name}${if version == null then "" else "-${version}"}";
buildInputs = [ python nodejs ] ++ lib.optional (stdenv.isLinux) utillinux ++ buildInputs;
buildCommand = ''
@ -557,7 +588,7 @@ let
export NODE_PATH=${nodeDependencies}/lib/node_modules
export PATH="${nodeDependencies}/bin:$PATH"
'';
};
} // extraArgs);
in
{
buildNodeSourceDist = lib.makeOverridable buildNodeSourceDist;

View File

@ -1,4 +1,4 @@
# This file has been generated by node2nix 1.9.0. Do not edit!
# This file has been generated by node2nix 1.11.1. Do not edit!
{nodeEnv, fetchurl, fetchgit, nix-gitignore, stdenv, lib, globalBuildInputs ? []}:

View File

@ -1,15 +1,17 @@
# This file has been generated by node2nix 1.9.0. Do not edit!
# This file has been generated by node2nix 1.11.1. Do not edit!
{ pkgs ? import <nixpkgs> { inherit system; }, system ? builtins.currentSystem
, nodejs ? pkgs.nodejs }:
{pkgs ? import <nixpkgs> {
inherit system;
}, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-16_x"}:
let
nodeEnv = import ./node-env.nix {
inherit (pkgs) stdenv lib python2 runCommand writeTextFile;
inherit (pkgs) stdenv lib python2 runCommand writeTextFile writeShellScript;
inherit pkgs nodejs;
libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null;
};
in import ./node-packages.nix {
in
import ./node-packages.nix {
inherit (pkgs) fetchurl nix-gitignore stdenv lib fetchgit;
inherit nodeEnv;
}

View File

@ -1,3 +1,3 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p nodePackages.node2nix
node2nix --lock package-lock.json --composition node.nix
node2nix --lock package-lock.json --composition node.nix --nodejs-16