Adjusted update wrapper (phoenix) for flake

This commit is contained in:
Emmet 2023-05-08 21:07:09 -05:00
parent 647295da19
commit 5123054e5d

View file

@ -3,6 +3,8 @@
let let
myName = "emmet"; myName = "emmet";
myDotfilesDir = "~/dotfiles/";
# My shell aliases # My shell aliases
myAliases = { myAliases = {
ls = "exa --icons -l -T -L=1"; ls = "exa --icons -l -T -L=1";
@ -20,13 +22,19 @@ let
myPhoenixScript = '' myPhoenixScript = ''
if [ "$1" = "sync" ]; then if [ "$1" = "sync" ]; then
if [ "$2" != "user" ]; then if [ "$2" != "user" ]; then
sudo nixos-rebuild switch -I nixos-config=''+myNixConfigurationFilePath+''; pushd ''+myDotfilesDir+'';
sudo nixos-rebuild switch --flake .#;
popd;
fi fi
if [ "2" != "system" ]; then if [ "2" != "system" ]; then
home-manager switch -f ''+myHomeManagerFilePath+''; pushd ''+myDotfilesDir+'';
home-manager switch --flake .#''+myName+'';
popd;
fi fi
elif [ "$1" = "update" ]; then elif [ "$1" = "update" ]; then
nix-channel --update; pushd ''+myDotfilesDir+'';
nix flake update;
popd;
fi fi
''; '';
@ -277,6 +285,7 @@ in
# Fonts # Fonts
nerdfonts nerdfonts
powerline
inconsolata inconsolata
inconsolata-nerdfont inconsolata-nerdfont
iosevka iosevka