Use my.init instead of my.setup
system.userActivationScripts is too sensitive to command failures, blocking the build process. Also: - Make rustup init script idempotent. - Remove doom sync and vim update; I'll do it manually
This commit is contained in:
parent
5d2c5960b4
commit
9b1a4956d4
|
@ -24,9 +24,11 @@
|
|||
alias.rsp = "rustup";
|
||||
alias.ca = "cargo";
|
||||
|
||||
setup = ''
|
||||
${pkgs.rustup}/bin/rustup update nightly
|
||||
${pkgs.rustup}/bin/rustup default nightly
|
||||
init = ''
|
||||
if [ ! -d "$RUSTUP_HOME" ]; then
|
||||
${pkgs.rustup}/bin/rustup update nightly
|
||||
${pkgs.rustup}/bin/rustup default nightly
|
||||
fi
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -26,14 +26,15 @@
|
|||
|
||||
env.PATH = [ "$HOME/.emacs.d/bin" ];
|
||||
zsh.rc = lib.readFile <my/config/emacs/aliases.zsh>;
|
||||
setup = ''
|
||||
|
||||
# My emacs config is too stateful to manage with nix
|
||||
init = ''
|
||||
if [ ! -d "$HOME/.emacs.d" ]; then
|
||||
${pkgs.git}/bin/git clone https://github.com/hlissner/doom-emacs "$HOME/.emacs.d"
|
||||
fi
|
||||
if [ ! -d "$XDG_CONFIG_HOME/doom" ]; then
|
||||
${pkgs.git}/bin/git clone https://github.com/hlissner/doom-emacs-private "$XDG_CONFIG_HOME/doom"
|
||||
fi
|
||||
$HOME/.emacs.d/bin/doom sync
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
|
@ -11,11 +11,12 @@
|
|||
|
||||
env.EDITOR = "nvim";
|
||||
env.VIMINIT = "let \\$MYVIMRC='\\$XDG_CONFIG_HOME/nvim/init.vim' | source \\$MYVIMRC";
|
||||
setup = ''
|
||||
|
||||
# My vim config is too stateful to manage with nix
|
||||
init = ''
|
||||
if [ ! -d "$XDG_CONFIG_HOME/nvim" ]; then
|
||||
${pkgs.git}/bin/git clone https://github.com/hlissner/.vim "$XDG_CONFIG_HOME/nvim"
|
||||
fi
|
||||
${pkgs.gnumake}/bin/make -C "$XDG_CONFIG_HOME/nvim" update
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -54,12 +54,6 @@ with lib;
|
|||
description = "...";
|
||||
};
|
||||
|
||||
setup = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
description = "...";
|
||||
};
|
||||
|
||||
zsh = {
|
||||
rc = mkOption {
|
||||
type = types.lines;
|
||||
|
@ -95,7 +89,5 @@ with lib;
|
|||
${config.my.zsh.rc}
|
||||
'';
|
||||
my.home.xdg.configFile."zsh/extra.zshenv".text = config.my.zsh.env;
|
||||
|
||||
system.userActivationScripts.mySetup = config.my.setup;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue