Skip to content

Commit 644bb3b

Browse files
committed
nix: add download-dotfiles command
1 parent 4fdef81 commit 644bb3b

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

nixos/bin/download-dotfiles.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# download dotfiles from GitHub repository
2+
if [ ! -d "$HOME/dotfiles" ]; then
3+
echo "Cloning dotfiles to $HOME/dotfiles..."
4+
git clone [email protected]:zahidkizmaz/dotfiles.git "$HOME/dotfiles"
5+
else
6+
echo "Dotfiles already exist in $HOME/dotfiles, skipping clone."
7+
fi

nixos/bin/link-dotfiles.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ declare -A appMappings=(
1919
[nvim]="nvim"
2020
[pgcli]="pgcli"
2121
[rustfmt]="rustfmt"
22+
[sesh]="sesh"
2223
[starship]="starship"
2324
[tmux]="tmux"
2425
[tofi]="tofi"

nixos/modules/dotfiles.nix

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
{ pkgs, ... }:
22
let
3+
download-dotfiles = pkgs.writeShellApplication {
4+
name = "download-dotfiles";
5+
runtimeInputs = with pkgs; [
6+
bash
7+
gitMinimal
8+
];
9+
text = builtins.readFile ../bin/download-dotfiles.sh;
10+
};
311
link-dotfiles = pkgs.writeShellApplication {
412
name = "link-dotfiles";
513
runtimeInputs = with pkgs; [
@@ -19,6 +27,8 @@ in
1927
environment.systemPackages = with pkgs; [
2028
gitMinimal
2129
gh
30+
31+
download-dotfiles
2232
link-dotfiles
2333
daily-update
2434
];

0 commit comments

Comments
 (0)