mirror of
https://github.com/nmasur/dotfiles
synced 2025-07-05 18:30:13 +00:00
reorganize files
This commit is contained in:
24
modules/repositories/dotfiles.nix
Normal file
24
modules/repositories/dotfiles.nix
Normal file
@ -0,0 +1,24 @@
|
||||
{ config, pkgs, lib, ... }: {
|
||||
|
||||
home-manager.users.${config.user} = {
|
||||
|
||||
home.activation = {
|
||||
|
||||
# Always clone dotfiles repository if it doesn't exist
|
||||
cloneDotfiles =
|
||||
config.home-manager.users.${config.user}.lib.dag.entryAfter
|
||||
[ "writeBoundary" ] ''
|
||||
if [ ! -d "${config.dotfilesPath}" ]; then
|
||||
$DRY_RUN_CMD mkdir --parents $VERBOSE_ARG $(dirname "${config.dotfilesPath}")
|
||||
$DRY_RUN_CMD ${pkgs.git}/bin/git clone ${config.dotfilesRepo} "${config.dotfilesPath}"
|
||||
fi
|
||||
'';
|
||||
|
||||
};
|
||||
|
||||
# Set a variable for dotfiles repo, not necessary but convenient
|
||||
home.sessionVariables.DOTS = config.dotfilesPath;
|
||||
|
||||
};
|
||||
|
||||
}
|
11
modules/repositories/notes.nix
Normal file
11
modules/repositories/notes.nix
Normal file
@ -0,0 +1,11 @@
|
||||
{ config, ... }: {
|
||||
|
||||
home-manager.users.${config.user} = {
|
||||
|
||||
home.sessionVariables = {
|
||||
NOTES_PATH = "${config.homePath}/dev/personal/notes";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
Reference in New Issue
Block a user