From 72b46e8fe80d9c8c708602387b4d46cce6bb266d Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Mon, 28 Feb 2022 13:53:28 +0100 Subject: feat(users/Profpatsch/nix-home): add terminal-emulator to ~/bin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is an ad-hoc way of adding “well known” executables to my user directory for now. It’s not pretty, it is what it is. Change-Id: I93ee1d75b48536692da86485f0ac517aa1935ec4 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5335 Reviewed-by: Profpatsch Tested-by: BuildkiteCI --- users/Profpatsch/nix-home/default.nix | 86 ++++++++++++++++++++++++----------- 1 file changed, 59 insertions(+), 27 deletions(-) (limited to 'users/Profpatsch/nix-home/default.nix') diff --git a/users/Profpatsch/nix-home/default.nix b/users/Profpatsch/nix-home/default.nix index fee70f3d6d..3f0b7c9c39 100644 --- a/users/Profpatsch/nix-home/default.nix +++ b/users/Profpatsch/nix-home/default.nix @@ -13,6 +13,7 @@ let runStow = { # “stow package” to stow (see manpage) + # TODO: allow this function to un-stow multiple packages! stowPackage , # “target directory” to stow in (see manpage) targetDir @@ -139,33 +140,64 @@ let })) ]; -in + scriptsStow = + lib.pipe { } [ + (_: makeStowDir [{ + stowPackage = "scripts"; + originalDir = pkgs.linkFarm "scripts-farm" + ([ + { + name = "scripts/ytextr"; + path = depot.users.Profpatsch.ytextr; + } + ] + ++ + (lib.pipe depot.users.Profpatsch.aliases [ + readTreeNamespaceDrvs + (map ({ name, drv }: { + name = "scripts/${name}"; + path = drv; + })) + ])); + }]) + (d: runStow { + stowDir = d; + stowPackage = "scripts"; + targetDir = "/home/philip"; + stowDirOriginPath = "/home/philip/.local/share/nix-home/stow-origin"; + }) + ]; -# TODO: temp setup -lib.pipe { } [ - (_: makeStowDir [{ - stowPackage = "scripts"; - originalDir = pkgs.linkFarm "scripts-farm" - ([ - { - name = "scripts/ytextr"; - path = depot.users.Profpatsch.ytextr; - } - ] - ++ - (lib.pipe depot.users.Profpatsch.aliases [ - readTreeNamespaceDrvs - (map ({ name, drv }: { - name = "scripts/${name}"; - path = drv; - })) - ])); - }]) - (d: runStow { - stowDir = d; - stowPackage = "scripts"; - targetDir = "/home/philip"; - stowDirOriginPath = "/home/philip/.local/share/nix-home/stow-origin"; - }) + + terminalEmulatorStow = + lib.pipe { } [ + (_: makeStowDir [{ + stowPackage = "terminal-emulator"; + originalDir = pkgs.linkFarm "terminal-emulator-farm" + ([ + { + name = "bin/terminal-emulator"; + path = depot.users.Profpatsch.alacritty; + } + ]); + + }]) + (d: runStow { + stowDir = d; + stowPackage = "terminal-emulator"; + targetDir = "/home/philip"; + # TODO: this should only be done once, in a single runStow instead of multiple + stowDirOriginPath = "/home/philip/.local/share/nix-home/stow-origin-terminal-emulator"; + }) + ]; + +in + +# TODO: run multiple stows with runStow? + # TODO: temp setup +depot.nix.writeExecline "nix-home" { } [ + "if" + [ scriptsStow ] + terminalEmulatorStow ] -- cgit 1.4.1