diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake diff --git a/.gitignore b/.gitignore index 79518f7..4c0db6f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ node_modules +.petalpkgs # Output .output @@ -6,6 +7,9 @@ node_modules /.svelte-kit /build +# Direnv cache +/.direnv + # OS .DS_Store Thumbs.db diff --git a/flake.lock b/flake.lock index 0136f65..91e4e92 100644 --- a/flake.lock +++ b/flake.lock @@ -34,10 +34,26 @@ "type": "github" } }, + "petalpkgs": { + "locked": { + "lastModified": 1727211631, + "narHash": "sha256-o1JyfLf2U4gMGnc/ZiYw9nPjbOEA7qUUYAcUBegSSjY=", + "ref": "refs/heads/main", + "rev": "568a619fe669c876f774e703d0c3a1aff5c8d639", + "revCount": 686265, + "type": "git", + "url": "https://cl.forkos.org/nixpkgs" + }, + "original": { + "type": "git", + "url": "https://cl.forkos.org/nixpkgs" + } + }, "root": { "inputs": { "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs", + "petalpkgs": "petalpkgs" } }, "systems": { diff --git a/flake.nix b/flake.nix index 1a63c29..db06897 100644 --- a/flake.nix +++ b/flake.nix @@ -2,9 +2,10 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; flake-utils.url = "github:numtide/flake-utils"; + petalpkgs.url = "git+https://cl.forkos.org/nixpkgs"; }; - outputs = { self, nixpkgs, flake-utils }: + outputs = { self, nixpkgs, flake-utils, petalpkgs }: flake-utils.lib.eachDefaultSystem (system: let pkgs = import nixpkgs { inherit system; }; in { @@ -13,6 +14,10 @@ LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [ pkgs.stdenv.cc.cc.lib ]; buildInputs = with pkgs; [ bun ]; + + shellHook = '' + ln -sf ${petalpkgs.path} .petalpkgs + ''; }; # ... and remote deployment.