My Nix Infra
nix
nixos
1#!/usr/bin/env bash
2
3set -e
4
5SCRIPT_DIR=$(dirname "$(realpath "$0")")
6
7if ! command -v paru &> /dev/null; then
8 sudo pacman -S --needed base-devel git
9 git clone https://aur.archlinux.org/paru-bin.git /tmp/paru
10 cd /tmp/paru
11 makepkg -si --noconfirm
12 rm -rf /tmp/paru
13fi
14
15has() {
16 command -v "$1" &>/dev/null
17}
18
19pkgs=(
20 # kde plasma ofc
21 plasma
22 dolphin
23 ark
24 gwenview
25 mpv
26 sddm
27 kimageformats
28 kwalletmanager
29 power-profiles-daemon
30 qt6-imageformats
31 libappindicator-gtk3
32
33 # arch related
34 intel-ucode
35 amd-ucode
36 reflector
37 archlinux-contrib
38 pacman-contrib
39
40 # terminal
41 ghostty
42
43 # editors
44 visual-studio-code-bin
45
46 # browsers
47 firefox
48 brave-bin
49
50 # fonts
51 noto-fonts
52 noto-fonts-cjk
53 noto-fonts-emoji
54 noto-fonts-extra
55 ttf-jetbrains-mono
56 ttf-font-awesome
57
58 # virtualization
59 virtualbox
60 virtualbox-guest-iso
61 virtualbox-host-dkms
62 virtualbox-host-modules-lts
63
64 # IME
65 fcitx5-im
66 fcitx5-rime
67
68 discord
69 telegram-desktop
70)
71
72paru -Syu --noconfirm --needed "${pkgs[@]}"
73
74# nix
75if ! has nix; then
76 curl -L https://nixos.org/nix/install | sh -s -- --no-daemon
77fi
78
79sudo systemctl enable sddm
80sudo systemctl enable systemd-resolved.service
81sudo systemctl restart systemd-resolved.service
82sudo systemctl enable bluetooth.service
83sudo systemctl restart bluetooth.service
84sudo systemctl enable reflector.timer
85sudo systemctl restart reflector.timer
86sudo ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
87
88bash "$SCRIPT_DIR/cp-config.sh"
89bash "$SCRIPT_DIR/init-work.sh"
90bash "$SCRIPT_DIR/kde-config.sh"
91
92chsh -s "$(which fish)"
93
94read -rp "reboot? (y/n): " reply
95if [[ $reply = "y" ]]; then
96 reboot
97fi