Compare commits

...

3 commits

3 changed files with 9 additions and 31 deletions

View file

@ -6,6 +6,11 @@ Nix home-manager configuration files.
Can be used on any Linux-based system if the [[https://nixos.org/][nix]] package manager is 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]]. 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 * Password store setup
** Transfer GPG key(s) ** Transfer GPG key(s)
#+begin_src bash #+begin_src bash

View file

@ -73,6 +73,10 @@
]; ];
in { in {
packages.x86_64-linux = {inherit (home-manager.packages.x86_64-linux) default;}; 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 devShells.x86_64-linux.default = let
pkgs = import nixpkgs {system = "x86_64-linux";}; pkgs = import nixpkgs {system = "x86_64-linux";};
in in

View file

@ -24,34 +24,3 @@ for i in "${!SYNC_DIRS[@]}"; do
git status --porcelain git status --porcelain
) )
done 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