feat: render config files
This commit is contained in:
5 files changed
+264
-1
No files matched your search
Executable
+15
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
# Fake nix: `nix build --no-link --print-out-paths .#ATTR` -> fabricates a store-like dir.
|
||||
echo "nix $*" >> "${FAKE_NIX_LOG:-/dev/null}"
|
||||
[[ -z "${FAKE_NIX_FAIL:-}" ]] || { echo "error: attribute missing" >&2; exit 1; }
|
||||
attr="${@: -1}"
|
||||
out="${FAKE_NIX_STORE:?}/abc-home-manager-generation"
|
||||
mkdir -p "$out/home-files/.config/helix" "$out/home-files/.config/git" "$out/store"
|
||||
echo 'theme = "base16"' > "$out/store/helix.toml"; chmod 444 "$out/store/helix.toml"
|
||||
ln -sfn "$out/store/helix.toml" "$out/home-files/.config/helix/config.toml" # like real HM: symlink into store
|
||||
echo '[user]
|
||||
name = alex' > "$out/store/gitconfig"; chmod 444 "$out/store/gitconfig"
|
||||
ln -sfn "$out/store/gitconfig" "$out/home-files/.gitconfig"
|
||||
[[ -z "${FAKE_NIX_NOHOMEFILES:-}" ]] || rm -rf "$out/home-files"
|
||||
echo "$attr" > "$out/attr"
|
||||
echo "$out"
|
||||
Reference in new issue
Block a user