Ever-so-slightly clean up the build script and the readme in the nix/ folder
Although, not positive they work. Honestly have been more useful as a way to remember what commands to run manually ^_^;
This commit is contained in:
parent
3891451b92
commit
02a270c44d
2 changed files with 18 additions and 3 deletions
|
|
@ -1,5 +1,8 @@
|
||||||
The install script is only for linux machines at the moment.
|
The install script is only for linux machines at the moment.
|
||||||
|
|
||||||
For Apple machines, [install nix-darwin](https://github.com/LnL7/nix-darwin#install) and symlink the `darwin-configuration.nix` file to `~/.nixpkgs/darwin-configuration.nix`.
|
For Apple machines, [install
|
||||||
|
nix-darwin](https://github.com/LnL7/nix-darwin#install) and symlink the
|
||||||
|
`darwin-configuration.nix` file (probably in `worktop`? why else would you have
|
||||||
|
an OSX machine?) to wherever it needs to go for that version of nix-darwin.
|
||||||
|
|
||||||
Home-manager is installed separately and not currently managed by the nix configurations.
|
Home-manager is installed separately and not currently managed by any of the nix configurations.
|
||||||
|
|
|
||||||
14
nix/build.sh
14
nix/build.sh
|
|
@ -6,11 +6,23 @@ install_home_manager() {
|
||||||
|
|
||||||
export NIX_PATH=$HOME/.nix-defexpr/channels${NIX_PATH:+:}$NIX_PATH
|
export NIX_PATH=$HOME/.nix-defexpr/channels${NIX_PATH:+:}$NIX_PATH
|
||||||
nix-shell '<home-manager>' -A install
|
nix-shell '<home-manager>' -A install
|
||||||
|
mkdir -p ~/.config/home-manager
|
||||||
|
|
||||||
|
parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
|
||||||
|
cd "$parent_path"
|
||||||
|
[ -f ~/.config/home-manager/home.nix ] && mv ~/.config/home-manager/home.nix ~/.config/home-manager/home.nix.orig
|
||||||
|
ln -s ./home/commandline.nix ~/.config/home-manager/home.nix
|
||||||
|
home-manager switch
|
||||||
}
|
}
|
||||||
|
|
||||||
build_system() {
|
build_system() {
|
||||||
|
parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
|
||||||
|
|
||||||
sudo nix-channel --add https://nixos.org/channels/nixos-unstable nixos
|
sudo nix-channel --add https://nixos.org/channels/nixos-unstable nixos
|
||||||
sudo cp system/configuration.nix /etc/nixos/
|
sudo ln -s "$parent_path/system/framework/configuration.nix" /etc/nixos/configuration.nix
|
||||||
|
|
||||||
sudo nixos-rebuild switch --upgrade
|
sudo nixos-rebuild switch --upgrade
|
||||||
}
|
}
|
||||||
|
|
||||||
|
build_system
|
||||||
|
install_home_manager
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue