From 411aa1a0ccdf0064f5d14844e5047ecd7c180707 Mon Sep 17 00:00:00 2001 From: Quentin Aristote Date: Mon, 20 Sep 2021 21:43:31 +0200 Subject: factorise path to code/nix --- home/config/environment.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'home/config') diff --git a/home/config/environment.nix b/home/config/environment.nix index bc1c85c..e09dbc4 100644 --- a/home/config/environment.nix +++ b/home/config/environment.nix @@ -32,13 +32,14 @@ programs.bash = { enable = true; - shellAliases = { + shellAliases = let nix-code-path = "~/code/nix"; + in { amimullvad = "curl -Ls https://am.i.mullvad.net/connected"; - nixos-update-config = "sudo cp -rf ~/code/nix/latitude-7490/nixos/ /etc/"; + nixos-update-config = "sudo cp -rf ${nix-code-path}/latitude-7490/nixos/ /etc/"; rm = "rm -f"; ssh = "TERM=xterm-256color ssh"; mkenv = '' - cp ~/code/nix/shells/shell.nix . ; + cp ${nix-code-path}/shells/shell.nix . ; echo "use_nix" >> .envrc ; direnv allow ; $EDITOR shell.nix ; -- cgit v1.2.3