mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-09 23:22:57 +00:00
add home activation script
This commit is contained in:
parent
60fe4caed4
commit
3656ed7e8f
@ -5,7 +5,7 @@
|
||||
home-manager.users.${config.user} = {
|
||||
home.packages = with pkgs; [
|
||||
gnome.nautilus
|
||||
gnome.sushi # Quick preview
|
||||
gnome.sushi # Quick preview with spacebar
|
||||
];
|
||||
};
|
||||
};
|
||||
|
19
modules/editor/dotfiles.nix
Normal file
19
modules/editor/dotfiles.nix
Normal file
@ -0,0 +1,19 @@
|
||||
{ config, pkgs, lib, ... }: {
|
||||
|
||||
home-manager.users.${config.user} = {
|
||||
|
||||
home.activation = {
|
||||
|
||||
# Always clone dotfiles repository if it doesn't exist
|
||||
cloneDotfiles = lib.hm.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 https://github.com/nmasur/dotfiles ${config.dotfilesPath}
|
||||
fi
|
||||
'';
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user