nuscripts/tools/nixinstall.nu

53 lines
1.3 KiB
Plaintext
Raw Permalink Normal View History

2024-01-13 10:50:06 +00:00
# do "/bin/bash <(curl -L https://nixos.org/nix/install) --daemon"
def nixos_remove [] {
if ( "/etc/bashrc.backup-before-nix" | path exists) {
sudo mv -f "/etc/bashrc.backup-before-nix" /etc/bashrc
sudo rm -f "/etc/bash.bashrc.backup-before-nix"
}
}
def "nix_update" [] {
nix-channel --add https://nixos.org/channels/nixos-23.11 nixpkgs
/nix/var/nix/profiles/default/bin/nix-env -u updates
}
def "nix_install" [ ...names ] {
$env.NIXPKGS_ALLOW_UNFREE = 1
$names | each {
|name| /nix/var/nix/profiles/default/bin/nix-env -i $name
}
}
def nixos_install [] {
http get https://nixos.org/nix/install | save -f /tmp/install.sh
chmod +x /tmp/install.sh
^/tmp/install.sh
nix_update
nix-env -u updates
nix_install mc
nix_install nushell
nix_install mdbook mdbook-toc mdbook-pdf mdbook-man-unstable mdbook-mermaid mdbook-footnote mdbook-linkcheck mdbook-kroki-preprocessor
nix_install zola
nix_install vscode-with-extensions
nix_install rustup tailwindcss
nix_install vlang
nix_install go
# nix_install vscode-with-extensions vscode-extensions.zxh404.vscode-proto3
# nix_install vscode-extensions.yzhang.markdown-all-in-one
}
# for i in 'seq -w 1 n'; do userdel guixbuilder$i; done
# nixos_remove
# nixos_install