Skip to content

Commit

Permalink
feat(nixos): allow configuring nix as deamon
Browse files Browse the repository at this point in the history
  • Loading branch information
cristianoliveira committed Jul 21, 2024
1 parent ae411d6 commit 4fd7611
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
7 changes: 7 additions & 0 deletions nix/nixos/mappings/setup.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
#!/bin/sh

echo "Linking mappings configs for dual function keys"

if [ -d /etc/mappings ]; then
echo "Cleaning up /etc/mappings/*"
sudo mv /etc/mappings /tmp/mappings
fi

sudo mkdir -p /etc/mappings
sudo ln -sf $HOME/.dotfiles/nix/nixos/mappings /etc/mappings
10 changes: 6 additions & 4 deletions nix/nixos/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@ fi

# This is probably not necessary
# TODO test without this
echo "Cleaning up /etc/nixos/*"
sudo mv /etc/nixos /tmp/"$BACKUPNAME"
sudo ln -s $HOME/.dotfiles/nix/nixos /etc/nixos
sudo nixos-generate-config
if [ -d /etc/nixos ]; then
echo "Cleaning up /etc/nixos/*"
sudo mv /etc/nixos /tmp/"$BACKUPNAME"
sudo ln -s $HOME/.dotfiles/nix/nixos /etc/nixos
sudo nixos-generate-config
fi

# link all configs in ~/.config

Expand Down

0 comments on commit 4fd7611

Please sign in to comment.