summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile5
-rw-r--r--base/ssh_environment2
-rw-r--r--default.nix9
3 files changed, 13 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index e330c37..516229d 100644
--- a/Makefile
+++ b/Makefile
@@ -30,5 +30,8 @@ install-tmpfiles:
systemctl --user enable systemd-tmpfiles-setup.service
systemctl --user enable --now systemd-tmpfiles-clean.timer
+install-ssh-env:
+ mkdir -p ~/.ssh
+ cp base/ssh_environment ~/.ssh/environment
-install: setup-pulseaudio install-rm-keyfile install-fonts install-tmpfiles install-loadout
+install: setup-pulseaudio install-rm-keyfile install-fonts install-tmpfiles install-ssh-env install-loadout
diff --git a/base/ssh_environment b/base/ssh_environment
new file mode 100644
index 0000000..77b2b01
--- /dev/null
+++ b/base/ssh_environment
@@ -0,0 +1,2 @@
+PATH=/home/mediocregopher/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/usr/local/sbin:/usr/local/bin:/usr/bin
+
diff --git a/default.nix b/default.nix
index 112444d..ebe9b92 100644
--- a/default.nix
+++ b/default.nix
@@ -44,8 +44,7 @@ in rec {
};
- git = pkgs.writeScriptBin "git" ''
- #!${pkgs.bash}/bin/bash
+ gitWrapped = pkgs.writeShellScript "git" ''
export XDG_CONFIG_HOME=${gitConfig}
bin="${pkgs.git}/bin/git"
@@ -60,6 +59,12 @@ in rec {
exec "$bin" "$@"
'';
+ git = pkgs.runCommand "mediocregopher-git" {} ''
+ cp -rL "${pkgs.git}" "$out"
+ chmod -R +rwX "$out"
+ cp "${gitWrapped}" "$out"/bin/git
+ '';
+
bin = pkgs.buildEnv {
name = "mediocregopher-bin";
paths = [