Compare commits

..

No commits in common. "2b53953f532f557c22781179d3086186a5fd927f" and "a15a58450d0e7a5fa96c3270558dce9ae7c21efb" have entirely different histories.

3 changed files with 31 additions and 9 deletions

View file

@ -6,11 +6,6 @@ Nix home-manager configuration files.
Can be used on any Linux-based system if the [[https://nixos.org/][nix]] package manager is
installed, but works best with [[https://git.xenia.me.uk/pixelifytica/nixos.git][a NixOS system]].
To set up without cloning the repository, run:
#+begin_src bash
nix run "git+https://git.xenia.me.uk/pixelifytica/home-manager.git?ref=main" -- --flake "git+https://git.xenia.me.uk/pixelifytica/home-manager.git?ref=main"
#+end_src
* Password store setup
** Transfer GPG key(s)
#+begin_src bash

View file

@ -73,10 +73,6 @@
];
in {
packages.x86_64-linux = {inherit (home-manager.packages.x86_64-linux) default;};
apps.x86_64-linux.default = {
program = "${self.packages.x86_64-linux.default}/bin/home-manager";
type = "app";
};
devShells.x86_64-linux.default = let
pkgs = import nixpkgs {system = "x86_64-linux";};
in

View file

@ -24,3 +24,34 @@ for i in "${!SYNC_DIRS[@]}"; do
git status --porcelain
)
done
# Pull NixOS, home-manager and Emacs configs if simple fast-forward
PULL_DIRS=(
"${XDG_CONFIG_HOME:-$HOME/.config}/nixos"
"${XDG_CONFIG_HOME:-$HOME/.config}/home-manager"
"${XDG_CONFIG_HOME:-$HOME/.config}/emacs"
)
PULL_URLS=(
"https://git.xenia.me.uk/pixelifytica/nixos.git"
"https://git.xenia.me.uk/pixelifytica/home-manager.git"
"https://git.xenia.me.uk/pixelifytica/emacs.git"
)
for i in "${!PULL_DIRS[@]}"; do
DIRECTORY="${PULL_DIRS[$i]}"
URL="${PULL_URLS[$i]}"
echo "--- pull: $DIRECTORY ---"
if [ ! -d "$DIRECTORY" ]; then
git clone "$URL" "$DIRECTORY"
fi
(
cd "$DIRECTORY" || exit
if [ "$(git branch --show-current)" = "main" ]; then
git remote set-url origin "$URL"
git pull --ff --ff-only
git push
else
echo "Not syncing repo $DIRECTORY on branch $(git branch --show-current)"
fi
git status --porcelain
)
done