add direnv and nixify shell function
This commit is contained in:
parent
caeea8a017
commit
7b0a6f338a
@ -18,6 +18,7 @@
|
||||
./workspace/xresources.nix
|
||||
./workspace/barrier.nix
|
||||
./workspace/podman.nix
|
||||
./workspace/direnv.nix
|
||||
./themes.nix
|
||||
./mullvad.nix
|
||||
./applications.nix
|
||||
|
6
modules/workspace/direnv.nix
Normal file
6
modules/workspace/direnv.nix
Normal file
@ -0,0 +1,6 @@
|
||||
{ pkgs, config, ... }: {
|
||||
home-manager.users.alukard.programs.direnv = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
}
|
@ -52,5 +52,25 @@
|
||||
"wgup" = "_ systemctl start wg-quick-wg0.service";
|
||||
"wgdown" = "_ systemctl stop wg-quick-wg0.service";
|
||||
};
|
||||
initExtra = ''
|
||||
nixify() {
|
||||
if [ ! -e ./.envrc ]; then
|
||||
wget -O ./.envrc https://raw.githubusercontent.com/kalbasit/nur-packages/master/pkgs/nixify/envrc
|
||||
sed -i '$s/use_nix.\+/use_nix/' ./.envrc
|
||||
direnv allow
|
||||
fi
|
||||
if [ ! -e shell.nix ]; then
|
||||
cat > shell.nix <<'EOF'
|
||||
{ pkgs ? import <nixpkgs> {} }:
|
||||
pkgs.mkShell {
|
||||
# Hack to SSL Cert error
|
||||
GIT_SSL_CAINFO=/etc/ssl/certs/ca-certificates.crt;
|
||||
SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt;
|
||||
buildInputs = [];
|
||||
}
|
||||
EOF
|
||||
fi
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user