From 81632fb8d484f3d97b121dc664290340854f1eb3 Mon Sep 17 00:00:00 2001 From: Roman Godmaire Date: Sat, 13 Apr 2024 22:24:01 -0400 Subject: [PATCH] nix: manage dotfiles in nix --- 01-install-nix.sh => 00-install-nix.sh | 0 00-sync.sh | 25 ------------------------- home-manager/common.nix | 20 +++++++++----------- 3 files changed, 9 insertions(+), 36 deletions(-) rename 01-install-nix.sh => 00-install-nix.sh (100%) delete mode 100644 00-sync.sh diff --git a/01-install-nix.sh b/00-install-nix.sh similarity index 100% rename from 01-install-nix.sh rename to 00-install-nix.sh diff --git a/00-sync.sh b/00-sync.sh deleted file mode 100644 index 0e1a25f..0000000 --- a/00-sync.sh +++ /dev/null @@ -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 diff --git a/home-manager/common.nix b/home-manager/common.nix index afc6fad..b671c83 100644 --- a/home-manager/common.nix +++ b/home-manager/common.nix @@ -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