Compare commits
No commits in common. "34ef52d5b48a3839a054e48909feeb3e056783b6" and "0b3403877fa535585b5f46706806906f8fe70e56" have entirely different histories.
34ef52d5b4
...
0b3403877f
33
flake.lock
33
flake.lock
|
@ -89,11 +89,11 @@
|
||||||
"utils": "utils"
|
"utils": "utils"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1672770368,
|
"lastModified": 1672349765,
|
||||||
"narHash": "sha256-iO6Z9blIe8dcPh3VT2nkej9EimORCoskGQR6xNjICWI=",
|
"narHash": "sha256-Ul3lSGglgHXhgU3YNqsNeTlRH1pqxbR64h+2hM+HtnM=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "d01e7280ad7d13a5a0fae57355bd0dbfe5b81969",
|
"rev": "dd99675ee81fef051809bc87d67eb07f5ba022e8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -124,14 +124,17 @@
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1,
|
"lastModified": 1661367362,
|
||||||
"narHash": "sha256-KP+2qdZlhmRkrafuuEofg7YnNdVmGV95ipvpuqmJneI=",
|
"narHash": "sha256-Qc8MXcV+YCPREu8kk6oggk23ZBKLqeQRAIsLbHEviPE=",
|
||||||
"path": "out-of-tree/nixGL",
|
"owner": "guibou",
|
||||||
"type": "path"
|
"repo": "nixGL",
|
||||||
|
"rev": "7165ffbccbd2cf4379b6cd6d2edd1620a427e5ae",
|
||||||
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"path": "out-of-tree/nixGL",
|
"owner": "guibou",
|
||||||
"type": "path"
|
"repo": "nixGL",
|
||||||
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
|
@ -151,11 +154,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1672617983,
|
"lastModified": 1672262501,
|
||||||
"narHash": "sha256-68WDiCBs631mbDDk4UAKdGURKcsfW6hjb7wgudTAe5o=",
|
"narHash": "sha256-ZNXqX9lwYo1tOFAqrVtKTLcJ2QMKCr3WuIvpN8emp7I=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "0fc9fca9c8d43edd79d33fea0dd8409d7c4580f4",
|
"rev": "e182da8622a354d44c39b3d7a542dc12cd7baa5f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -198,11 +201,11 @@
|
||||||
"nixpkgs": "nixpkgs_3"
|
"nixpkgs": "nixpkgs_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1672712534,
|
"lastModified": 1672367043,
|
||||||
"narHash": "sha256-8S0DdMPcbITnlOu0uA81mTo3hgX84wK8S9wS34HEFY4=",
|
"narHash": "sha256-4/40kfJysfDEfSpXJ3inuMetn40czz5Mh73SjxsKTX0=",
|
||||||
"owner": "oxalica",
|
"owner": "oxalica",
|
||||||
"repo": "rust-overlay",
|
"repo": "rust-overlay",
|
||||||
"rev": "69fb7bf0a8c40e6c4c197fa1816773774c8ac59f",
|
"rev": "e6b2214363f5e18576a3b2ca0e0483d8f42fe531",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
nixgl.url = "path:out-of-tree/nixGL";
|
nixgl.url = "github:guibou/nixGL";
|
||||||
rust-overlay.url = "github:oxalica/rust-overlay";
|
rust-overlay.url = "github:oxalica/rust-overlay";
|
||||||
# Allows default.nix to call onto flake.nix. Useful for nix eval and automations
|
# Allows default.nix to call onto flake.nix. Useful for nix eval and automations
|
||||||
flake-compat = {
|
flake-compat = {
|
||||||
|
|
|
@ -56,5 +56,9 @@ in
|
||||||
KEEPASSDB_TIMEOUT = cfg.copy_timeout_secs;
|
KEEPASSDB_TIMEOUT = cfg.copy_timeout_secs;
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
# xdg.dataFile."keepass.kdbx".path =
|
||||||
|
# base.shells.shellAliases = {
|
||||||
|
# kp = "kpcli --kdb=${cfg.path}";
|
||||||
|
# };
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,12 +47,9 @@ let
|
||||||
|
|
||||||
# Language-specific stuffs
|
# Language-specific stuffs
|
||||||
pkgs.sumneko-lua-language-server
|
pkgs.sumneko-lua-language-server
|
||||||
# TODO: the devShell should provide rust-analyzer so that
|
pkgs.rust-analyzer
|
||||||
# cargo test builds binaries compatible with rust-analyzer
|
rust_pkgs
|
||||||
|
pkgs.evcxr # Rust REPL for Conjure!
|
||||||
# pkgs.rust-analyzer
|
|
||||||
# rust_pkgs
|
|
||||||
# pkgs.evcxr # Rust REPL for Conjure!
|
|
||||||
|
|
||||||
# Python3 as alternative to bash scripts :^)
|
# Python3 as alternative to bash scripts :^)
|
||||||
# (pkgs.python310Full.withPackages (pypkgs: [
|
# (pkgs.python310Full.withPackages (pypkgs: [
|
||||||
|
@ -80,11 +77,6 @@ in
|
||||||
vimAlias = true;
|
vimAlias = true;
|
||||||
withPython3 = true;
|
withPython3 = true;
|
||||||
withNodeJs = true;
|
withNodeJs = true;
|
||||||
# Attempt 4: Correct way to make neovim aware of packages
|
|
||||||
# homeConfigurations.config.programs.neovim takes UNWRAPPED neovim
|
|
||||||
# and wraps it.
|
|
||||||
# Ideally, we build our own neovim and add that to config.home.packages
|
|
||||||
# to share it with nixOS. But we don't really need to share
|
|
||||||
extraPackages = nvim_pkgs;
|
extraPackages = nvim_pkgs;
|
||||||
# only for here for archive-documentation
|
# only for here for archive-documentation
|
||||||
# extraPython3Packages = (pypkgs: [
|
# extraPython3Packages = (pypkgs: [
|
||||||
|
|
|
@ -69,11 +69,11 @@
|
||||||
"utils": "utils"
|
"utils": "utils"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1672770368,
|
"lastModified": 1672349765,
|
||||||
"narHash": "sha256-iO6Z9blIe8dcPh3VT2nkej9EimORCoskGQR6xNjICWI=",
|
"narHash": "sha256-Ul3lSGglgHXhgU3YNqsNeTlRH1pqxbR64h+2hM+HtnM=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "d01e7280ad7d13a5a0fae57355bd0dbfe5b81969",
|
"rev": "dd99675ee81fef051809bc87d67eb07f5ba022e8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -106,11 +106,11 @@
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1,
|
"lastModified": 1,
|
||||||
"narHash": "sha256-KP+2qdZlhmRkrafuuEofg7YnNdVmGV95ipvpuqmJneI=",
|
"narHash": "sha256-KP+2qdZlhmRkrafuuEofg7YnNdVmGV95ipvpuqmJneI=",
|
||||||
"path": "./../../out-of-tree/nixGL",
|
"path": "/nix/store/qcm4676fqkcdrizjkn4j0796ybddwlxm-source/out-of-tree/nixGL",
|
||||||
"type": "path"
|
"type": "path"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"path": "./../../out-of-tree/nixGL",
|
"path": "/nix/store/qcm4676fqkcdrizjkn4j0796ybddwlxm-source/out-of-tree/nixGL",
|
||||||
"type": "path"
|
"type": "path"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -131,11 +131,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1672617983,
|
"lastModified": 1672262501,
|
||||||
"narHash": "sha256-68WDiCBs631mbDDk4UAKdGURKcsfW6hjb7wgudTAe5o=",
|
"narHash": "sha256-ZNXqX9lwYo1tOFAqrVtKTLcJ2QMKCr3WuIvpN8emp7I=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "0fc9fca9c8d43edd79d33fea0dd8409d7c4580f4",
|
"rev": "e182da8622a354d44c39b3d7a542dc12cd7baa5f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -178,11 +178,11 @@
|
||||||
"nixpkgs": "nixpkgs_3"
|
"nixpkgs": "nixpkgs_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1672712534,
|
"lastModified": 1672367043,
|
||||||
"narHash": "sha256-8S0DdMPcbITnlOu0uA81mTo3hgX84wK8S9wS34HEFY4=",
|
"narHash": "sha256-4/40kfJysfDEfSpXJ3inuMetn40czz5Mh73SjxsKTX0=",
|
||||||
"owner": "oxalica",
|
"owner": "oxalica",
|
||||||
"repo": "rust-overlay",
|
"repo": "rust-overlay",
|
||||||
"rev": "69fb7bf0a8c40e6c4c197fa1816773774c8ac59f",
|
"rev": "e6b2214363f5e18576a3b2ca0e0483d8f42fe531",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
nixgl.url = "path:./../../out-of-tree/nixGL";
|
nixgl.url = "./../../out-of-tree/nixGL";
|
||||||
rust-overlay.url = "github:oxalica/rust-overlay";
|
rust-overlay.url = "github:oxalica/rust-overlay";
|
||||||
# Allows default.nix to call onto flake.nix. Useful for nix eval and automations
|
# Allows default.nix to call onto flake.nix. Useful for nix eval and automations
|
||||||
flake-compat = {
|
flake-compat = {
|
||||||
|
|
|
@ -22,11 +22,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1672525397,
|
"lastModified": 1671359686,
|
||||||
"narHash": "sha256-WASDnyxHKWVrEe0dIzkpH+jzKlCKAk0husv0f/9pyxg=",
|
"narHash": "sha256-3MpC6yZo+Xn9cPordGz2/ii6IJpP2n8LE8e/ebUXLrs=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "8ba56d7c0d7490680f2d51ba46a141eca7c46afa",
|
"rev": "04f574a1c0fde90b51bf68198e2297ca4e7cccf4",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -7,9 +7,6 @@ echo "SCRIPT_DIR: ${SCRIPT_DIR}"
|
||||||
|
|
||||||
HOME_MANAGER_DIR="${SCRIPT_DIR}/../nix-conf/home-manager"
|
HOME_MANAGER_DIR="${SCRIPT_DIR}/../nix-conf/home-manager"
|
||||||
|
|
||||||
# Mason is bad: it puts binaries onto xdg.data
|
|
||||||
rm -rf ~/.local/share/nvim/mason
|
|
||||||
|
|
||||||
# test if we have home-manager, if not, attempt to use nix to put home-manager to
|
# test if we have home-manager, if not, attempt to use nix to put home-manager to
|
||||||
# our environment
|
# our environment
|
||||||
if [ $(home-manager >/dev/null 2>&1) ]; then
|
if [ $(home-manager >/dev/null 2>&1) ]; then
|
||||||
|
|
|
@ -12,8 +12,4 @@
|
||||||
path = ./rust-monorepo;
|
path = ./rust-monorepo;
|
||||||
description = "Opinionated Rust monorepo, extended from ./rust, using Cargo workspace";
|
description = "Opinionated Rust monorepo, extended from ./rust, using Cargo workspace";
|
||||||
};
|
};
|
||||||
ts-turborepo = {
|
|
||||||
path = ./ts/turborepo;
|
|
||||||
description = "Typescript monorepo with tsconfig, eslint, but with minimal framework attached";
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,21 +11,23 @@
|
||||||
let
|
let
|
||||||
overlays = [ rust-overlay.overlays.default ];
|
overlays = [ rust-overlay.overlays.default ];
|
||||||
pkgs = import nixpkgs { inherit system overlays; };
|
pkgs = import nixpkgs { inherit system overlays; };
|
||||||
rust_pkgs = (pkgs.rust-bin.selectLatestNightlyWith
|
|
||||||
(
|
|
||||||
toolchain:
|
|
||||||
toolchain.default.override {
|
|
||||||
extensions = [ "rust-src" "rust-analyzer" "rust-docs" "clippy" "miri" ];
|
|
||||||
}
|
|
||||||
));
|
|
||||||
naersk-lib = pkgs.callPackage naersk { };
|
naersk-lib = pkgs.callPackage naersk { };
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
defaultPackage = naersk-lib.buildPackage ./.;
|
defaultPackage = naersk-lib.buildPackage ./.;
|
||||||
devShell = with pkgs; mkShell {
|
devShell = with pkgs; mkShell {
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
rust_pkgs
|
(pkgs.rust-bin.selectLatestNightlyWith
|
||||||
|
(
|
||||||
|
toolchain:
|
||||||
|
toolchain.default.override {
|
||||||
|
extensions = [ "rust-src" ];
|
||||||
|
}
|
||||||
|
))
|
||||||
|
pkgs.rust-analyzer
|
||||||
|
pkgs.bacon # rust background code checker
|
||||||
];
|
];
|
||||||
|
RUST_SRC_PATH = rustPlatform.rustLibSrc;
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
# nix flake update # is this even needed?
|
# nix flake update # is this even needed?
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -1,53 +0,0 @@
|
||||||
{
|
|
||||||
description = "Provides devShell for Nodejs + pnpm";
|
|
||||||
|
|
||||||
inputs = {
|
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
|
||||||
# https://github.com/vercel/turbo/issues/2293#issuecomment-1296094236
|
|
||||||
# work-around for turbo-repo on nix
|
|
||||||
turbo.url = "github:dlip/turbo";
|
|
||||||
};
|
|
||||||
|
|
||||||
outputs = { self, turbo, flake-utils, nixpkgs }:
|
|
||||||
with flake-utils; lib.eachSystem lib.defaultSystems (sys:
|
|
||||||
let
|
|
||||||
overlays = [ turbo.overlay ];
|
|
||||||
# pkgs is our tweaked nixpkgs
|
|
||||||
pkgs = import nixpkgs { system = sys; overlays = overlays; };
|
|
||||||
shellMsg = ''
|
|
||||||
echo "Hello from nix ${sys}"
|
|
||||||
echo "Local development may use our remote planetscale database (pscale login && pnpm dev:infra; pnpm dev)"
|
|
||||||
echo "Or from the specified docker-compose.yml (pnpm dev:local_infra && pnpm dev)"
|
|
||||||
echo "See more on CONTRIBUTING.md"
|
|
||||||
'';
|
|
||||||
in
|
|
||||||
{
|
|
||||||
devShell = pkgs.mkShell {
|
|
||||||
nativeBuildInputs = [ pkgs.bashInteractive ];
|
|
||||||
buildInputs = [
|
|
||||||
pkgs.nodejs-18_x
|
|
||||||
pkgs.nodePackages.pnpm
|
|
||||||
pkgs.nodePackages.prisma
|
|
||||||
pkgs.prisma-engines
|
|
||||||
pkgs.turbo
|
|
||||||
# pkgs.turbo-tooling
|
|
||||||
pkgs.jq
|
|
||||||
pkgs.pscale
|
|
||||||
pkgs.act # Github workflow
|
|
||||||
];
|
|
||||||
shellHook =
|
|
||||||
# https://github.com/prisma/prisma/issues/3026#issuecomment-927258138
|
|
||||||
# nix-direnv is required (impure build?) https://github.com/nix-community/nix-direnv
|
|
||||||
''
|
|
||||||
export PRISMA_MIGRATION_ENGINE_BINARY="${pkgs.prisma-engines}/bin/migration-engine"
|
|
||||||
export PRISMA_QUERY_ENGINE_BINARY="${pkgs.prisma-engines}/bin/query-engine"
|
|
||||||
export PRISMA_QUERY_ENGINE_LIBRARY="${pkgs.prisma-engines}/lib/libquery_engine.node"
|
|
||||||
export PRISMA_INTROSPECTION_ENGINE_BINARY="${pkgs.prisma-engines}/bin/introspection-engine"
|
|
||||||
export PRISMA_FMT_BINARY="${pkgs.prisma-engines}/bin/prisma-fmt"
|
|
||||||
export TURBO_BINARY_PATH="${pkgs.turbo}/bin/turbo"
|
|
||||||
pnpm install
|
|
||||||
'' + shellMsg;
|
|
||||||
};
|
|
||||||
});
|
|
||||||
}
|
|
Loading…
Reference in New Issue