top-level should direnv fine now (hwtr)

pull/5/head
pegasust 2023-01-12 11:04:56 -07:00
parent c6d74c6b3e
commit 313a5e7f3e
3 changed files with 33 additions and 29 deletions

View File

@ -96,7 +96,7 @@
unit_tests = lib.runTests unit_tests;
secrets = import ./secrets final_inputs;
debug = {
inherit final_inputs hosts users modules lib inputs_w_pkgs unit_tests pkgs;
inherit final_inputs hosts users modules lib inputs_w_lib unit_tests pkgs;
};
};
}

View File

@ -6,34 +6,36 @@ flake_input@{ kpcli-py, nixgl, rust-overlay, neovim-nightly-overlay, ... }: [
neovim-nightly-overlay.overlay
(final: prev:
let
nightlyRustWithExts = exts: final.rust-bin.selectLatestNightlyWith (
toolchain: toolchain.minimal.override.extensions = exts;
);
# https://rust-lang.github.io/rustup/concepts/profiles.html
rust-default-components = ["rust-docs" "rustfmt" "clippy"];
rust-dev-components = rust-default-components ++ ["rust-src" "rust-analyzer" "miri"];
in
{
# use python3.9, which works because of cython somehow?
kpcli-py = final.poetry2nix.mkPoetryApplication {
projectDir = kpcli-py;
python = final.python39;
overrides = final.poetry2nix.defaultPoetryOverrides.extend (self: super: {
# tableformatter requires setuptools
tableformatter = super.tableformatter.overridePythonAttrs (
old: {
buildInputs = (old.buildInputs or [ ]) ++ [ super.setuptools super.cython_3 ];
}
);
});
};
rust4devs = nightlyRustWithExts rust-dev-components;
rust4cargo = nightlyRustWithExts [];
rust4normi = nightlyRustWIthExts rust-default-components;
})
(final: prev:
let
nightlyRustWithExts = exts: final.rust-bin.selectLatestNightlyWith (
toolchain: (toolchain.minimal.override {
extensions = exts;
})
);
# https://rust-lang.github.io/rustup/concepts/profiles.html
rust-default-components = [ "rust-docs" "rustfmt" "clippy" ];
rust-dev-components = rust-default-components ++ [ "rust-src" "rust-analyzer" "miri" ];
in
{
# use python3.9, which works because of cython somehow?
kpcli-py = final.poetry2nix.mkPoetryApplication {
projectDir = kpcli-py;
python = final.python39;
overrides = final.poetry2nix.defaultPoetryOverrides.extend (self: super: {
# tableformatter requires setuptools
tableformatter = super.tableformatter.overridePythonAttrs (
old: {
buildInputs = (old.buildInputs or [ ]) ++ [ super.setuptools super.cython_3 ];
}
);
});
};
rust4devs = nightlyRustWithExts rust-dev-components;
rust4cargo = nightlyRustWithExts [ ];
rust4normi = nightlyRustWithExts rust-default-components;
})
]

View File

@ -13,6 +13,8 @@ rm -rf ~/.local/share/nvim/mason
# test if we have home-manager, if not, attempt to use nix to put home-manager to
# our environment
if [ $(home-manager >/dev/null 2>&1) ]; then
# highly likely we don't even have nix support to start with, so let's fix that
sudo mv /etc/
nix-shell -p home-manager --run "home-manager switch --flake $HOME_MANAGER_DIR"
else
home-manager switch -b backup --flake "$HOME_MANAGER_DIR"