mirror of
https://github.com/mentos1386/dotfiles.git
synced 2025-01-31 00:35:42 +00:00
feat: ubuntu support and tools
This commit is contained in:
parent
c52d34799a
commit
7ca7b42326
4 changed files with 16 additions and 10 deletions
13
install.sh
13
install.sh
|
@ -1,4 +1,4 @@
|
||||||
#/bin/bash
|
#/bin/env bash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
REPO_DIR=$(dirname $(readlink -f $0))
|
REPO_DIR=$(dirname $(readlink -f $0))
|
||||||
|
@ -14,11 +14,11 @@ echo_header() {
|
||||||
|
|
||||||
workspace_link() {
|
workspace_link() {
|
||||||
mkdir -p $(dirname $HOME_DIR/$2)
|
mkdir -p $(dirname $HOME_DIR/$2)
|
||||||
|
rm $HOME_DIR/$2 || true
|
||||||
ln -s $REPO_DIR/$1 $HOME_DIR/$2 || true
|
ln -s $REPO_DIR/$1 $HOME_DIR/$2 || true
|
||||||
}
|
}
|
||||||
|
|
||||||
GUI=NO
|
GUI=NO
|
||||||
POSITIONAL_ARGS=()
|
|
||||||
while [[ $# -gt 0 ]]; do
|
while [[ $# -gt 0 ]]; do
|
||||||
case $1 in
|
case $1 in
|
||||||
--gui)
|
--gui)
|
||||||
|
@ -33,13 +33,8 @@ while [[ $# -gt 0 ]]; do
|
||||||
echo "Unknown option $1"
|
echo "Unknown option $1"
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
*)
|
|
||||||
POSITIONAL_ARGS+=("$1") # save positional arg
|
|
||||||
shift # past argument
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
set -- "${POSITIONAL_ARGS[@]}" # restore positional parameters
|
|
||||||
|
|
||||||
# Install basic packages.
|
# Install basic packages.
|
||||||
# Most other packages are installed via Home Manager.
|
# Most other packages are installed via Home Manager.
|
||||||
|
@ -84,7 +79,7 @@ EOF
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y \
|
sudo apt-get install -y \
|
||||||
kitty \
|
kitty \
|
||||||
gphoto2 v4l2loopback ffmpeg \
|
gphoto2 ffmpeg \
|
||||||
ddcutil
|
ddcutil
|
||||||
|
|
||||||
echo_header "==[host:ubuntu] Installing flatpak"
|
echo_header "==[host:ubuntu] Installing flatpak"
|
||||||
|
@ -142,7 +137,7 @@ nix-shell '<home-manager>' -A install
|
||||||
|
|
||||||
echo_header "==[host] Installing Home Manager packages"
|
echo_header "==[host] Installing Home Manager packages"
|
||||||
workspace_link nix/home.nix .config/home-manager/home.nix
|
workspace_link nix/home.nix .config/home-manager/home.nix
|
||||||
home-manager switch
|
./switch.sh
|
||||||
|
|
||||||
echo_header "==[host] Use zsh as default shell"
|
echo_header "==[host] Use zsh as default shell"
|
||||||
sudo chsh $USER --shell=/bin/zsh
|
sudo chsh $USER --shell=/bin/zsh
|
||||||
|
|
|
@ -63,7 +63,14 @@
|
||||||
stylua
|
stylua
|
||||||
|
|
||||||
# Services
|
# Services
|
||||||
|
terraform
|
||||||
|
opentofu
|
||||||
flyctl
|
flyctl
|
||||||
|
awscli2
|
||||||
|
|
||||||
|
# Kubernetes
|
||||||
|
k9s
|
||||||
|
kubectl
|
||||||
];
|
];
|
||||||
|
|
||||||
# Home Manager is pretty good at managing dotfiles. The primary way to manage
|
# Home Manager is pretty good at managing dotfiles. The primary way to manage
|
||||||
|
|
4
switch.sh
Executable file
4
switch.sh
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/env bash
|
||||||
|
export NIXPKGS_ALLOW_UNFREE=1
|
||||||
|
|
||||||
|
home-manager switch
|
Loading…
Reference in a new issue