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.rsp = "rustup";
|
||||||
alias.ca = "cargo";
|
alias.ca = "cargo";
|
||||||
|
|
||||||
setup = ''
|
init = ''
|
||||||
|
if [ ! -d "$RUSTUP_HOME" ]; then
|
||||||
${pkgs.rustup}/bin/rustup update nightly
|
${pkgs.rustup}/bin/rustup update nightly
|
||||||
${pkgs.rustup}/bin/rustup default nightly
|
${pkgs.rustup}/bin/rustup default nightly
|
||||||
|
fi
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,14 +26,15 @@
|
||||||
|
|
||||||
env.PATH = [ "$HOME/.emacs.d/bin" ];
|
env.PATH = [ "$HOME/.emacs.d/bin" ];
|
||||||
zsh.rc = lib.readFile <my/config/emacs/aliases.zsh>;
|
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
|
if [ ! -d "$HOME/.emacs.d" ]; then
|
||||||
${pkgs.git}/bin/git clone https://github.com/hlissner/doom-emacs "$HOME/.emacs.d"
|
${pkgs.git}/bin/git clone https://github.com/hlissner/doom-emacs "$HOME/.emacs.d"
|
||||||
fi
|
fi
|
||||||
if [ ! -d "$XDG_CONFIG_HOME/doom" ]; then
|
if [ ! -d "$XDG_CONFIG_HOME/doom" ]; then
|
||||||
${pkgs.git}/bin/git clone https://github.com/hlissner/doom-emacs-private "$XDG_CONFIG_HOME/doom"
|
${pkgs.git}/bin/git clone https://github.com/hlissner/doom-emacs-private "$XDG_CONFIG_HOME/doom"
|
||||||
fi
|
fi
|
||||||
$HOME/.emacs.d/bin/doom sync
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -11,11 +11,12 @@
|
||||||
|
|
||||||
env.EDITOR = "nvim";
|
env.EDITOR = "nvim";
|
||||||
env.VIMINIT = "let \\$MYVIMRC='\\$XDG_CONFIG_HOME/nvim/init.vim' | source \\$MYVIMRC";
|
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
|
if [ ! -d "$XDG_CONFIG_HOME/nvim" ]; then
|
||||||
${pkgs.git}/bin/git clone https://github.com/hlissner/.vim "$XDG_CONFIG_HOME/nvim"
|
${pkgs.git}/bin/git clone https://github.com/hlissner/.vim "$XDG_CONFIG_HOME/nvim"
|
||||||
fi
|
fi
|
||||||
${pkgs.gnumake}/bin/make -C "$XDG_CONFIG_HOME/nvim" update
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,12 +54,6 @@ with lib;
|
||||||
description = "...";
|
description = "...";
|
||||||
};
|
};
|
||||||
|
|
||||||
setup = mkOption {
|
|
||||||
type = types.lines;
|
|
||||||
default = "";
|
|
||||||
description = "...";
|
|
||||||
};
|
|
||||||
|
|
||||||
zsh = {
|
zsh = {
|
||||||
rc = mkOption {
|
rc = mkOption {
|
||||||
type = types.lines;
|
type = types.lines;
|
||||||
|
@ -95,7 +89,5 @@ with lib;
|
||||||
${config.my.zsh.rc}
|
${config.my.zsh.rc}
|
||||||
'';
|
'';
|
||||||
my.home.xdg.configFile."zsh/extra.zshenv".text = config.my.zsh.env;
|
my.home.xdg.configFile."zsh/extra.zshenv".text = config.my.zsh.env;
|
||||||
|
|
||||||
system.userActivationScripts.mySetup = config.my.setup;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue