nix: manage dotfiles in nix
This commit is contained in:
parent
0b62f0d2c3
commit
81632fb8d4
3 changed files with 9 additions and 36 deletions
25
00-sync.sh
25
00-sync.sh
|
@ -1,25 +0,0 @@
|
|||
#!/bin/sh
|
||||
PLATFORM=$(uname)
|
||||
for node in $(ls); do
|
||||
if [ -f "$node" ]; then
|
||||
echo "Skipping $node"
|
||||
continue
|
||||
fi
|
||||
|
||||
SRC="$PWD/$node"
|
||||
DEST="$HOME/.config/$node"
|
||||
|
||||
echo "Linking $SRC to $DEST"
|
||||
case $PLATFORM in
|
||||
"Linux")
|
||||
ln --force -sn "$SRC" "$DEST"
|
||||
;;
|
||||
"Darwin")
|
||||
ln -F -sn "$SRC" "$DEST"
|
||||
;;
|
||||
*)
|
||||
echo "Unsupported Operating System."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
|
@ -35,19 +35,17 @@
|
|||
pass
|
||||
];
|
||||
|
||||
# Home Manager is pretty good at managing dotfiles. The primary way to manage
|
||||
# plain files is through 'home.file'.
|
||||
home.file = {
|
||||
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
|
||||
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
|
||||
# # symlink to the Nix store copy.
|
||||
# ".screenrc".source = dotfiles/screenrc;
|
||||
".config/doom".source = ../doom;
|
||||
".config/i3status-rust".source = ../i3status-rust;
|
||||
".config/nvim/".source = ../nvim;
|
||||
".config/rofi/".source = ../rofi;
|
||||
".config/sway/".source = ../sway;
|
||||
|
||||
# # You can also set the file content immediately.
|
||||
# ".gradle/gradle.properties".text = ''
|
||||
# org.gradle.console=verbose
|
||||
# org.gradle.daemon.idletimeout=3600000
|
||||
# '';
|
||||
".config/swaylock/config".text = ''
|
||||
image=/var/home/digyx/Pictures/ina_bday_2021_4k.png
|
||||
scaling=fill
|
||||
'';
|
||||
};
|
||||
|
||||
# You can also manage environment variables but you will have to manually
|
||||
|
|
Loading…
Reference in a new issue