-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup
More file actions
executable file
·89 lines (66 loc) · 2.1 KB
/
Copy pathsetup
File metadata and controls
executable file
·89 lines (66 loc) · 2.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#!/usr/bin/env bash
# author: daniel rode
# created: 19 jul 2025
# updated: 18 may 2026
# Setup and configure Linux system to be how I like it.
#
# DOC: Also see (for system setup/config)
# - ~/.ssh/config
# - ~/.nunyuh
# - crontab -e
# - sudo crontab -e
# - /etc/fstab
# - /etc/rc.local # for Void installs
# - /etc/doas.conf
set -e
set -x
HOSTNAME="$(hostname)"
function cmd_exists {
command -v "$1" >/dev/null 2>&1
}
# Run setup parts requring root privledges
[[ $1 == --skip-sudo ]] || sudo ~/code/bin/setup-system "$(id -un)"
# Install foot, if not already installed TODO
# ~/code/bin/install-foot
# Install lf, if not already installed TODO
# ~/code/bin/install-lf
# Add home log directory
[[ $HOSTNAME == bigpan ]] && mkdir -p ~/logs
# Install user config files
~/code/bin/install-dotfiles
cmd_exists systemctl && systemctl --user daemon-reload
# Configure settings for this git repo
git -C ~/code config core.fileMode true
git -C ~/code config commit.gpgSign true
# Enable systemd user services
if cmd_exists systemctl
then
if [[ $HOSTNAME == mesa ]]
then
# Globus
# https://docs.globus.org/globus-connect-personal/install/linux/
# Defining share paths:
# https://docs.globus.org/globus-connect-personal/install/linux/#config-paths
# Share paths config file: ~/.globusonline/lta/config-paths
systemctl --user enable --now globus.service
else
# Syncthing
systemctl --user enable --now syncthing
fi
if [[ $HOSTNAME == bigpan ]]
then
# Immich, IRC,
systemctl --user enable --now app_immich
systemctl --user enable --now app_loungeirc
fi
fi
# Compile binaries
go build -o ~/code/bin/o ~/code/src/o/o.go
go build -C ~/code/src/sway-win-info/ -o ~/code/bin/sway-win-info main.go
go build -o ~/code/bin/rotate-ls-output ~/code/src/rotate-ls-output/main.go
# Set 'focus-follows-mouse' in Gnome Shell
gsettings set org.gnome.desktop.wm.preferences focus-mode sloppy
# Set wallpaper
~/code/bin/sway-change-scenery
# TODO
# todo firewall (ufw; see `sudo ufw status verbose` to get current list of rules)