diff --git a/README.md b/README.md index 3cc9fa5..94285f8 100644 --- a/README.md +++ b/README.md @@ -114,32 +114,32 @@ Host myvps Then just SSH in like normal. This will launch you into fish, if that fails, into nu and so on... -## Common Mistakes + -### Using `~` in the `SHELLS` variable + -So, the way `SHELLS` is handled is like so: -1. Split the variable into a list of shells using `:`. -2. Searches PATH for the shell, invokes it if it can find it there. -3. If it can't find the shell there, assumes the shell is a file. - If it is an absolute path, it directly invokes the executable, if - it isn'it, joins the path with the current working directory before executing. + + + + + + -Did you notice something? Yup, it doesn't expand the tilde (`~`)! -But no worries, you don't need it anyway as the PWD of your login shell -(in this case, Crash) is always your home directory. So if you wanted to do + + + -```shell -SHELLS=~/.config/shell # Won't work! -``` + + + -You can do: + -```shell -SHELLS=.config/shell # WILL work! -``` + + + -Instead and it will work perfectly fine. + ## Credits diff --git a/flake.lock b/flake.lock index f90f977..2062d0b 100644 --- a/flake.lock +++ b/flake.lock @@ -18,7 +18,23 @@ }, "root": { "inputs": { - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs", + "systems": "systems" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" } } }, diff --git a/flake.nix b/flake.nix index e9a61be..74e889e 100644 --- a/flake.nix +++ b/flake.nix @@ -6,12 +6,15 @@ extra-trusted-public-keys = "cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="; }; - inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + systems.url = "github:nix-systems/default"; + }; - outputs = { self, nixpkgs }: let + outputs = { self, nixpkgs, systems }: let inherit (nixpkgs) lib; - forEachSystem = lib.genAttrs [ "x86_64-linux" "aarch64-linux" "riscv64-linux" ]; + forEachSystem = lib.genAttrs (import systems); in { devShell = forEachSystem (system: with nixpkgs.legacyPackages.${system}; mkShell { packages = [ diff --git a/package.nix b/package.nix index 006bc8d..02765f8 100644 --- a/package.nix +++ b/package.nix @@ -2,7 +2,7 @@ lib, stdenvNoCC, - zig_0_12, + zig, bashInteractive, fallbackShell ? bashInteractive, @@ -20,7 +20,7 @@ in stdenvNoCC.mkDerivation { dontCheck = true; nativeBuildInputs = [ - zig_0_12.hook + zig.hook ]; zigBuildFlags = [ @@ -33,6 +33,7 @@ in stdenvNoCC.mkDerivation { description = "A user configurable login shell wrapper"; homepage = "https://github.com/RGBCube/crash"; license = licenses.mit; + mainProgram = "crash"; platforms = platforms.linux; maintainers = with maintainers; [ RGBCube ]; };