+30
.aider.chat.history.md
+30
.aider.chat.history.md
···
···
1
+
2
+
# aider chat started at 2025-02-07 16:38:26
3
+
4
+
> Newer aider version v0.74.1 is available.
5
+
> python3.11 -m pip install --upgrade --upgrade-strategy only-if-needed aider-chat
6
+
> Run pip install? (Y)es/(N)o [Yes]: y
7
+
> /nix/store/8hkpwrgr7h06di861vhx612xfkrjzpak-python3-3.11.11/bin/python3.11: No module named pip
8
+
> Add .aider*, .env to .gitignore (recommended)? (Y)es/(N)o [Yes]: n
9
+
> /nix/store/cyihi1p1d92g2zg1frmppbm97h893adk-aider-chat-0.62.0/bin/aider
10
+
> Warning: gpt-4o-2024-08-06 expects these environment variables
11
+
> - OPENAI_API_KEY: Not set
12
+
> If you just set these environment variables using `setx` you may need to restart your terminal or command prompt for the changes to take effect.
13
+
> Warning: gpt-4o-mini expects these environment variables
14
+
> - OPENAI_API_KEY: Not set
15
+
> If you just set these environment variables using `setx` you may need to restart your terminal or command prompt for the changes to take effect.
16
+
> You can skip this check with --no-show-model-warnings
17
+
> https://aider.chat/docs/llms/warnings.html
18
+
> Open documentation url for more info? (Y)es/(N)o [Yes]: n
19
+
> Aider v0.62.0
20
+
> Main model: gpt-4o-2024-08-06 with diff edit format
21
+
> Weak model: gpt-4o-mini
22
+
> Git repo: .git with 293 files
23
+
> Repo-map: using 1024 tokens, auto refresh
24
+
> Use /help <question> for help, run "aider --help" to see cmd line args
25
+
>
26
+
>
27
+
> ^C again to exit
28
+
>
29
+
>
30
+
> ^C KeyboardInterrupt
+6
.aider.input.history
+6
.aider.input.history
+1
-3
.gitignore
+1
-3
.gitignore
+221
apps/aarch64-darwin/apply
+221
apps/aarch64-darwin/apply
···
···
1
+
#!/usr/bin/env bash
2
+
3
+
RED='\033[0;31m'
4
+
GREEN='\033[0;32m'
5
+
YELLOW='\033[1;33m'
6
+
NC='\033[0m' # No Color
7
+
8
+
# Determine the operating system
9
+
export OS=$(uname)
10
+
11
+
# Primary network interface
12
+
if [[ "$OS" != "Darwin" ]]; then
13
+
export PRIMARY_IFACE=$(ip -o -4 route show to default | awk '{print $5}')
14
+
echo -e "${GREEN}Found primary network interface $PRIMARY_IFACE${NC}"
15
+
fi
16
+
17
+
# Custom print function
18
+
_print() {
19
+
if [[ "$OS" == "Darwin" ]]; then
20
+
echo -e "$1"
21
+
else
22
+
echo "$1"
23
+
fi
24
+
}
25
+
26
+
# Custom prompt function
27
+
_prompt() {
28
+
local message="$1"
29
+
local variable="$2"
30
+
31
+
_print "$message"
32
+
read -r $variable
33
+
}
34
+
35
+
insert_secrets_output() {
36
+
local pattern="outputs = { self, darwin, nix-homebrew, homebrew-bundle, homebrew-core, homebrew-cask, home-manager, nixpkgs, disko, agenix } @inputs:"
37
+
local insert_text="secrets "
38
+
39
+
awk -v pat="$pattern" -v insert="$insert_text" '
40
+
$0 ~ pat {
41
+
sub(/} @inputs:/, ", " insert "} @inputs:"); # Replace the closing brace with the insert text followed by the brace
42
+
gsub(/ ,/, ","); # Correct any spaces before commas
43
+
print
44
+
next
45
+
}
46
+
{ print }
47
+
' flake.nix > flake.nix.tmp
48
+
49
+
mv flake.nix.tmp flake.nix
50
+
}
51
+
52
+
insert_secrets_input() {
53
+
# Define file path
54
+
FILE_PATH="flake.nix"
55
+
56
+
# Backup the original file
57
+
cp "$FILE_PATH" "${FILE_PATH}.bak"
58
+
59
+
# Temporary file for the text to insert
60
+
TEMP_FILE="temp_insert.txt"
61
+
62
+
# Write the formatted text to the temporary file
63
+
cat > "$TEMP_FILE" << 'EOF'
64
+
secrets = {
65
+
url = "git+ssh://git@github.com/%GITHUB_USER%/%GITHUB_SECRETS_REPO%.git";
66
+
flake = false;
67
+
};
68
+
EOF
69
+
70
+
# Check if the 'secrets' block already exists
71
+
if grep -q 'url = "git+ssh://git@github.com/%GITHUB_USER%/%GITHUB_SECRETS_REPO%.git"' "$FILE_PATH"; then
72
+
echo "The 'secrets' block already exists in the file."
73
+
rm "$TEMP_FILE"
74
+
rm "${FILE_PATH}.bak"
75
+
exit 0
76
+
fi
77
+
78
+
# Find the start and end line numbers of the 'disko' block
79
+
START_LINE=$(grep -n 'disko = {' "$FILE_PATH" | head -n 1 | cut -d: -f1)
80
+
END_LINE=$(tail -n +$START_LINE "$FILE_PATH" | grep -n '};' | head -n 1 | cut -d: -f1)
81
+
END_LINE=$((START_LINE + END_LINE - 1))
82
+
83
+
# Create a new file with the insertion
84
+
{
85
+
sed -n "1,${END_LINE}p" "$FILE_PATH"
86
+
cat "$TEMP_FILE"
87
+
sed -n "$((END_LINE + 1)),\$p" "$FILE_PATH"
88
+
} > "${FILE_PATH}.new"
89
+
90
+
# Replace the original file with the new file
91
+
mv "${FILE_PATH}.new" "$FILE_PATH"
92
+
93
+
# Clean up the temporary files
94
+
rm "$TEMP_FILE"
95
+
rm "${FILE_PATH}.bak"
96
+
}
97
+
98
+
# Fetch username from the system
99
+
export USERNAME=$(whoami)
100
+
101
+
# If the username is 'nixos' or 'root', ask the user for their username
102
+
if [[ "$USERNAME" == "nixos" ]] || [[ "$USERNAME" == "root" ]]; then
103
+
_prompt "${YELLOW}You're running as $USERNAME. Please enter your desired username: ${NC}" USERNAME
104
+
fi
105
+
106
+
# Check if git is available
107
+
if command -v git >/dev/null 2>&1; then
108
+
# Fetch email and name from git config
109
+
export GIT_EMAIL=$(git config --get user.email)
110
+
export GIT_NAME=$(git config --get user.name)
111
+
else
112
+
_print "${RED}Git is not available on this system.${NC}"
113
+
fi
114
+
115
+
# If git email is not found or git is not available, ask the user
116
+
if [[ -z "$GIT_EMAIL" ]]; then
117
+
_prompt "${YELLOW}Please enter your email: ${NC}" GIT_EMAIL
118
+
fi
119
+
120
+
# If git name is not found or git is not available, ask the user
121
+
if [[ -z "$GIT_NAME" ]]; then
122
+
_prompt "${YELLOW}Please enter your name: ${NC}" GIT_NAME
123
+
fi
124
+
125
+
_prompt "${YELLOW}Please enter your Github username: ${NC}" GITHUB_USER
126
+
_prompt "${YELLOW}Please enter your Github secrets repository name: ${NC}" GITHUB_SECRETS_REPO
127
+
128
+
export GITHUB_USER
129
+
export GITHUB_SECRETS_REPO
130
+
131
+
select_boot_disk() {
132
+
local disks
133
+
local _boot_disk
134
+
135
+
_print "${YELLOW}Available disks:${NC}"
136
+
disks=$(lsblk -nd --output NAME,SIZE | grep -v loop)
137
+
echo "$disks"
138
+
139
+
# Warning message for data deletion
140
+
_print "${RED}WARNING: All data on the chosen disk will be erased during the installation!${NC}"
141
+
_prompt "${YELLOW}Please choose your boot disk (e.g., nvme0n1, sda): ${NC}" _boot_disk
142
+
143
+
# Confirmation for disk selection to prevent accidental data loss
144
+
_print "${YELLOW}You have selected $_boot_disk as the boot disk. This will delete everything on this disk. Are you sure? (Y/N): ${NC}"
145
+
read -r confirmation
146
+
if [[ "$confirmation" =~ ^[Yy]$ ]]; then
147
+
export BOOT_DISK=$_boot_disk
148
+
else
149
+
_print "${RED}Disk selection cancelled by the user. Please run the script again to select the correct disk.${NC}"
150
+
exit 1
151
+
fi
152
+
}
153
+
154
+
# Set hostname and find primary disk if this is NixOS
155
+
if [[ "$OS" != "Darwin" ]]; then
156
+
_prompt "${YELLOW}Please enter a hostname for the system: ${NC}" HOST_NAME
157
+
export HOST_NAME
158
+
select_boot_disk
159
+
fi
160
+
161
+
# Confirmation step
162
+
confirm_details() {
163
+
_print "${GREEN}Username: $USERNAME"
164
+
_print "Email: $GIT_EMAIL"
165
+
_print "Name: $GIT_NAME${NC}"
166
+
167
+
if([[ "$OS" != "Darwin" ]]); then
168
+
_print "${GREEN}Primary interface: $PRIMARY_IFACE"
169
+
_print "Boot disk: $BOOT_DISK"
170
+
_print "Hostname: $HOST_NAME${NC}"
171
+
fi
172
+
173
+
_print "${GREEN}Secrets repository: $GITHUB_USER/$GITHUB_SECRETS_REPO${NC}"
174
+
175
+
_prompt "${YELLOW}Is this correct? (Y/N): ${NC}" choice
176
+
177
+
case "$choice" in
178
+
[Nn] ) _print "${RED}Exiting script.${NC}" && exit 1;;
179
+
[Yy] ) _print "${GREEN}Continuing...${NC}";;
180
+
* ) _print "${RED}Invalid option. Exiting script.${NC}" && exit 1;;
181
+
esac
182
+
}
183
+
184
+
# Call the confirmation function
185
+
confirm_details
186
+
187
+
# Function to replace tokens in each file
188
+
replace_tokens() {
189
+
local file="$1"
190
+
if [[ $(basename $1) != "apply" ]]; then
191
+
if [[ "$OS" == "Darwin" ]]; then
192
+
# macOS
193
+
LC_ALL=C LANG=C sed -i '' -e "s/%USER%/$USERNAME/g" "$file"
194
+
LC_ALL=C LANG=C sed -i '' -e "s/%EMAIL%/$GIT_EMAIL/g" "$file"
195
+
LC_ALL=C LANG=C sed -i '' -e "s/%NAME%/$GIT_NAME/g" "$file"
196
+
LC_ALL=C LANG=C sed -i '' -e "s/%GITHUB_USER%/$GITHUB_USER/g" "$file"
197
+
LC_ALL=C LANG=C sed -i '' -e "s/%GITHUB_SECRETS_REPO%/$GITHUB_SECRETS_REPO/g" "$file"
198
+
else
199
+
# Linux or other
200
+
sed -i -e "s/%USER%/$USERNAME/g" "$file"
201
+
sed -i -e "s/%EMAIL%/$GIT_EMAIL/g" "$file"
202
+
sed -i -e "s/%NAME%/$GIT_NAME/g" "$file"
203
+
sed -i -e "s/%INTERFACE%/$PRIMARY_IFACE/g" "$file"
204
+
sed -i -e "s/%DISK%/$BOOT_DISK/g" "$file"
205
+
sed -i -e "s/%HOST%/$HOST_NAME/g" "$file"
206
+
sed -i -e "s/%GITHUB_USER%/$GITHUB_USER/g" "$file"
207
+
sed -i -e "s/%GITHUB_SECRETS_REPO%/$GITHUB_SECRETS_REPO/g" "$file"
208
+
fi
209
+
fi
210
+
}
211
+
212
+
# Insert secrets repo into flake
213
+
insert_secrets_input
214
+
insert_secrets_output
215
+
216
+
# Traverse directories and call replace_tokens on each Nix file
217
+
export -f replace_tokens
218
+
find . -type f -exec bash -c 'replace_tokens "$0"' {} \;
219
+
220
+
echo "$USERNAME" > /tmp/username.txt
221
+
_print "${GREEN}User $USERNAME information applied.${NC}"
+19
apps/aarch64-darwin/build
+19
apps/aarch64-darwin/build
···
···
1
+
#!/bin/sh -e
2
+
3
+
GREEN='\033[1;32m'
4
+
YELLOW='\033[1;33m'
5
+
RED='\033[1;31m'
6
+
NC='\033[0m'
7
+
8
+
SYSTEM_TYPE="aarch64-darwin"
9
+
FLAKE_SYSTEM="darwinConfigurations.${SYSTEM_TYPE}.system"
10
+
11
+
export NIXPKGS_ALLOW_UNFREE=1
12
+
13
+
echo "${YELLOW}Starting build...${NC}"
14
+
nix --extra-experimental-features 'nix-command flakes' build .#$FLAKE_SYSTEM $@
15
+
16
+
echo "${YELLOW}Cleaning up...${NC}"
17
+
unlink ./result
18
+
19
+
echo "${GREEN}Switch to new generation complete!${NC}"
+22
apps/aarch64-darwin/build-switch
+22
apps/aarch64-darwin/build-switch
···
···
1
+
#!/bin/sh -e
2
+
3
+
GREEN='\033[1;32m'
4
+
YELLOW='\033[1;33m'
5
+
RED='\033[1;31m'
6
+
NC='\033[0m'
7
+
8
+
SYSTEM_TYPE="aarch64-darwin"
9
+
FLAKE_SYSTEM="darwinConfigurations.${SYSTEM_TYPE}.system"
10
+
11
+
export NIXPKGS_ALLOW_UNFREE=1
12
+
13
+
echo "${YELLOW}Starting build...${NC}"
14
+
nix --extra-experimental-features 'nix-command flakes' build .#$FLAKE_SYSTEM $@
15
+
16
+
echo "${YELLOW}Switching to new generation...${NC}"
17
+
./result/sw/bin/darwin-rebuild switch --flake .#${SYSTEM_TYPE} $@
18
+
19
+
echo "${YELLOW}Cleaning up...${NC}"
20
+
unlink ./result
21
+
22
+
echo "${GREEN}Switch to new generation complete!${NC}"
+33
apps/aarch64-darwin/check-keys
+33
apps/aarch64-darwin/check-keys
···
···
1
+
#!/usr/bin/env bash
2
+
set -e
3
+
4
+
RED='\033[0;31m'
5
+
GREEN='\033[0;32m'
6
+
NC='\033[0m'
7
+
8
+
username=${USER}
9
+
export SSH_DIR=/Users/${username}/.ssh
10
+
11
+
lint_keys() {
12
+
if [[ -f "${SSH_DIR}/id_ed25519" && -f "${SSH_DIR}/id_ed25519.pub" && -f "${SSH_DIR}/id_ed25519_agenix" && -f "${SSH_DIR}/id_ed25519_agenix.pub" ]]; then
13
+
echo -e "${GREEN}All SSH keys are present.${NC}"
14
+
else
15
+
echo -e "${RED}Some SSH keys are missing.${NC}"
16
+
if [[ ! -f "${SSH_DIR}/id_ed25519" ]]; then
17
+
echo -e "${RED}Missing: id_ed25519${NC}"
18
+
fi
19
+
if [[ ! -f "${SSH_DIR}/id_ed25519.pub" ]]; then
20
+
echo -e "${RED}Missing: id_ed25519.pub${NC}"
21
+
fi
22
+
if [[ ! -f "${SSH_DIR}/id_ed25519_agenix" ]]; then
23
+
echo -e "${RED}Missing: id_ed25519_agenix${NC}"
24
+
fi
25
+
if [[ ! -f "${SSH_DIR}/id_ed25519_agenix.pub" ]]; then
26
+
echo -e "${RED}Missing: id_ed25519_agenix.pub${NC}"
27
+
fi
28
+
echo -e "${GREEN}Run the createKeys command to generate the missing keys.${NC}"
29
+
exit 1
30
+
fi
31
+
}
32
+
33
+
lint_keys
+68
apps/aarch64-darwin/copy-keys
+68
apps/aarch64-darwin/copy-keys
···
···
1
+
#!/usr/bin/env bash
2
+
set -e
3
+
4
+
RED='\033[0;31m'
5
+
GREEN='\033[0;32m'
6
+
NC='\033[0m'
7
+
8
+
username=${USER}
9
+
export SSH_DIR=/Users/${username}/.ssh
10
+
11
+
handle_no_usb() {
12
+
echo -e ${RED}No USB drive found or mounted.${NC}"
13
+
echo -e ${GREEN}If you have not yet set up your keys, run the script to generate new SSH keys.${NC}"
14
+
exit 1
15
+
}
16
+
17
+
mount_usb() {
18
+
MOUNT_PATH=""
19
+
for dev in $(diskutil list | grep -o 'disk[0-9]'); do
20
+
MOUNT_PATH="$(diskutil info /dev/${dev} | grep \"Mount Point\" | awk -F: '{print $2}' | xargs)"
21
+
if [ -n "${MOUNT_PATH}" ]; then
22
+
echo -e "${GREEN}USB drive found at ${MOUNT_PATH}.${NC}"
23
+
break
24
+
fi
25
+
done
26
+
27
+
if [ -z "${MOUNT_PATH}" ]; then
28
+
echo -e "${RED}No USB drive found.${NC}"
29
+
fi
30
+
}
31
+
32
+
copy_keys() {
33
+
if [ -n "${MOUNT_PATH}" ]; then
34
+
cp "${MOUNT_PATH}/id_ed25519_agenix.pub" ${SSH_DIR}
35
+
cp "${MOUNT_PATH}/id_ed25519_agenix" ${SSH_DIR}
36
+
chmod 600 ${SSH_DIR}/id_ed25519_{agenix,agenix.pub}
37
+
else
38
+
echo -e "${RED}No USB drive found. Aborting.${NC}"
39
+
exit 1
40
+
fi
41
+
}
42
+
43
+
setup_ssh_directory() {
44
+
mkdir -p ${SSH_DIR}
45
+
}
46
+
47
+
set_keys() {
48
+
cp ${MOUNT_PATH}/id_ed25519_github.pub ${SSH_DIR}/id_ed25519.pub
49
+
cp ${MOUNT_PATH}/id_ed25519_github ${SSH_DIR}/id_ed25519
50
+
chmod 600 ${SSH_DIR}/id_ed25519
51
+
chmod 644 ${SSH_DIR}/id_ed25519.pub
52
+
}
53
+
54
+
change_ownership() {
55
+
chown ${username}:staff ${SSH_DIR}/id_ed25519{,.pub}
56
+
chown ${username}:staff ${SSH_DIR}/id_ed25519_{agenix,agenix.pub}
57
+
}
58
+
59
+
setup_ssh_directory
60
+
mount_usb
61
+
62
+
if [ -z "${MOUNT_PATH}" ]; then
63
+
handle_no_usb
64
+
else
65
+
copy_keys
66
+
set_keys
67
+
change_ownership
68
+
fi
+46
apps/aarch64-darwin/create-keys
+46
apps/aarch64-darwin/create-keys
···
···
1
+
#!/usr/bin/env bash
2
+
set -e
3
+
4
+
RED='\033[0;31m'
5
+
GREEN='\033[0;32m'
6
+
NC='\033[0m'
7
+
8
+
username=${USER}
9
+
export SSH_DIR=/Users/${username}/.ssh
10
+
11
+
setup_ssh_directory() {
12
+
mkdir -p ${SSH_DIR}
13
+
}
14
+
15
+
prompt_for_key_generation() {
16
+
local key_name=$1
17
+
if [[ -f "${SSH_DIR}/${key_name}" ]]; then
18
+
echo -e "${RED}Existing SSH key found for ${key_name}.${NC}"
19
+
cat "${SSH_DIR}/${key_name}.pub"
20
+
read -p "Do you want to replace it? (y/n) " -n 1 -r
21
+
echo
22
+
if [[ $REPLY =~ ^[Yy]$ ]]; then
23
+
return 0 # Indicate key should be replaced
24
+
else
25
+
return 1 # Indicate key should be kept
26
+
fi
27
+
fi
28
+
return 0 # Indicate no key exists, so it should be created
29
+
}
30
+
31
+
generate_key() {
32
+
local key_name=$1
33
+
if prompt_for_key_generation "$key_name"; then
34
+
ssh-keygen -t ed25519 -f "${SSH_DIR}/${key_name}" -N ""
35
+
chown ${username}:staff "${SSH_DIR}/${key_name}"{,.pub}
36
+
else
37
+
echo -e "${GREEN}Kept existing ${key_name}.${NC}"
38
+
fi
39
+
}
40
+
41
+
setup_ssh_directory
42
+
generate_key "id_ed25519"
43
+
generate_key "id_ed25519_agenix"
44
+
45
+
echo -e "${GREEN}SSH key setup complete.${NC}"
46
+
echo -e "${GREEN}Remember to add the necessary keys to Github or other services as required.${NC}"
+24
apps/aarch64-darwin/rollback
+24
apps/aarch64-darwin/rollback
···
···
1
+
#!/bin/sh -e
2
+
3
+
GREEN='\033[1;32m'
4
+
YELLOW='\033[1;33m'
5
+
RED='\033[1;31m'
6
+
NC='\033[0m'
7
+
8
+
FLAKE="Dustins-MBP"
9
+
10
+
echo "${YELLOW}Available generations:${NC}"
11
+
/run/current-system/sw/bin/darwin-rebuild --list-generations
12
+
13
+
echo "${YELLOW}Enter the generation number for rollback:${NC}"
14
+
read GEN_NUM
15
+
16
+
if [ -z "$GEN_NUM" ]; then
17
+
echo "${RED}No generation number entered. Aborting rollback.${NC}"
18
+
exit 1
19
+
fi
20
+
21
+
echo "${YELLOW}Rolling back to generation $GEN_NUM...${NC}"
22
+
/run/current-system/sw/bin/darwin-rebuild switch --flake .#$FLAKE --switch-generation $GEN_NUM
23
+
24
+
echo "${GREEN}Rollback to generation $GEN_NUM complete!${NC}"
+1
apps/aarch64-linux
+1
apps/aarch64-linux
···
···
1
+
x86_64-linux
+142
apps/x86_64-linux/apply
+142
apps/x86_64-linux/apply
···
···
1
+
#!/usr/bin/env bash
2
+
3
+
RED='\033[0;31m'
4
+
GREEN='\033[0;32m'
5
+
YELLOW='\033[1;33m'
6
+
NC='\033[0m' # No Color
7
+
8
+
# Determine the operating system
9
+
export OS=$(uname)
10
+
11
+
# Primary network interface
12
+
if [[ "$OS" != "Darwin" ]]; then
13
+
export PRIMARY_IFACE=$(ip -o -4 route show to default | awk '{print $5}')
14
+
echo -e "${GREEN}Found primary network interface $PRIMARY_IFACE${NC}"
15
+
fi
16
+
17
+
# Custom print function
18
+
_print() {
19
+
if [[ "$OS" == "Darwin" ]]; then
20
+
echo -e "$1"
21
+
else
22
+
echo "$1"
23
+
fi
24
+
}
25
+
26
+
# Custom prompt function
27
+
_prompt() {
28
+
local message="$1"
29
+
local variable="$2"
30
+
31
+
_print "$message"
32
+
read -r $variable
33
+
}
34
+
35
+
# Fetch username from the system
36
+
export USERNAME=$(whoami)
37
+
38
+
# If the username is 'nixos' or 'root', ask the user for their username
39
+
if [[ "$USERNAME" == "nixos" ]] || [[ "$USERNAME" == "root" ]]; then
40
+
_prompt "${YELLOW}You're running as $USERNAME. Please enter your desired username: ${NC}" USERNAME
41
+
fi
42
+
43
+
# Check if git is available
44
+
if command -v git >/dev/null 2>&1; then
45
+
# Fetch email and name from git config
46
+
export GIT_EMAIL=$(git config --get user.email)
47
+
export GIT_NAME=$(git config --get user.name)
48
+
else
49
+
_print "${RED}Git is not available on this system.${NC}"
50
+
fi
51
+
52
+
# If git email is not found or git is not available, ask the user
53
+
if [[ -z "$GIT_EMAIL" ]]; then
54
+
_prompt "${YELLOW}Please enter your email: ${NC}" GIT_EMAIL
55
+
fi
56
+
57
+
# If git name is not found or git is not available, ask the user
58
+
if [[ -z "$GIT_NAME" ]]; then
59
+
_prompt "${YELLOW}Please enter your name: ${NC}" GIT_NAME
60
+
fi
61
+
62
+
select_boot_disk() {
63
+
local disks
64
+
local _boot_disk
65
+
66
+
_print "${YELLOW}Available disks:${NC}"
67
+
disks=$(lsblk -nd --output NAME,SIZE | grep -v loop)
68
+
echo "$disks"
69
+
70
+
# Warning message for data deletion
71
+
_print "${RED}WARNING: All data on the chosen disk will be erased during the installation!${NC}"
72
+
_prompt "${YELLOW}Please choose your boot disk (e.g., nvme0n1, sda): ${NC}" _boot_disk
73
+
74
+
# Confirmation for disk selection to prevent accidental data loss
75
+
_print "${YELLOW}You have selected $_boot_disk as the boot disk. This will delete everything on this disk. Are you sure? (Y/N): ${NC}"
76
+
read -r confirmation
77
+
if [[ "$confirmation" =~ ^[Yy]$ ]]; then
78
+
export BOOT_DISK=$_boot_disk
79
+
else
80
+
_print "${RED}Disk selection cancelled by the user. Please run the script again to select the correct disk.${NC}"
81
+
exit 1
82
+
fi
83
+
}
84
+
85
+
# Set hostname and find primary disk if this is NixOS
86
+
if [[ "$OS" != "Darwin" ]]; then
87
+
_prompt "${YELLOW}Please enter a hostname for the system: ${NC}" HOST_NAME
88
+
export HOST_NAME
89
+
select_boot_disk
90
+
fi
91
+
92
+
# Confirmation step
93
+
confirm_details() {
94
+
_print "${GREEN}Username: $USERNAME"
95
+
_print "Email: $GIT_EMAIL"
96
+
_print "Name: $GIT_NAME${NC}"
97
+
98
+
if([[ "$OS" != "Darwin" ]]); then
99
+
_print "${GREEN}Primary interface: $PRIMARY_IFACE"
100
+
_print "Boot disk: $BOOT_DISK"
101
+
_print "Hostname: $HOST_NAME${NC}"
102
+
fi
103
+
104
+
_prompt "${YELLOW}Is this correct? (Y/N): ${NC}" choice
105
+
106
+
case "$choice" in
107
+
[Nn] ) _print "${RED}Exiting script.${NC}" && exit 1;;
108
+
[Yy] ) _print "${GREEN}Continuing...${NC}";;
109
+
* ) _print "${RED}Invalid option. Exiting script.${NC}" && exit 1;;
110
+
esac
111
+
}
112
+
113
+
# Call the confirmation function
114
+
confirm_details
115
+
116
+
# Function to replace tokens in each file
117
+
replace_tokens() {
118
+
local file="$1"
119
+
if [[ $(basename $1) != "apply" ]]; then
120
+
if [[ "$OS" == "Darwin" ]]; then
121
+
# macOS
122
+
LC_ALL=C LANG=C sed -i '' -e "s/%USER%/$USERNAME/g" "$file"
123
+
LC_ALL=C LANG=C sed -i '' -e "s/%EMAIL%/$GIT_EMAIL/g" "$file"
124
+
LC_ALL=C LANG=C sed -i '' -e "s/%NAME%/$GIT_NAME/g" "$file"
125
+
else
126
+
# Linux or other
127
+
sed -i -e "s/%USER%/$USERNAME/g" "$file"
128
+
sed -i -e "s/%EMAIL%/$GIT_EMAIL/g" "$file"
129
+
sed -i -e "s/%NAME%/$GIT_NAME/g" "$file"
130
+
sed -i -e "s/%INTERFACE%/$PRIMARY_IFACE/g" "$file"
131
+
sed -i -e "s/%DISK%/$BOOT_DISK/g" "$file"
132
+
sed -i -e "s/%HOST%/$HOST_NAME/g" "$file"
133
+
fi
134
+
fi
135
+
}
136
+
137
+
# Traverse directories and call replace_tokens on each Nix file
138
+
export -f replace_tokens
139
+
find . -type f -exec bash -c 'replace_tokens "$0"' {} \;
140
+
141
+
echo "$USERNAME" > /tmp/username.txt
142
+
_print "${GREEN}User $USERNAME information applied.${NC}"
+28
apps/x86_64-linux/build-switch
+28
apps/x86_64-linux/build-switch
···
···
1
+
#!/bin/sh -e
2
+
3
+
RED='\033[1;31m'
4
+
GREEN='\033[1;32m'
5
+
YELLOW='\033[1;33m'
6
+
NC='\033[0m'
7
+
8
+
SYSTEM=$(uname -m)
9
+
10
+
case "$SYSTEM" in
11
+
x86_64)
12
+
FLAKE_TARGET="x86_64-linux"
13
+
;;
14
+
aarch64)
15
+
FLAKE_TARGET="aarch64-linux"
16
+
;;
17
+
*)
18
+
echo -e "${RED}Unsupported architecture: $SYSTEM${NC}"
19
+
exit 1
20
+
;;
21
+
esac
22
+
23
+
echo -e "${YELLOW}Starting...${NC}"
24
+
25
+
# We pass SSH from user to root so root can download secrets from our private Github
26
+
sudo SSH_AUTH_SOCK=$SSH_AUTH_SOCK /run/current-system/sw/bin/nixos-rebuild switch --flake .#$FLAKE_TARGET $@
27
+
28
+
echo -e "${GREEN}Switch to new generation complete!${NC}"
+33
apps/x86_64-linux/check-keys
+33
apps/x86_64-linux/check-keys
···
···
1
+
#!/usr/bin/env bash
2
+
set -e
3
+
4
+
RED='\033[0;31m'
5
+
GREEN='\033[0;32m'
6
+
NC='\033[0m'
7
+
8
+
# We're assuming this is being run as root in the NixOS installer
9
+
export SSH_DIR=/root/.ssh
10
+
11
+
check_keys() {
12
+
if [[ -f "${SSH_DIR}/id_ed25519" && -f "${SSH_DIR}/id_ed25519.pub" && -f "${SSH_DIR}/id_ed25519_agenix" && -f "${SSH_DIR}/id_ed25519_agenix.pub" ]]; then
13
+
echo -e "${GREEN}All SSH keys are present.${NC}"
14
+
else
15
+
echo -e "${RED}Some SSH keys are missing.${NC}"
16
+
if [[ ! -f "${SSH_DIR}/id_ed25519" ]]; then
17
+
echo -e "${RED}Missing: id_ed25519${NC}"
18
+
fi
19
+
if [[ ! -f "${SSH_DIR}/id_ed25519.pub" ]]; then
20
+
echo -e "${RED}Missing: id_ed25519.pub${NC}"
21
+
fi
22
+
if [[ ! -f "${SSH_DIR}/id_ed25519_agenix" ]]; then
23
+
echo -e "${RED}Missing: id_ed25519_agenix${NC}"
24
+
fi
25
+
if [[ ! -f "${SSH_DIR}/id_ed25519_agenix.pub" ]]; then
26
+
echo -e "${RED}Missing: id_ed25519_agenix.pub${NC}"
27
+
fi
28
+
echo -e "${GREEN}Run the createKeys script to generate the missing keys.${NC}"
29
+
exit 1
30
+
fi
31
+
}
32
+
33
+
check_keys
+71
apps/x86_64-linux/copy-keys
+71
apps/x86_64-linux/copy-keys
···
···
1
+
#!/usr/bin/env bash
2
+
set -e
3
+
4
+
unmount_usb() {
5
+
if mountpoint -q /mnt/usb; then
6
+
sudo umount /mnt/usb
7
+
echo -e "\e[0;32mUSB drive unmounted.\e[0m"
8
+
fi
9
+
}
10
+
11
+
mount_usb() {
12
+
if mountpoint -q /mnt/usb; then
13
+
echo -e "\e[0;32mUSB drive already mounted.\e[0m"
14
+
else
15
+
device_found=false
16
+
for dev in sda sdb sdc sdd sde sdf sdg sdh sdi sdj sdk sdl; do
17
+
if sudo blkid /dev/$dev | grep -iq 'TYPE="vfat"'; then
18
+
device_found=true
19
+
mkdir -p /mnt/usb
20
+
sudo mount /dev/$dev /mnt/usb && { echo -e "\e[0;32mUSB drive mounted successfully on /dev/$dev.\e[0m"; break; } || echo -e "\e[0;31mFailed to mount /dev/$dev.\e[0m"
21
+
fi
22
+
done
23
+
if [ "$device_found" = false ]; then
24
+
echo -e "\e[0;31mNo USB devices found.\e[0m"
25
+
fi
26
+
fi
27
+
}
28
+
29
+
setup_ssh_directory() {
30
+
export SSH_DIR=/root/.ssh
31
+
mkdir -p $SSH_DIR
32
+
}
33
+
34
+
check_file_exists() {
35
+
if [[ ! -f $1 ]]; then
36
+
echo -e "\e[0;31mError: File $1 does not exist.\e[0m"
37
+
exit 1
38
+
fi
39
+
}
40
+
41
+
copy_keys() {
42
+
check_file_exists "/mnt/usb/id_ed25519_agenix.pub"
43
+
check_file_exists "/mnt/usb/id_ed25519_agenix"
44
+
cp /mnt/usb/id_ed25519_agenix.pub $SSH_DIR
45
+
cp /mnt/usb/id_ed25519_agenix $SSH_DIR
46
+
chmod 600 $SSH_DIR/id_ed25519_{agenix,agenix.pub}
47
+
echo -e "\e[0;32mKeys copied successfully.\e[0m"
48
+
}
49
+
50
+
set_keys() {
51
+
check_file_exists "/mnt/usb/id_ed25519_github.pub"
52
+
check_file_exists "/mnt/usb/id_ed25519_github"
53
+
cp /mnt/usb/id_ed25519_github.pub $SSH_DIR/id_ed25519.pub
54
+
cp /mnt/usb/id_ed25519_github $SSH_DIR/id_ed25519
55
+
chmod 600 $SSH_DIR/id_ed25519
56
+
chmod 644 $SSH_DIR/id_ed25519.pub
57
+
}
58
+
59
+
change_ownership() {
60
+
chown nixos:wheel $SSH_DIR/id_ed25519{,.pub}
61
+
chown nixos:wheel $SSH_DIR/id_ed25519_{agenix,agenix.pub}
62
+
}
63
+
64
+
trap unmount_usb EXIT
65
+
66
+
setup_ssh_directory
67
+
mount_usb
68
+
copy_keys
69
+
set_keys
70
+
change_ownership
71
+
unmount_usb
+27
apps/x86_64-linux/create-keys
+27
apps/x86_64-linux/create-keys
···
···
1
+
#!/usr/bin/env bash
2
+
set -e
3
+
4
+
RED='\033[0;31m'
5
+
GREEN='\033[0;32m'
6
+
NC='\033[0m'
7
+
8
+
# We're assuming this is being run as root in the NixOS installer
9
+
export SSH_DIR=/root/.ssh
10
+
11
+
setup_ssh_directory() {
12
+
mkdir -p ${SSH_DIR}
13
+
}
14
+
15
+
generate_keys() {
16
+
ssh-keygen -t ed25519 -f "${SSH_DIR}/id_ed25519" -N ""
17
+
ssh-keygen -t ed25519 -f "${SSH_DIR}/id_ed25519_agenix" -N ""
18
+
chmod 600 ${SSH_DIR}/id_ed25519{,_agenix}{,.pub}
19
+
}
20
+
21
+
setup_ssh_directory
22
+
generate_keys
23
+
24
+
echo -e "${GREEN}New SSH keys have been generated.${NC}"
25
+
echo -e "${GREEN}1) Add the id_ed25519 key to Github.${NC}"
26
+
cat "${SSH_DIR}/id_ed25519.pub"
27
+
echo -e "${GREEN}2) Create a private nix-secrets repo in Github, even if it's empty.${NC}"
+80
apps/x86_64-linux/install
+80
apps/x86_64-linux/install
···
···
1
+
#!/usr/bin/env bash
2
+
set -exu
3
+
4
+
check_installer() {
5
+
if [ -e /etc/NIXOS ]; then
6
+
echo -e "\e[1;32mRunning in the NixOS installer environment.\e[0m"
7
+
else
8
+
echo -e "\e[1;31mNot running in the NixOS installer environment.\e[0m"
9
+
exit 1
10
+
fi
11
+
}
12
+
13
+
cleanup() {
14
+
rm -rf nixos-config-main.zip nixos-config-main nixos-config
15
+
}
16
+
17
+
download_config() {
18
+
curl -LJ0 https://github.com/dustinlyons/nixos-config/archive/main.zip -o nixos-config-main.zip
19
+
unzip nixos-config-main.zip
20
+
mv nixos-config-main/templates/starter nixos-config
21
+
cd nixos-config
22
+
}
23
+
24
+
run_apply() {
25
+
./apps/x86_64-linux/apply
26
+
if [ ! -f /tmp/username.txt ]; then
27
+
echo -e "\e[1;31mError: /tmp/username.txt does not exist.\e[0m"
28
+
exit 1
29
+
fi
30
+
export USERNAME=$(cat /tmp/username.txt)
31
+
}
32
+
33
+
run_disko() {
34
+
sudo nix run --extra-experimental-features nix-command --extra-experimental-features flakes \
35
+
github:nix-community/disko -- --mode zap_create_mount ./modules/nixos/disk-config.nix
36
+
}
37
+
38
+
setup_files() {
39
+
sudo mkdir -p /mnt/etc/nixos
40
+
sudo cp -r * /mnt/etc/nixos
41
+
cd /mnt/etc/nixos
42
+
}
43
+
44
+
install_nixos() {
45
+
ARCH=$(uname -m)
46
+
47
+
case "$ARCH" in
48
+
x86_64)
49
+
FLAKE_TARGET="x86_64-linux"
50
+
;;
51
+
aarch64)
52
+
FLAKE_TARGET="aarch64-linux"
53
+
;;
54
+
*)
55
+
echo -e "${RED}Unsupported architecture: $ARCH${CLEAR}"
56
+
exit 1
57
+
;;
58
+
esac
59
+
60
+
sudo nixos-install --flake .#$FLAKE_TARGET $@
61
+
sudo chmod -R 775 /mnt/etc/nixos
62
+
}
63
+
64
+
prompt_reboot() {
65
+
read -p "Do you want to reboot now? (y/yes) " choice
66
+
case "$choice" in
67
+
y|Y|yes|YES ) echo -e "\e[1;32mRebooting...\e[0m" && sudo reboot;;
68
+
* ) echo -e "\e[1;33mReboot skipped.\e[0m";;
69
+
esac
70
+
}
71
+
72
+
cleanup
73
+
check_installer
74
+
download_config
75
+
run_apply
76
+
run_disko
77
+
setup_files
78
+
install_nixos
79
+
cleanup
80
+
prompt_reboot
+104
apps/x86_64-linux/install-with-secrets
+104
apps/x86_64-linux/install-with-secrets
···
···
1
+
#!/usr/bin/env bash
2
+
set -exu
3
+
4
+
check_installer() {
5
+
if [ -e /etc/NIXOS ]; then
6
+
echo -e "\e[1;32mRunning in the NixOS installer environment.\e[0m"
7
+
else
8
+
echo -e "\e[1;31mNot running in the NixOS installer environment.\e[0m"
9
+
exit 1
10
+
fi
11
+
}
12
+
13
+
cleanup() {
14
+
rm -rf nixos-config-main.zip nixos-config-main nixos-config
15
+
}
16
+
17
+
download_config() {
18
+
curl -LJ0 https://github.com/dustinlyons/nixos-config/archive/main.zip -o nixos-config-main.zip
19
+
unzip nixos-config-main.zip
20
+
mv nixos-config-main/templates/starterWithSecrets nixos-config
21
+
cd nixos-config
22
+
}
23
+
24
+
run_apply() {
25
+
./apps/x86_64-linux/apply
26
+
if [ ! -f /tmp/username.txt ]; then
27
+
echo -e "\e[1;31mError: /tmp/username.txt does not exist.\e[0m"
28
+
exit 1
29
+
fi
30
+
export USERNAME=$(cat /tmp/username.txt)
31
+
}
32
+
33
+
run_disko() {
34
+
sudo nix run --extra-experimental-features nix-command --extra-experimental-features flakes \
35
+
github:nix-community/disko -- --mode zap_create_mount ./modules/nixos/disk-config.nix
36
+
}
37
+
38
+
setup_files() {
39
+
sudo mkdir -p /mnt/etc/nixos
40
+
sudo cp -r * /mnt/etc/nixos
41
+
cd /mnt/etc/nixos
42
+
43
+
mkdir -p /root/.ssh
44
+
touch /root/.ssh/known_hosts
45
+
ssh-keyscan -t ed25519 github.com >> /root/.ssh/known_hosts
46
+
}
47
+
48
+
setup_ssh_keys() {
49
+
mkdir -p /mnt/home/${USERNAME}/.ssh
50
+
chown nixos /mnt/home/${USERNAME}/.ssh
51
+
52
+
chown nixos /root/.ssh/id_ed25519_agenix{,.pub}
53
+
cp --preserve=all /root/.ssh/id_ed25519_agenix /mnt/home/${USERNAME}/.ssh/id_ed25519
54
+
cp --preserve=all /root/.ssh/id_ed25519_agenix.pub /mnt/home/${USERNAME}/.ssh/id_ed25519.pub
55
+
cp --preserve=all /root/.ssh/id_ed25519 /mnt/home/${USERNAME}/.ssh/id_github
56
+
cp --preserve=all /root/.ssh/id_ed25519.pub /mnt/home/${USERNAME}/.ssh/id_github.pub
57
+
58
+
chmod 600 /mnt/home/${USERNAME}/.ssh/id_ed25519{,.pub}
59
+
chmod 600 /mnt/home/${USERNAME}/.ssh/id_github{,.pub}
60
+
}
61
+
62
+
link_home_dir() {
63
+
ln -s /mnt/home/${USERNAME} /home/${USERNAME} # Used to grab initial secrets
64
+
}
65
+
66
+
install_nixos() {
67
+
ARCH=$(uname -m)
68
+
69
+
case "$ARCH" in
70
+
x86_64)
71
+
FLAKE_TARGET="x86_64-linux"
72
+
;;
73
+
aarch64)
74
+
FLAKE_TARGET="aarch64-linux"
75
+
;;
76
+
*)
77
+
echo -e "${RED}Unsupported architecture: $ARCH${CLEAR}"
78
+
exit 1
79
+
;;
80
+
esac
81
+
82
+
sudo nixos-install --flake .#$FLAKE_TARGET $@
83
+
sudo chmod -R 775 /mnt/etc/nixos
84
+
}
85
+
86
+
prompt_reboot() {
87
+
read -p "Do you want to reboot now? (y/yes) " choice
88
+
case "$choice" in
89
+
y|Y|yes|YES ) echo -e "\e[1;32mRebooting...\e[0m" && sudo reboot;;
90
+
* ) echo -e "\e[1;33mReboot skipped.\e[0m";;
91
+
esac
92
+
}
93
+
94
+
cleanup
95
+
check_installer
96
+
download_config
97
+
run_apply
98
+
run_disko
99
+
setup_files
100
+
setup_ssh_keys
101
+
link_home_dir
102
+
install_nixos
103
+
cleanup
104
+
prompt_reboot
+1
-2
dns/dnsconfig.js
+1
-2
dns/dnsconfig.js
···
40
A('bin', '69.61.2.203', TTL(300)),
41
A('ci', '69.61.2.203', TTL(300)),
42
A('write', '69.61.2.203', TTL(300)),
43
-
A('photos', '69.61.2.203', TTL(300)),
44
-
// vultr: lituus
45
A('@', '45.77.48.108', TTL(300)),
46
A('jitsi', '45.77.48.108', TTL(300)),
47
A('chat', '45.77.48.108', TTL(300)),
+896
-52
flake.lock
+896
-52
flake.lock
···
10
"systems": "systems"
11
},
12
"locked": {
13
-
"lastModified": 1723293904,
14
-
"narHash": "sha256-b+uqzj+Wa6xgMS9aNbX4I+sXeb5biPDi39VgvSFqFvU=",
15
"owner": "ryantm",
16
"repo": "agenix",
17
-
"rev": "f6291c5935fdc4e0bef208cfc0dcab7e3f7a1c41",
18
"type": "github"
19
},
20
"original": {
···
48
"url": "ssh://gitea@git.sealight.xyz/aynish/basant"
49
}
50
},
51
"darwin": {
52
"inputs": {
53
"nixpkgs": [
···
56
]
57
},
58
"locked": {
59
-
"lastModified": 1700795494,
60
-
"narHash": "sha256-gzGLZSiOhf155FW7262kdHo2YDeugp3VuIFb4/GGng0=",
61
"owner": "lnl7",
62
"repo": "nix-darwin",
63
-
"rev": "4b9b83d5a92e8c1fbfd8eb27eda375908c11ec4d",
64
"type": "github"
65
},
66
"original": {
67
"owner": "lnl7",
68
"ref": "master",
69
"repo": "nix-darwin",
70
"type": "github"
···
72
},
73
"deploy-rs": {
74
"inputs": {
75
-
"flake-compat": "flake-compat",
76
"nixpkgs": [
77
"nixpkgs"
78
],
79
"utils": "utils"
80
},
81
"locked": {
82
-
"lastModified": 1718194053,
83
-
"narHash": "sha256-FaGrf7qwZ99ehPJCAwgvNY5sLCqQ3GDiE/6uLhxxwSY=",
84
"owner": "serokell",
85
"repo": "deploy-rs",
86
-
"rev": "3867348fa92bc892eba5d9ddb2d7a97b9e127a8a",
87
"type": "github"
88
},
89
"original": {
···
130
]
131
},
132
"locked": {
133
-
"lastModified": 1724031427,
134
-
"narHash": "sha256-o1HdAf+7IGv9M13R3c+zc/sJ0QgeEnhsvHBcodI4UpM=",
135
"owner": "nix-community",
136
"repo": "disko",
137
-
"rev": "4e719b38fa7c85f4f65d0308ca7084c91e7bdd6d",
138
"type": "github"
139
},
140
"original": {
···
143
"type": "github"
144
}
145
},
146
"flake-compat": {
147
"flake": false,
148
"locked": {
···
162
"flake-compat_2": {
163
"flake": false,
164
"locked": {
165
"lastModified": 1641205782,
166
"narHash": "sha256-4jY7RCWUoZ9cKD8co0/4tFARpWB+57+r1bLLvXNJliY=",
167
"owner": "edolstra",
···
175
"type": "github"
176
}
177
},
178
"flake-utils": {
179
"locked": {
180
"lastModified": 1638122382,
···
191
}
192
},
193
"flake-utils_2": {
194
"locked": {
195
"lastModified": 1667395993,
196
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
···
205
"type": "github"
206
}
207
},
208
"grasp": {
209
"inputs": {
210
-
"flake-utils": "flake-utils_2",
211
"nixpkgs": [
212
"nixpkgs"
213
]
···
229
},
230
"hardware": {
231
"locked": {
232
-
"lastModified": 1723310128,
233
-
"narHash": "sha256-IiH8jG6PpR4h9TxSGMYh+2/gQiJW9MwehFvheSb5rPc=",
234
"owner": "nixos",
235
"repo": "nixos-hardware",
236
-
"rev": "c54cf53e022b0b3c1d3b8207aa0f9b194c24f0cf",
237
"type": "github"
238
},
239
"original": {
···
250
]
251
},
252
"locked": {
253
-
"lastModified": 1703113217,
254
-
"narHash": "sha256-7ulcXOk63TIT2lVDSExj7XzFx09LpdSAPtvgtM7yQPE=",
255
"owner": "nix-community",
256
"repo": "home-manager",
257
-
"rev": "3bfaacf46133c037bb356193bd2f1765d9dc82c1",
258
"type": "github"
259
},
260
"original": {
···
270
]
271
},
272
"locked": {
273
-
"lastModified": 1751810233,
274
-
"narHash": "sha256-kllkNbIqQi3VplgTMeGzuh1t8Gk8TauvkTRt93Km+tQ=",
275
"owner": "nix-community",
276
"repo": "home-manager",
277
-
"rev": "9b0873b46c9f9e4b7aa01eb634952c206af53068",
278
"type": "github"
279
},
280
"original": {
···
284
"type": "github"
285
}
286
},
287
"nix-matrix-appservices": {
288
"inputs": {
289
"devshell": "devshell",
290
-
"flake-compat": "flake-compat_2",
291
"nixlib": "nixlib",
292
-
"nixpkgs": "nixpkgs"
293
},
294
"locked": {
295
"lastModified": 1683490239,
···
322
},
323
"nixos-hardware": {
324
"locked": {
325
-
"lastModified": 1723310128,
326
-
"narHash": "sha256-IiH8jG6PpR4h9TxSGMYh+2/gQiJW9MwehFvheSb5rPc=",
327
"owner": "NixOS",
328
"repo": "nixos-hardware",
329
-
"rev": "c54cf53e022b0b3c1d3b8207aa0f9b194c24f0cf",
330
"type": "github"
331
},
332
"original": {
···
338
},
339
"nixpkgs": {
340
"locked": {
341
"lastModified": 1662099760,
342
"narHash": "sha256-MdZLCTJPeHi/9fg6R9fiunyDwP3XHJqDd51zWWz9px0=",
343
"owner": "NixOS",
···
352
"type": "github"
353
}
354
},
355
-
"nixpkgs_2": {
356
"locked": {
357
-
"lastModified": 1755274400,
358
-
"narHash": "sha256-rTInmnp/xYrfcMZyFMH3kc8oko5zYfxsowaLv1LVobY=",
359
"owner": "nixos",
360
"repo": "nixpkgs",
361
-
"rev": "ad7196ae55c295f53a7d1ec39e4a06d922f3b899",
362
"type": "github"
363
},
364
"original": {
365
"owner": "nixos",
366
-
"ref": "nixos-25.05",
367
"repo": "nixpkgs",
368
"type": "github"
369
}
370
},
371
"nur": {
372
"locked": {
373
-
"lastModified": 1724040334,
374
-
"narHash": "sha256-Ia4gRRmhFn4oJ4SJKJPDNPomsRRFWU+bqCK7yuiLW4E=",
375
"owner": "nix-community",
376
"repo": "NUR",
377
-
"rev": "24471a48600e18669d13d24c9640b9859357d2cf",
378
"type": "github"
379
},
380
"original": {
381
"owner": "nix-community",
382
"repo": "NUR",
383
"type": "github"
384
}
385
},
···
390
]
391
},
392
"locked": {
393
-
"lastModified": 1756350023,
394
-
"narHash": "sha256-4S6EUvEFvOnwjSo/LqAVVuX2/JjAJ8gQFmQQ0DS4oXU=",
395
"ref": "main",
396
-
"rev": "a807111f9b20c501183516baf8082c4359aaaaa1",
397
-
"revCount": 1594,
398
"type": "git",
399
"url": "ssh://gitea@git.sealight.xyz/aynish/kitaab"
400
},
···
404
"url": "ssh://gitea@git.sealight.xyz/aynish/kitaab"
405
}
406
},
407
"root": {
408
"inputs": {
409
"agenix": "agenix",
410
"basant": "basant",
411
"deploy-rs": "deploy-rs",
412
"disko": "disko",
413
"grasp": "grasp",
414
"hardware": "hardware",
415
"home-manager": "home-manager_2",
416
"nix-matrix-appservices": "nix-matrix-appservices",
417
"nixos-hardware": "nixos-hardware",
418
-
"nixpkgs": "nixpkgs_2",
419
"nur": "nur",
420
"poonam": "poonam",
421
"rust-overlay": "rust-overlay",
422
"tidalcycles": "tidalcycles",
423
"unstable": "unstable",
424
-
"vimwikicli": "vimwikicli"
425
}
426
},
427
"rust-overlay": {
···
431
]
432
},
433
"locked": {
434
-
"lastModified": 1724034091,
435
-
"narHash": "sha256-b1g7w0sw+MDAhUAeCoX1vlTghsqcDZkxr+k9OZmxPa8=",
436
"owner": "oxalica",
437
"repo": "rust-overlay",
438
-
"rev": "c7d36e0947826e0751a5214ffe82533fbc909bc0",
439
"type": "github"
440
},
441
"original": {
···
444
"type": "github"
445
}
446
},
447
"superdirt-src": {
448
"flake": false,
449
"locked": {
···
490
"type": "github"
491
}
492
},
493
"tidal-src": {
494
"flake": false,
495
"locked": {
···
519
"vowel-src": "vowel-src"
520
},
521
"locked": {
522
-
"lastModified": 1723223284,
523
-
"narHash": "sha256-NAT+g5nsaJZkpR0sCZjerd1xx233ZUdRH3ZWwZhzq/c=",
524
"owner": "mitchmindtree",
525
"repo": "tidalcycles.nix",
526
-
"rev": "82f3e8e8d02eb9f0c9dfe9ab3773b825c6bc1982",
527
"type": "github"
528
},
529
"original": {
···
532
"type": "github"
533
}
534
},
535
"unstable": {
536
"locked": {
537
-
"lastModified": 1752687322,
538
-
"narHash": "sha256-RKwfXA4OZROjBTQAl9WOZQFm7L8Bo93FQwSJpAiSRvo=",
539
"owner": "nixos",
540
"repo": "nixpkgs",
541
-
"rev": "6e987485eb2c77e5dcc5af4e3c70843711ef9251",
542
"type": "github"
543
},
544
"original": {
···
550
},
551
"utils": {
552
"inputs": {
553
-
"systems": "systems_2"
554
},
555
"locked": {
556
"lastModified": 1701680307,
···
616
"original": {
617
"owner": "supercollider-quarks",
618
"repo": "vowel",
619
"type": "github"
620
}
621
}
···
10
"systems": "systems"
11
},
12
"locked": {
13
+
"lastModified": 1747575206,
14
+
"narHash": "sha256-NwmAFuDUO/PFcgaGGr4j3ozG9Pe5hZ/ogitWhY+D81k=",
15
"owner": "ryantm",
16
"repo": "agenix",
17
+
"rev": "4835b1dc898959d8547a871ef484930675cb47f1",
18
"type": "github"
19
},
20
"original": {
···
48
"url": "ssh://gitea@git.sealight.xyz/aynish/basant"
49
}
50
},
51
+
"breezy": {
52
+
"inputs": {
53
+
"flake-compat": "flake-compat",
54
+
"flake-utils": "flake-utils_2",
55
+
"nixpkgs": [
56
+
"unstable"
57
+
]
58
+
},
59
+
"locked": {
60
+
"lastModified": 1746128594,
61
+
"narHash": "sha256-yynk80vxbBk3zhcGj/FT8lz2DBrjxb/1OoRy8JEbqtQ=",
62
+
"owner": "shymega",
63
+
"repo": "breezy-desktop",
64
+
"rev": "77b9d4ef8dbf6a26427be6f3edae49d3c36fd5bc",
65
+
"type": "github"
66
+
},
67
+
"original": {
68
+
"owner": "shymega",
69
+
"ref": "shymega/add-nix-flake-support",
70
+
"repo": "breezy-desktop",
71
+
"type": "github"
72
+
}
73
+
},
74
+
"brew-src": {
75
+
"flake": false,
76
+
"locked": {
77
+
"lastModified": 1746795192,
78
+
"narHash": "sha256-Cv+RXuzmn2iGBY2Ny/nXBTH+LFKDWIvMxf9a+btKI6M=",
79
+
"owner": "Homebrew",
80
+
"repo": "brew",
81
+
"rev": "6f39076b3c2251994419215279d0525ef667fc31",
82
+
"type": "github"
83
+
},
84
+
"original": {
85
+
"owner": "Homebrew",
86
+
"ref": "4.5.2",
87
+
"repo": "brew",
88
+
"type": "github"
89
+
}
90
+
},
91
+
"crane": {
92
+
"flake": false,
93
+
"locked": {
94
+
"lastModified": 1699217310,
95
+
"narHash": "sha256-xpW3VFUG7yE6UE6Wl0dhqencuENSkV7qpnpe9I8VbPw=",
96
+
"owner": "ipetkov",
97
+
"repo": "crane",
98
+
"rev": "d535642bbe6f377077f7c23f0febb78b1463f449",
99
+
"type": "github"
100
+
},
101
+
"original": {
102
+
"owner": "ipetkov",
103
+
"ref": "v0.15.0",
104
+
"repo": "crane",
105
+
"type": "github"
106
+
}
107
+
},
108
"darwin": {
109
"inputs": {
110
"nixpkgs": [
···
113
]
114
},
115
"locked": {
116
+
"lastModified": 1744478979,
117
+
"narHash": "sha256-dyN+teG9G82G+m+PX/aSAagkC+vUv0SgUw3XkPhQodQ=",
118
"owner": "lnl7",
119
"repo": "nix-darwin",
120
+
"rev": "43975d782b418ebf4969e9ccba82466728c2851b",
121
"type": "github"
122
},
123
"original": {
124
"owner": "lnl7",
125
+
"ref": "master",
126
+
"repo": "nix-darwin",
127
+
"type": "github"
128
+
}
129
+
},
130
+
"darwin_2": {
131
+
"inputs": {
132
+
"nixpkgs": [
133
+
"nixpkgs"
134
+
]
135
+
},
136
+
"locked": {
137
+
"lastModified": 1748065210,
138
+
"narHash": "sha256-dFqlLNW6UW19m0vg5FHWLH2G2LGkqYyPs/4YqfoZMoM=",
139
+
"owner": "LnL7",
140
+
"repo": "nix-darwin",
141
+
"rev": "acd6aa5a9065c6695212be313e06f08f7184cb25",
142
+
"type": "github"
143
+
},
144
+
"original": {
145
+
"owner": "LnL7",
146
"ref": "master",
147
"repo": "nix-darwin",
148
"type": "github"
···
150
},
151
"deploy-rs": {
152
"inputs": {
153
+
"flake-compat": "flake-compat_2",
154
"nixpkgs": [
155
"nixpkgs"
156
],
157
"utils": "utils"
158
},
159
"locked": {
160
+
"lastModified": 1727447169,
161
+
"narHash": "sha256-3KyjMPUKHkiWhwR91J1YchF6zb6gvckCAY1jOE+ne0U=",
162
"owner": "serokell",
163
"repo": "deploy-rs",
164
+
"rev": "aa07eb05537d4cd025e2310397a6adcedfe72c76",
165
"type": "github"
166
},
167
"original": {
···
208
]
209
},
210
"locked": {
211
+
"lastModified": 1747742835,
212
+
"narHash": "sha256-kYL4GCwwznsypvsnA20oyvW8zB/Dvn6K5G/tgMjVMT4=",
213
"owner": "nix-community",
214
"repo": "disko",
215
+
"rev": "df522e787fdffc4f32ed3e1fca9ed0968a384d62",
216
"type": "github"
217
},
218
"original": {
···
221
"type": "github"
222
}
223
},
224
+
"dream2nix": {
225
+
"inputs": {
226
+
"nixpkgs": [
227
+
"sg-nvim",
228
+
"nci",
229
+
"nixpkgs"
230
+
],
231
+
"purescript-overlay": "purescript-overlay",
232
+
"pyproject-nix": "pyproject-nix"
233
+
},
234
+
"locked": {
235
+
"lastModified": 1722526955,
236
+
"narHash": "sha256-fFS8aDnfK9Qfm2FLnQ8pqWk8FzvFEv5LvTuZTZLREnc=",
237
+
"owner": "nix-community",
238
+
"repo": "dream2nix",
239
+
"rev": "3fd4c14d3683baac8d1f94286ae14fe160888b51",
240
+
"type": "github"
241
+
},
242
+
"original": {
243
+
"owner": "nix-community",
244
+
"repo": "dream2nix",
245
+
"type": "github"
246
+
}
247
+
},
248
"flake-compat": {
249
"flake": false,
250
"locked": {
···
264
"flake-compat_2": {
265
"flake": false,
266
"locked": {
267
+
"lastModified": 1696426674,
268
+
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
269
+
"owner": "edolstra",
270
+
"repo": "flake-compat",
271
+
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
272
+
"type": "github"
273
+
},
274
+
"original": {
275
+
"owner": "edolstra",
276
+
"repo": "flake-compat",
277
+
"type": "github"
278
+
}
279
+
},
280
+
"flake-compat_3": {
281
+
"flake": false,
282
+
"locked": {
283
"lastModified": 1641205782,
284
"narHash": "sha256-4jY7RCWUoZ9cKD8co0/4tFARpWB+57+r1bLLvXNJliY=",
285
"owner": "edolstra",
···
293
"type": "github"
294
}
295
},
296
+
"flake-compat_4": {
297
+
"flake": false,
298
+
"locked": {
299
+
"lastModified": 1696426674,
300
+
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
301
+
"owner": "edolstra",
302
+
"repo": "flake-compat",
303
+
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
304
+
"type": "github"
305
+
},
306
+
"original": {
307
+
"owner": "edolstra",
308
+
"repo": "flake-compat",
309
+
"type": "github"
310
+
}
311
+
},
312
+
"flake-compat_5": {
313
+
"flake": false,
314
+
"locked": {
315
+
"lastModified": 1733328505,
316
+
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
317
+
"owner": "edolstra",
318
+
"repo": "flake-compat",
319
+
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
320
+
"type": "github"
321
+
},
322
+
"original": {
323
+
"owner": "edolstra",
324
+
"repo": "flake-compat",
325
+
"type": "github"
326
+
}
327
+
},
328
+
"flake-parts": {
329
+
"inputs": {
330
+
"nixpkgs-lib": [
331
+
"nur",
332
+
"nixpkgs"
333
+
]
334
+
},
335
+
"locked": {
336
+
"lastModified": 1733312601,
337
+
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
338
+
"owner": "hercules-ci",
339
+
"repo": "flake-parts",
340
+
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
341
+
"type": "github"
342
+
},
343
+
"original": {
344
+
"owner": "hercules-ci",
345
+
"repo": "flake-parts",
346
+
"type": "github"
347
+
}
348
+
},
349
+
"flake-parts_2": {
350
+
"inputs": {
351
+
"nixpkgs-lib": "nixpkgs-lib"
352
+
},
353
+
"locked": {
354
+
"lastModified": 1725234343,
355
+
"narHash": "sha256-+ebgonl3NbiKD2UD0x4BszCZQ6sTfL4xioaM49o5B3Y=",
356
+
"owner": "hercules-ci",
357
+
"repo": "flake-parts",
358
+
"rev": "567b938d64d4b4112ee253b9274472dc3a346eb6",
359
+
"type": "github"
360
+
},
361
+
"original": {
362
+
"owner": "hercules-ci",
363
+
"repo": "flake-parts",
364
+
"type": "github"
365
+
}
366
+
},
367
"flake-utils": {
368
"locked": {
369
"lastModified": 1638122382,
···
380
}
381
},
382
"flake-utils_2": {
383
+
"inputs": {
384
+
"systems": "systems_2"
385
+
},
386
+
"locked": {
387
+
"lastModified": 1726560853,
388
+
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
389
+
"owner": "numtide",
390
+
"repo": "flake-utils",
391
+
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
392
+
"type": "github"
393
+
},
394
+
"original": {
395
+
"owner": "numtide",
396
+
"repo": "flake-utils",
397
+
"type": "github"
398
+
}
399
+
},
400
+
"flake-utils_3": {
401
"locked": {
402
"lastModified": 1667395993,
403
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
···
412
"type": "github"
413
}
414
},
415
+
"flake-utils_4": {
416
+
"inputs": {
417
+
"systems": "systems_4"
418
+
},
419
+
"locked": {
420
+
"lastModified": 1731533236,
421
+
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
422
+
"owner": "numtide",
423
+
"repo": "flake-utils",
424
+
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
425
+
"type": "github"
426
+
},
427
+
"original": {
428
+
"owner": "numtide",
429
+
"repo": "flake-utils",
430
+
"type": "github"
431
+
}
432
+
},
433
+
"gitignore": {
434
+
"inputs": {
435
+
"nixpkgs": [
436
+
"sg-nvim",
437
+
"pre-commit-nix",
438
+
"nixpkgs"
439
+
]
440
+
},
441
+
"locked": {
442
+
"lastModified": 1709087332,
443
+
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
444
+
"owner": "hercules-ci",
445
+
"repo": "gitignore.nix",
446
+
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
447
+
"type": "github"
448
+
},
449
+
"original": {
450
+
"owner": "hercules-ci",
451
+
"repo": "gitignore.nix",
452
+
"type": "github"
453
+
}
454
+
},
455
"grasp": {
456
"inputs": {
457
+
"flake-utils": "flake-utils_3",
458
"nixpkgs": [
459
"nixpkgs"
460
]
···
476
},
477
"hardware": {
478
"locked": {
479
+
"lastModified": 1747900541,
480
+
"narHash": "sha256-dn64Pg9xLETjblwZs9Euu/SsjW80pd6lr5qSiyLY1pg=",
481
"owner": "nixos",
482
"repo": "nixos-hardware",
483
+
"rev": "11f2d9ea49c3e964315215d6baa73a8d42672f06",
484
"type": "github"
485
},
486
"original": {
···
497
]
498
},
499
"locked": {
500
+
"lastModified": 1745494811,
501
+
"narHash": "sha256-YZCh2o9Ua1n9uCvrvi5pRxtuVNml8X2a03qIFfRKpFs=",
502
"owner": "nix-community",
503
"repo": "home-manager",
504
+
"rev": "abfad3d2958c9e6300a883bd443512c55dfeb1be",
505
"type": "github"
506
},
507
"original": {
···
517
]
518
},
519
"locked": {
520
+
"lastModified": 1747556831,
521
+
"narHash": "sha256-Qb84nbYFFk0DzFeqVoHltS2RodAYY5/HZQKE8WnBDsc=",
522
"owner": "nix-community",
523
"repo": "home-manager",
524
+
"rev": "d0bbd221482c2713cccb80220f3c9d16a6e20a33",
525
"type": "github"
526
},
527
"original": {
···
531
"type": "github"
532
}
533
},
534
+
"homebrew-bundle": {
535
+
"flake": false,
536
+
"locked": {
537
+
"lastModified": 1745335228,
538
+
"narHash": "sha256-TIKR2UgtyUmHLNZp255/vLs+1I10hXe+sciMEbAGFwE=",
539
+
"owner": "homebrew",
540
+
"repo": "homebrew-bundle",
541
+
"rev": "a3265c84b232e13048ecbf6fc18a2eedfadbeb08",
542
+
"type": "github"
543
+
},
544
+
"original": {
545
+
"owner": "homebrew",
546
+
"repo": "homebrew-bundle",
547
+
"type": "github"
548
+
}
549
+
},
550
+
"homebrew-cask": {
551
+
"flake": false,
552
+
"locked": {
553
+
"lastModified": 1748113418,
554
+
"narHash": "sha256-lX4WosoMtusSD4GRDRvzwQwzLJUetg5HEWlMcJ4IQmI=",
555
+
"owner": "homebrew",
556
+
"repo": "homebrew-cask",
557
+
"rev": "ed1a02852e1c4a5fab4aef776082ca89cd70f09a",
558
+
"type": "github"
559
+
},
560
+
"original": {
561
+
"owner": "homebrew",
562
+
"repo": "homebrew-cask",
563
+
"type": "github"
564
+
}
565
+
},
566
+
"homebrew-core": {
567
+
"flake": false,
568
+
"locked": {
569
+
"lastModified": 1748120562,
570
+
"narHash": "sha256-b4Qd9nAVW8yMqZ5T9B7HfSrDLCrtsw07D98/NWz2xsE=",
571
+
"owner": "homebrew",
572
+
"repo": "homebrew-core",
573
+
"rev": "b26cd07a06b15767688137a68461cb34fe985efa",
574
+
"type": "github"
575
+
},
576
+
"original": {
577
+
"owner": "homebrew",
578
+
"repo": "homebrew-core",
579
+
"type": "github"
580
+
}
581
+
},
582
+
"jovian": {
583
+
"inputs": {
584
+
"nix-github-actions": "nix-github-actions",
585
+
"nixpkgs": [
586
+
"unstable"
587
+
]
588
+
},
589
+
"locked": {
590
+
"lastModified": 1747990026,
591
+
"narHash": "sha256-sG5VbID+x5+xUC+jjgHibnzg8IllVcH+K2TLmYHLPME=",
592
+
"owner": "jovian-experiments",
593
+
"repo": "jovian-nixos",
594
+
"rev": "e2f4ced874406541a7957f7e2b8f05a0d59a0f00",
595
+
"type": "github"
596
+
},
597
+
"original": {
598
+
"owner": "jovian-experiments",
599
+
"repo": "jovian-nixos",
600
+
"type": "github"
601
+
}
602
+
},
603
+
"mk-naked-shell": {
604
+
"flake": false,
605
+
"locked": {
606
+
"lastModified": 1681286841,
607
+
"narHash": "sha256-3XlJrwlR0nBiREnuogoa5i1b4+w/XPe0z8bbrJASw0g=",
608
+
"owner": "yusdacra",
609
+
"repo": "mk-naked-shell",
610
+
"rev": "7612f828dd6f22b7fb332cc69440e839d7ffe6bd",
611
+
"type": "github"
612
+
},
613
+
"original": {
614
+
"owner": "yusdacra",
615
+
"repo": "mk-naked-shell",
616
+
"type": "github"
617
+
}
618
+
},
619
+
"nci": {
620
+
"inputs": {
621
+
"crane": "crane",
622
+
"dream2nix": "dream2nix",
623
+
"mk-naked-shell": "mk-naked-shell",
624
+
"nixpkgs": "nixpkgs_6",
625
+
"parts": "parts",
626
+
"rust-overlay": "rust-overlay_2",
627
+
"treefmt": "treefmt"
628
+
},
629
+
"locked": {
630
+
"lastModified": 1725862543,
631
+
"narHash": "sha256-tq5GovIMh1CaC4wtf7qdnzyab+tlpIspuR13FHAVibA=",
632
+
"owner": "yusdacra",
633
+
"repo": "nix-cargo-integration",
634
+
"rev": "b60e6590f9d54041660d5dc86242721eb568371d",
635
+
"type": "github"
636
+
},
637
+
"original": {
638
+
"owner": "yusdacra",
639
+
"repo": "nix-cargo-integration",
640
+
"type": "github"
641
+
}
642
+
},
643
+
"nix-darwin": {
644
+
"inputs": {
645
+
"nixpkgs": "nixpkgs"
646
+
},
647
+
"locked": {
648
+
"lastModified": 1716329735,
649
+
"narHash": "sha256-ap51w+VqG21vuzyQ04WrhI2YbWHd3UGz0e7dc/QQmoA=",
650
+
"owner": "LnL7",
651
+
"repo": "nix-darwin",
652
+
"rev": "eac4f25028c1975a939c8f8fba95c12f8a25e01c",
653
+
"type": "github"
654
+
},
655
+
"original": {
656
+
"owner": "LnL7",
657
+
"repo": "nix-darwin",
658
+
"type": "github"
659
+
}
660
+
},
661
+
"nix-github-actions": {
662
+
"inputs": {
663
+
"nixpkgs": [
664
+
"jovian",
665
+
"nixpkgs"
666
+
]
667
+
},
668
+
"locked": {
669
+
"lastModified": 1729697500,
670
+
"narHash": "sha256-VFTWrbzDlZyFHHb1AlKRiD/qqCJIripXKiCSFS8fAOY=",
671
+
"owner": "zhaofengli",
672
+
"repo": "nix-github-actions",
673
+
"rev": "e418aeb728b6aa5ca8c5c71974e7159c2df1d8cf",
674
+
"type": "github"
675
+
},
676
+
"original": {
677
+
"owner": "zhaofengli",
678
+
"ref": "matrix-name",
679
+
"repo": "nix-github-actions",
680
+
"type": "github"
681
+
}
682
+
},
683
+
"nix-homebrew": {
684
+
"inputs": {
685
+
"brew-src": "brew-src",
686
+
"nix-darwin": "nix-darwin",
687
+
"nixpkgs": "nixpkgs_2"
688
+
},
689
+
"locked": {
690
+
"lastModified": 1747444109,
691
+
"narHash": "sha256-fSufrKr8NdhLMuGZGwjGUfH+TIWrjFTRIBhgCRIyxno=",
692
+
"owner": "zhaofengli-wip",
693
+
"repo": "nix-homebrew",
694
+
"rev": "159f21ae77da757bbaeb98c0b16ff2e7b2738350",
695
+
"type": "github"
696
+
},
697
+
"original": {
698
+
"owner": "zhaofengli-wip",
699
+
"repo": "nix-homebrew",
700
+
"type": "github"
701
+
}
702
+
},
703
"nix-matrix-appservices": {
704
"inputs": {
705
"devshell": "devshell",
706
+
"flake-compat": "flake-compat_3",
707
"nixlib": "nixlib",
708
+
"nixpkgs": "nixpkgs_3"
709
},
710
"locked": {
711
"lastModified": 1683490239,
···
738
},
739
"nixos-hardware": {
740
"locked": {
741
+
"lastModified": 1747900541,
742
+
"narHash": "sha256-dn64Pg9xLETjblwZs9Euu/SsjW80pd6lr5qSiyLY1pg=",
743
"owner": "NixOS",
744
"repo": "nixos-hardware",
745
+
"rev": "11f2d9ea49c3e964315215d6baa73a8d42672f06",
746
"type": "github"
747
},
748
"original": {
···
754
},
755
"nixpkgs": {
756
"locked": {
757
+
"lastModified": 1687274257,
758
+
"narHash": "sha256-TutzPriQcZ8FghDhEolnHcYU2oHIG5XWF+/SUBNnAOE=",
759
+
"path": "/nix/store/22qgs3skscd9bmrxv9xv4q5d4wwm5ppx-source",
760
+
"rev": "2c9ecd1f0400076a4d6b2193ad468ff0a7e7fdc5",
761
+
"type": "path"
762
+
},
763
+
"original": {
764
+
"id": "nixpkgs",
765
+
"type": "indirect"
766
+
}
767
+
},
768
+
"nixpkgs-lib": {
769
+
"locked": {
770
+
"lastModified": 1725233747,
771
+
"narHash": "sha256-Ss8QWLXdr2JCBPcYChJhz4xJm+h/xjl4G0c0XlP6a74=",
772
+
"type": "tarball",
773
+
"url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz"
774
+
},
775
+
"original": {
776
+
"type": "tarball",
777
+
"url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz"
778
+
}
779
+
},
780
+
"nixpkgs-stable": {
781
+
"locked": {
782
+
"lastModified": 1720386169,
783
+
"narHash": "sha256-NGKVY4PjzwAa4upkGtAMz1npHGoRzWotlSnVlqI40mo=",
784
+
"owner": "NixOS",
785
+
"repo": "nixpkgs",
786
+
"rev": "194846768975b7ad2c4988bdb82572c00222c0d7",
787
+
"type": "github"
788
+
},
789
+
"original": {
790
+
"owner": "NixOS",
791
+
"ref": "nixos-24.05",
792
+
"repo": "nixpkgs",
793
+
"type": "github"
794
+
}
795
+
},
796
+
"nixpkgs_2": {
797
+
"locked": {
798
+
"lastModified": 1746328495,
799
+
"narHash": "sha256-uKCfuDs7ZM3QpCE/jnfubTg459CnKnJG/LwqEVEdEiw=",
800
+
"owner": "NixOS",
801
+
"repo": "nixpkgs",
802
+
"rev": "979daf34c8cacebcd917d540070b52a3c2b9b16e",
803
+
"type": "github"
804
+
},
805
+
"original": {
806
+
"owner": "NixOS",
807
+
"ref": "nixos-unstable",
808
+
"repo": "nixpkgs",
809
+
"type": "github"
810
+
}
811
+
},
812
+
"nixpkgs_3": {
813
+
"locked": {
814
"lastModified": 1662099760,
815
"narHash": "sha256-MdZLCTJPeHi/9fg6R9fiunyDwP3XHJqDd51zWWz9px0=",
816
"owner": "NixOS",
···
825
"type": "github"
826
}
827
},
828
+
"nixpkgs_4": {
829
+
"locked": {
830
+
"lastModified": 1747862697,
831
+
"narHash": "sha256-U4HaNZ1W26cbOVm0Eb5OdGSnfQVWQKbLSPrSSa78KC0=",
832
+
"owner": "nixos",
833
+
"repo": "nixpkgs",
834
+
"rev": "2baa12ff69913392faf0ace833bc54bba297ea95",
835
+
"type": "github"
836
+
},
837
+
"original": {
838
+
"owner": "nixos",
839
+
"ref": "nixos-24.11",
840
+
"repo": "nixpkgs",
841
+
"type": "github"
842
+
}
843
+
},
844
+
"nixpkgs_5": {
845
+
"locked": {
846
+
"lastModified": 1748026106,
847
+
"narHash": "sha256-6m1Y3/4pVw1RWTsrkAK2VMYSzG4MMIj7sqUy7o8th1o=",
848
+
"owner": "nixos",
849
+
"repo": "nixpkgs",
850
+
"rev": "063f43f2dbdef86376cc29ad646c45c46e93234c",
851
+
"type": "github"
852
+
},
853
+
"original": {
854
+
"owner": "nixos",
855
+
"ref": "nixos-unstable",
856
+
"repo": "nixpkgs",
857
+
"type": "github"
858
+
}
859
+
},
860
+
"nixpkgs_6": {
861
+
"locked": {
862
+
"lastModified": 1725634671,
863
+
"narHash": "sha256-v3rIhsJBOMLR8e/RNWxr828tB+WywYIoajrZKFM+0Gg=",
864
+
"owner": "NixOS",
865
+
"repo": "nixpkgs",
866
+
"rev": "574d1eac1c200690e27b8eb4e24887f8df7ac27c",
867
+
"type": "github"
868
+
},
869
+
"original": {
870
+
"owner": "NixOS",
871
+
"ref": "nixos-unstable",
872
+
"repo": "nixpkgs",
873
+
"type": "github"
874
+
}
875
+
},
876
+
"nixpkgs_7": {
877
"locked": {
878
+
"lastModified": 1725816686,
879
+
"narHash": "sha256-0Kq2MkQ/sQX1rhWJ/ySBBQlBJBUK8mPMDcuDhhdBkSU=",
880
"owner": "nixos",
881
"repo": "nixpkgs",
882
+
"rev": "add0443ee587a0c44f22793b8c8649a0dbc3bb00",
883
"type": "github"
884
},
885
"original": {
886
"owner": "nixos",
887
+
"ref": "nixpkgs-unstable",
888
+
"repo": "nixpkgs",
889
+
"type": "github"
890
+
}
891
+
},
892
+
"nixpkgs_8": {
893
+
"locked": {
894
+
"lastModified": 1719082008,
895
+
"narHash": "sha256-jHJSUH619zBQ6WdC21fFAlDxHErKVDJ5fpN0Hgx4sjs=",
896
+
"owner": "NixOS",
897
+
"repo": "nixpkgs",
898
+
"rev": "9693852a2070b398ee123a329e68f0dab5526681",
899
+
"type": "github"
900
+
},
901
+
"original": {
902
+
"owner": "NixOS",
903
+
"ref": "nixpkgs-unstable",
904
+
"repo": "nixpkgs",
905
+
"type": "github"
906
+
}
907
+
},
908
+
"nixpkgs_9": {
909
+
"locked": {
910
+
"lastModified": 1718428119,
911
+
"narHash": "sha256-WdWDpNaq6u1IPtxtYHHWpl5BmabtpmLnMAx0RdJ/vo8=",
912
+
"owner": "NixOS",
913
+
"repo": "nixpkgs",
914
+
"rev": "e6cea36f83499eb4e9cd184c8a8e823296b50ad5",
915
+
"type": "github"
916
+
},
917
+
"original": {
918
+
"owner": "NixOS",
919
+
"ref": "nixpkgs-unstable",
920
"repo": "nixpkgs",
921
"type": "github"
922
}
923
},
924
"nur": {
925
+
"inputs": {
926
+
"flake-parts": "flake-parts",
927
+
"nixpkgs": "nixpkgs_5",
928
+
"treefmt-nix": "treefmt-nix"
929
+
},
930
"locked": {
931
+
"lastModified": 1748119613,
932
+
"narHash": "sha256-BvOMqlTgRbz8ldRcaf7OTKIRsGlOw4AssphiZGLd0fo=",
933
"owner": "nix-community",
934
"repo": "NUR",
935
+
"rev": "48380b491e6415284292516fe919d78207969e30",
936
"type": "github"
937
},
938
"original": {
939
"owner": "nix-community",
940
"repo": "NUR",
941
+
"type": "github"
942
+
}
943
+
},
944
+
"parts": {
945
+
"inputs": {
946
+
"nixpkgs-lib": [
947
+
"sg-nvim",
948
+
"nci",
949
+
"nixpkgs"
950
+
]
951
+
},
952
+
"locked": {
953
+
"lastModified": 1725234343,
954
+
"narHash": "sha256-+ebgonl3NbiKD2UD0x4BszCZQ6sTfL4xioaM49o5B3Y=",
955
+
"owner": "hercules-ci",
956
+
"repo": "flake-parts",
957
+
"rev": "567b938d64d4b4112ee253b9274472dc3a346eb6",
958
+
"type": "github"
959
+
},
960
+
"original": {
961
+
"owner": "hercules-ci",
962
+
"repo": "flake-parts",
963
"type": "github"
964
}
965
},
···
970
]
971
},
972
"locked": {
973
+
"lastModified": 1738465265,
974
+
"narHash": "sha256-v8nD/2gq8/mILEJqvWgx1q7Fc1purQvV3/WZLQ/t/wc=",
975
"ref": "main",
976
+
"rev": "115f8af750c0d4b6a8c6f97119b12d7e3eb20c6a",
977
+
"revCount": 1552,
978
"type": "git",
979
"url": "ssh://gitea@git.sealight.xyz/aynish/kitaab"
980
},
···
984
"url": "ssh://gitea@git.sealight.xyz/aynish/kitaab"
985
}
986
},
987
+
"pre-commit-nix": {
988
+
"inputs": {
989
+
"flake-compat": "flake-compat_4",
990
+
"gitignore": "gitignore",
991
+
"nixpkgs": "nixpkgs_8",
992
+
"nixpkgs-stable": "nixpkgs-stable"
993
+
},
994
+
"locked": {
995
+
"lastModified": 1725513492,
996
+
"narHash": "sha256-tyMUA6NgJSvvQuzB7A1Sf8+0XCHyfSPRx/b00o6K0uo=",
997
+
"owner": "cachix",
998
+
"repo": "pre-commit-hooks.nix",
999
+
"rev": "7570de7b9b504cfe92025dd1be797bf546f66528",
1000
+
"type": "github"
1001
+
},
1002
+
"original": {
1003
+
"owner": "cachix",
1004
+
"repo": "pre-commit-hooks.nix",
1005
+
"type": "github"
1006
+
}
1007
+
},
1008
+
"purescript-overlay": {
1009
+
"inputs": {
1010
+
"nixpkgs": [
1011
+
"sg-nvim",
1012
+
"nci",
1013
+
"dream2nix",
1014
+
"nixpkgs"
1015
+
],
1016
+
"slimlock": "slimlock"
1017
+
},
1018
+
"locked": {
1019
+
"lastModified": 1696022621,
1020
+
"narHash": "sha256-eMjFmsj2G1E0Q5XiibUNgFjTiSz0GxIeSSzzVdoN730=",
1021
+
"owner": "thomashoneyman",
1022
+
"repo": "purescript-overlay",
1023
+
"rev": "047c7933abd6da8aa239904422e22d190ce55ead",
1024
+
"type": "github"
1025
+
},
1026
+
"original": {
1027
+
"owner": "thomashoneyman",
1028
+
"repo": "purescript-overlay",
1029
+
"type": "github"
1030
+
}
1031
+
},
1032
+
"pyproject-nix": {
1033
+
"flake": false,
1034
+
"locked": {
1035
+
"lastModified": 1702448246,
1036
+
"narHash": "sha256-hFg5s/hoJFv7tDpiGvEvXP0UfFvFEDgTdyHIjDVHu1I=",
1037
+
"owner": "davhau",
1038
+
"repo": "pyproject.nix",
1039
+
"rev": "5a06a2697b228c04dd2f35659b4b659ca74f7aeb",
1040
+
"type": "github"
1041
+
},
1042
+
"original": {
1043
+
"owner": "davhau",
1044
+
"ref": "dream2nix",
1045
+
"repo": "pyproject.nix",
1046
+
"type": "github"
1047
+
}
1048
+
},
1049
"root": {
1050
"inputs": {
1051
"agenix": "agenix",
1052
"basant": "basant",
1053
+
"breezy": "breezy",
1054
+
"darwin": "darwin_2",
1055
"deploy-rs": "deploy-rs",
1056
"disko": "disko",
1057
"grasp": "grasp",
1058
"hardware": "hardware",
1059
"home-manager": "home-manager_2",
1060
+
"homebrew-bundle": "homebrew-bundle",
1061
+
"homebrew-cask": "homebrew-cask",
1062
+
"homebrew-core": "homebrew-core",
1063
+
"jovian": "jovian",
1064
+
"nix-homebrew": "nix-homebrew",
1065
"nix-matrix-appservices": "nix-matrix-appservices",
1066
"nixos-hardware": "nixos-hardware",
1067
+
"nixpkgs": "nixpkgs_4",
1068
"nur": "nur",
1069
"poonam": "poonam",
1070
"rust-overlay": "rust-overlay",
1071
+
"sg-nvim": "sg-nvim",
1072
+
"sourcegraph-src-cli-cask": "sourcegraph-src-cli-cask",
1073
"tidalcycles": "tidalcycles",
1074
"unstable": "unstable",
1075
+
"vimwikicli": "vimwikicli",
1076
+
"xr-linux": "xr-linux"
1077
}
1078
},
1079
"rust-overlay": {
···
1083
]
1084
},
1085
"locked": {
1086
+
"lastModified": 1748054080,
1087
+
"narHash": "sha256-rwFiLLNCwkj9bqePtH1sMqzs1xmohE0Ojq249piMzF4=",
1088
+
"owner": "oxalica",
1089
+
"repo": "rust-overlay",
1090
+
"rev": "2221d8d53c128beb69346fa3ab36da3f19bb1691",
1091
+
"type": "github"
1092
+
},
1093
+
"original": {
1094
+
"owner": "oxalica",
1095
+
"repo": "rust-overlay",
1096
+
"type": "github"
1097
+
}
1098
+
},
1099
+
"rust-overlay_2": {
1100
+
"flake": false,
1101
+
"locked": {
1102
+
"lastModified": 1725848835,
1103
+
"narHash": "sha256-u4lCr+tOEWhsFiww5G04U5jUNzaQJi0/ZMIDGiLeT14=",
1104
+
"owner": "oxalica",
1105
+
"repo": "rust-overlay",
1106
+
"rev": "2ef910a6276a2f34513d18f2f826a8dea72c3b3f",
1107
+
"type": "github"
1108
+
},
1109
+
"original": {
1110
+
"owner": "oxalica",
1111
+
"repo": "rust-overlay",
1112
+
"type": "github"
1113
+
}
1114
+
},
1115
+
"rust-overlay_3": {
1116
+
"inputs": {
1117
+
"nixpkgs": "nixpkgs_9"
1118
+
},
1119
+
"locked": {
1120
+
"lastModified": 1725848835,
1121
+
"narHash": "sha256-u4lCr+tOEWhsFiww5G04U5jUNzaQJi0/ZMIDGiLeT14=",
1122
"owner": "oxalica",
1123
"repo": "rust-overlay",
1124
+
"rev": "2ef910a6276a2f34513d18f2f826a8dea72c3b3f",
1125
"type": "github"
1126
},
1127
"original": {
···
1130
"type": "github"
1131
}
1132
},
1133
+
"sg-nvim": {
1134
+
"inputs": {
1135
+
"flake-parts": "flake-parts_2",
1136
+
"nci": "nci",
1137
+
"nixpkgs": "nixpkgs_7",
1138
+
"pre-commit-nix": "pre-commit-nix",
1139
+
"rust-overlay": "rust-overlay_3"
1140
+
},
1141
+
"locked": {
1142
+
"lastModified": 1737448478,
1143
+
"narHash": "sha256-i5g+pzxB8pAORLbr1wlYWUTsrJJmVj9UwlCg8pU3Suw=",
1144
+
"owner": "sourcegraph",
1145
+
"repo": "sg.nvim",
1146
+
"rev": "775f22b75a9826eabf69b0094dd1d51d619fe552",
1147
+
"type": "github"
1148
+
},
1149
+
"original": {
1150
+
"owner": "sourcegraph",
1151
+
"repo": "sg.nvim",
1152
+
"type": "github"
1153
+
}
1154
+
},
1155
+
"slimlock": {
1156
+
"inputs": {
1157
+
"nixpkgs": [
1158
+
"sg-nvim",
1159
+
"nci",
1160
+
"dream2nix",
1161
+
"purescript-overlay",
1162
+
"nixpkgs"
1163
+
]
1164
+
},
1165
+
"locked": {
1166
+
"lastModified": 1688610262,
1167
+
"narHash": "sha256-Wg0ViDotFWGWqKIQzyYCgayeH8s4U1OZcTiWTQYdAp4=",
1168
+
"owner": "thomashoneyman",
1169
+
"repo": "slimlock",
1170
+
"rev": "b5c6cdcaf636ebbebd0a1f32520929394493f1a6",
1171
+
"type": "github"
1172
+
},
1173
+
"original": {
1174
+
"owner": "thomashoneyman",
1175
+
"repo": "slimlock",
1176
+
"type": "github"
1177
+
}
1178
+
},
1179
+
"sourcegraph-src-cli-cask": {
1180
+
"flake": false,
1181
+
"locked": {
1182
+
"lastModified": 1747940755,
1183
+
"narHash": "sha256-rS+LEcZKOoRN3bH+aZIV1Y4AlPR8dWosiRAA8Q1itBs=",
1184
+
"owner": "sourcegraph",
1185
+
"repo": "homebrew-src-cli",
1186
+
"rev": "34bb40706f3f9641958db65c5c77a1db51140b3d",
1187
+
"type": "github"
1188
+
},
1189
+
"original": {
1190
+
"owner": "sourcegraph",
1191
+
"repo": "homebrew-src-cli",
1192
+
"type": "github"
1193
+
}
1194
+
},
1195
"superdirt-src": {
1196
"flake": false,
1197
"locked": {
···
1238
"type": "github"
1239
}
1240
},
1241
+
"systems_3": {
1242
+
"locked": {
1243
+
"lastModified": 1681028828,
1244
+
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
1245
+
"owner": "nix-systems",
1246
+
"repo": "default",
1247
+
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
1248
+
"type": "github"
1249
+
},
1250
+
"original": {
1251
+
"owner": "nix-systems",
1252
+
"repo": "default",
1253
+
"type": "github"
1254
+
}
1255
+
},
1256
+
"systems_4": {
1257
+
"locked": {
1258
+
"lastModified": 1681028828,
1259
+
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
1260
+
"owner": "nix-systems",
1261
+
"repo": "default",
1262
+
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
1263
+
"type": "github"
1264
+
},
1265
+
"original": {
1266
+
"owner": "nix-systems",
1267
+
"repo": "default",
1268
+
"type": "github"
1269
+
}
1270
+
},
1271
"tidal-src": {
1272
"flake": false,
1273
"locked": {
···
1297
"vowel-src": "vowel-src"
1298
},
1299
"locked": {
1300
+
"lastModified": 1730626669,
1301
+
"narHash": "sha256-nFyZrvTPn9OM9UZmuAwy3e1Ba0ZuYc2FaDCOOhGtqg4=",
1302
"owner": "mitchmindtree",
1303
"repo": "tidalcycles.nix",
1304
+
"rev": "0db0918e7a3d3c30ed7a6e81dc9d4e3832870ac4",
1305
"type": "github"
1306
},
1307
"original": {
···
1310
"type": "github"
1311
}
1312
},
1313
+
"treefmt": {
1314
+
"inputs": {
1315
+
"nixpkgs": [
1316
+
"sg-nvim",
1317
+
"nci",
1318
+
"nixpkgs"
1319
+
]
1320
+
},
1321
+
"locked": {
1322
+
"lastModified": 1725271838,
1323
+
"narHash": "sha256-VcqxWT0O/gMaeWTTjf1r4MOyG49NaNxW4GHTO3xuThE=",
1324
+
"owner": "numtide",
1325
+
"repo": "treefmt-nix",
1326
+
"rev": "9fb342d14b69aefdf46187f6bb80a4a0d97007cd",
1327
+
"type": "github"
1328
+
},
1329
+
"original": {
1330
+
"owner": "numtide",
1331
+
"repo": "treefmt-nix",
1332
+
"type": "github"
1333
+
}
1334
+
},
1335
+
"treefmt-nix": {
1336
+
"inputs": {
1337
+
"nixpkgs": [
1338
+
"nur",
1339
+
"nixpkgs"
1340
+
]
1341
+
},
1342
+
"locked": {
1343
+
"lastModified": 1733222881,
1344
+
"narHash": "sha256-JIPcz1PrpXUCbaccEnrcUS8jjEb/1vJbZz5KkobyFdM=",
1345
+
"owner": "numtide",
1346
+
"repo": "treefmt-nix",
1347
+
"rev": "49717b5af6f80172275d47a418c9719a31a78b53",
1348
+
"type": "github"
1349
+
},
1350
+
"original": {
1351
+
"owner": "numtide",
1352
+
"repo": "treefmt-nix",
1353
+
"type": "github"
1354
+
}
1355
+
},
1356
"unstable": {
1357
"locked": {
1358
+
"lastModified": 1748026106,
1359
+
"narHash": "sha256-6m1Y3/4pVw1RWTsrkAK2VMYSzG4MMIj7sqUy7o8th1o=",
1360
"owner": "nixos",
1361
"repo": "nixpkgs",
1362
+
"rev": "063f43f2dbdef86376cc29ad646c45c46e93234c",
1363
"type": "github"
1364
},
1365
"original": {
···
1371
},
1372
"utils": {
1373
"inputs": {
1374
+
"systems": "systems_3"
1375
},
1376
"locked": {
1377
"lastModified": 1701680307,
···
1437
"original": {
1438
"owner": "supercollider-quarks",
1439
"repo": "vowel",
1440
+
"type": "github"
1441
+
}
1442
+
},
1443
+
"xr-linux": {
1444
+
"inputs": {
1445
+
"flake-compat": "flake-compat_5",
1446
+
"flake-utils": "flake-utils_4",
1447
+
"nixpkgs": [
1448
+
"unstable"
1449
+
]
1450
+
},
1451
+
"locked": {
1452
+
"lastModified": 1746033220,
1453
+
"narHash": "sha256-l4pISN7GDSL2o0BddkWtdCX4k4BjAaW0xwo5DbhfO8A=",
1454
+
"owner": "shymega",
1455
+
"repo": "XRLinuxDriver",
1456
+
"rev": "c6cd02d547f87a156538c131e09ee4d41eb79325",
1457
+
"type": "github"
1458
+
},
1459
+
"original": {
1460
+
"owner": "shymega",
1461
+
"ref": "shymega/nix-flake-support",
1462
+
"repo": "XRLinuxDriver",
1463
"type": "github"
1464
}
1465
}
+208
-65
flake.nix
+208
-65
flake.nix
···
3
4
inputs = {
5
# Nixpkgs
6
-
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
7
unstable.url = "github:nixos/nixpkgs/nixos-unstable";
8
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
9
···
27
poonam.url = "git+ssh://gitea@git.sealight.xyz/aynish/kitaab?ref=main";
28
poonam.inputs.nixpkgs.follows = "nixpkgs";
29
basant.url = "git+ssh://gitea@git.sealight.xyz/aynish/basant?ref=main";
30
-
vimwikicli.url =
31
-
"git+ssh://gitea@git.sealight.xyz/aynish/vimwiki-cli?ref=main";
32
basant.inputs.nixpkgs.follows = "nixpkgs";
33
basant.inputs.poonam.follows = "poonam";
34
vimwikicli.inputs.nixpkgs.follows = "nixpkgs";
···
38
# Matrix
39
nix-matrix-appservices.url = "gitlab:coffeetables/nix-matrix-appservices";
40
41
# Others
42
nur.url = "github:nix-community/NUR";
43
rust-overlay = {
···
55
# muneem.inputs.nixpkgs.follows = "nixpkgs";
56
};
57
58
-
outputs = { self, nixpkgs, unstable, nixos-hardware, home-manager, deploy-rs
59
-
, agenix, disko, basant, grasp, nix-matrix-appservices, nur, tidalcycles
60
-
, rust-overlay, vimwikicli, ... }@inputs:
61
let
62
forAllSystems = nixpkgs.lib.genAttrs [
63
"aarch64-linux"
···
70
# We already have these in scope
71
unstable = unstable.legacyPackages.${prev.system};
72
deploy = deploy-rs.packages.${prev.system}.deploy-rs;
73
};
74
vimwikiOverlay = final: prev: {
75
vimwiki-cli = vimwikicli.packages.${prev.system}.vimwiki-cli;
76
};
77
78
-
nixpkgsFor = forAllSystems (system:
79
-
import nixpkgs {
80
-
inherit system;
81
-
config = {
82
-
permittedInsecurePackages = [
83
-
"olm-3.2.16"
84
-
];
85
-
allowUnfreePredicate = pkg:
86
-
builtins.elem (nixpkgs.lib.getName pkg) [
87
-
"ripcord"
88
-
"vcv-rack"
89
-
"SunVox"
90
-
"renoise"
91
-
];
92
-
};
93
-
overlays = [
94
-
rust-overlay.overlays.default
95
-
tidalcycles.overlays.default
96
-
agenix.overlays.default
97
-
nur.overlay
98
-
# nix-matrix-appservices.overlay # nixpkgs has these packages and newer ones at that
99
-
unstableOverlay
100
-
vimwikiOverlay
101
-
self.overlays.additions
102
-
self.overlays.modifications
103
-
];
104
-
});
105
106
# for when space matters
107
-
litePkgsFor = forAllSystems (system:
108
-
import nixpkgs {
109
-
inherit system;
110
-
# config.permittedInsecurePackages = [
111
-
# "forgejo-1.19.4-0" # Needed for archivebox deployments on curve
112
-
# # Check when archive box updates it's dependeny
113
-
# ];
114
-
overlays = [
115
-
agenix.overlays.default
116
-
self.overlays.additions
117
-
self.overlays.modifications
118
-
tidalcycles.overlays.default # needed for nvim which comes pre-installed lol
119
-
];
120
-
});
121
-
in {
122
-
# Your custom packages
123
-
# Acessible through 'nix build', 'nix shell', etc
124
packages = forAllSystems (system:
125
let pkgs = nixpkgsFor.${system};
126
-
in import ./pkgs { pkgs = pkgs; });
127
# Devshell for bootstrapping
128
# Acessible through 'nix develop' or 'nix-shell' (legacy)
129
devShells = forAllSystems (system:
130
let pkgs = nixpkgsFor.${system};
131
-
in import ./shell.nix { pkgs = pkgs; });
132
133
# Your custom packages and modifications, exported as overlays
134
overlays = import ./overlays;
···
139
# These are usually stuff you would upstream into home-manager
140
homeManagerModules = import ./modules/home-manager;
141
142
# NixOS configuration entrypoint
143
nixosConfigurations = {
144
curve = nixpkgs.lib.nixosSystem rec {
···
220
nix.registry.nixpkgs.flake = nixpkgs;
221
home-manager.useGlobalPkgs = true;
222
home-manager.useUserPackages = true;
223
-
home-manager.users.anish = import ./home/dev;
224
}
225
];
226
};
···
230
# Available through 'home-manager --flake .#your-username@your-hostname'
231
homeConfigurations = {
232
"anish@work" = home-manager.lib.homeManagerConfiguration {
233
-
pkgs =
234
-
nixpkgsFor."x86_64-linux"; # Home-manager requires 'pkgs' instance
235
extraSpecialArgs = { inherit inputs; };
236
-
modules = [ ./home/core.nix ./home/profiles/firefox ];
237
};
238
};
239
···
245
remoteBuild = true;
246
profiles.system = {
247
user = "root";
248
-
path = deploy-rs.lib.x86_64-linux.activate.nixos
249
-
self.nixosConfigurations.box;
250
};
251
};
252
lituus = {
253
hostname = "sealight.xyz";
254
-
autoRollback = false;
255
profiles.system = {
256
user = "root";
257
-
path = deploy-rs.lib.x86_64-linux.activate.nixos
258
-
self.nixosConfigurations.lituus;
259
};
260
};
261
helix = {
···
264
magicRollback = false;
265
profiles.system = {
266
user = "root";
267
-
path = deploy-rs.lib.x86_64-linux.activate.nixos
268
-
self.nixosConfigurations.helix;
269
};
270
};
271
};
272
273
-
# checks = builtins.mapAttrs
274
-
# (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
275
};
276
}
···
3
4
inputs = {
5
# Nixpkgs
6
+
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
7
unstable.url = "github:nixos/nixpkgs/nixos-unstable";
8
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
9
···
27
poonam.url = "git+ssh://gitea@git.sealight.xyz/aynish/kitaab?ref=main";
28
poonam.inputs.nixpkgs.follows = "nixpkgs";
29
basant.url = "git+ssh://gitea@git.sealight.xyz/aynish/basant?ref=main";
30
+
vimwikicli.url = "git+ssh://gitea@git.sealight.xyz/aynish/vimwiki-cli?ref=main";
31
basant.inputs.nixpkgs.follows = "nixpkgs";
32
basant.inputs.poonam.follows = "poonam";
33
vimwikicli.inputs.nixpkgs.follows = "nixpkgs";
···
37
# Matrix
38
nix-matrix-appservices.url = "gitlab:coffeetables/nix-matrix-appservices";
39
40
+
# Jovian
41
+
jovian = {
42
+
url = "github:jovian-experiments/jovian-nixos";
43
+
inputs.nixpkgs.follows = "unstable";
44
+
};
45
+
# Breezy XR for Jovian
46
+
xr-linux = {
47
+
url = "github:shymega/XRLinuxDriver?ref=shymega/nix-flake-support";
48
+
inputs.nixpkgs.follows = "unstable";
49
+
};
50
+
breezy = {
51
+
url = "github:shymega/breezy-desktop?ref=shymega/add-nix-flake-support";
52
+
inputs.nixpkgs.follows = "unstable";
53
+
};
54
+
# OSX
55
+
darwin = {
56
+
url = "github:LnL7/nix-darwin/master";
57
+
inputs.nixpkgs.follows = "nixpkgs";
58
+
};
59
+
nix-homebrew = {
60
+
url = "github:zhaofengli-wip/nix-homebrew";
61
+
};
62
+
homebrew-bundle = {
63
+
url = "github:homebrew/homebrew-bundle";
64
+
flake = false;
65
+
};
66
+
homebrew-core = {
67
+
url = "github:homebrew/homebrew-core";
68
+
flake = false;
69
+
};
70
+
homebrew-cask = {
71
+
url = "github:homebrew/homebrew-cask";
72
+
flake = false;
73
+
};
74
+
75
+
# Sourcegraph
76
+
sourcegraph-src-cli-cask = {
77
+
url = "github:sourcegraph/homebrew-src-cli";
78
+
flake = false;
79
+
};
80
+
sg-nvim.url = "github:sourcegraph/sg.nvim";
81
+
82
# Others
83
nur.url = "github:nix-community/NUR";
84
rust-overlay = {
···
96
# muneem.inputs.nixpkgs.follows = "nixpkgs";
97
};
98
99
+
outputs =
100
+
{ self
101
+
, nixpkgs
102
+
, unstable
103
+
, nixos-hardware
104
+
, home-manager
105
+
, deploy-rs
106
+
, agenix
107
+
, disko
108
+
, basant
109
+
, grasp
110
+
, nix-matrix-appservices
111
+
, nur
112
+
, tidalcycles
113
+
, rust-overlay
114
+
, vimwikicli
115
+
, darwin
116
+
, nix-homebrew
117
+
, homebrew-bundle
118
+
, homebrew-core
119
+
, homebrew-cask
120
+
, sourcegraph-src-cli-cask
121
+
, sg-nvim
122
+
, jovian
123
+
, breezy
124
+
, xr-linux
125
+
, ...
126
+
}@inputs:
127
let
128
forAllSystems = nixpkgs.lib.genAttrs [
129
"aarch64-linux"
···
136
# We already have these in scope
137
unstable = unstable.legacyPackages.${prev.system};
138
deploy = deploy-rs.packages.${prev.system}.deploy-rs;
139
+
sg-nvim = sg-nvim.packages.${prev.system}.default;
140
};
141
vimwikiOverlay = final: prev: {
142
vimwiki-cli = vimwikicli.packages.${prev.system}.vimwiki-cli;
143
};
144
145
+
nixpkgsFor = forAllSystems (system: import nixpkgs {
146
+
inherit system;
147
+
# This doesn't work...
148
+
# on darwin, I need to export ALLOW_NIXPKGS_UNFREE=1
149
+
# and pass --impure (have to manually copy the `nrd` command, it gets passed to the cd)
150
+
config = {
151
+
allowUnfree = true;
152
+
allowUnfreePredicate = _: true;
153
+
};
154
+
# config.allowUnfree = true;
155
+
#config.allowUnfreePredicate = pkg: builtins.elem (nixpkgs.lib.getName pkg) [
156
+
# "ripcord"
157
+
# "VCV-Rack"
158
+
# "SunVox"
159
+
# "renoise"
160
+
# "graphite-cli"
161
+
# "claude-code"
162
+
#];
163
+
# config.permittedInsecurePackages = [
164
+
# "python3.10-django-3.1.14" # Needed for archivebox deployments on curve
165
+
# # Check when archive box updates it's dependeny
166
+
# ];
167
+
overlays = [
168
+
rust-overlay.overlays.default
169
+
tidalcycles.overlays.default
170
+
agenix.overlays.default
171
+
nur.overlay
172
+
nix-matrix-appservices.overlay
173
+
unstableOverlay
174
+
# TODO Not available publically
175
+
# vimwikiOverlay
176
+
self.overlays.additions
177
+
self.overlays.modifications
178
+
];
179
+
});
180
181
# for when space matters
182
+
litePkgsFor = forAllSystems (system: import nixpkgs {
183
+
inherit system;
184
+
# config.permittedInsecurePackages = [
185
+
# "forgejo-1.19.4-0" # Needed for archivebox deployments on curve
186
+
# # Check when archive box updates it's dependeny
187
+
# ];
188
+
overlays = [
189
+
agenix.overlays.default
190
+
self.overlays.additions
191
+
self.overlays.modifications
192
+
tidalcycles.overlays.default # needed for nvim which comes pre-installed lol
193
+
];
194
+
});
195
+
196
+
# for deck
197
+
deckPkgsFor = forAllSystems (system: import unstable {
198
+
inherit system;
199
+
config = {
200
+
allowUnfree = true;
201
+
};
202
+
overlays = [
203
+
breezy.overlays.default
204
+
xr-linux.overlays.default
205
+
nur.overlay
206
+
];
207
+
});
208
+
209
+
darwinSystems = [ "aarch64-darwin" "x86_64-darwin" ];
210
+
in
211
+
{
212
packages = forAllSystems (system:
213
let pkgs = nixpkgsFor.${system};
214
+
in import ./pkgs { pkgs = pkgs; }
215
+
);
216
+
217
# Devshell for bootstrapping
218
# Acessible through 'nix develop' or 'nix-shell' (legacy)
219
devShells = forAllSystems (system:
220
let pkgs = nixpkgsFor.${system};
221
+
in import ./shell.nix { pkgs = pkgs; }
222
+
);
223
224
# Your custom packages and modifications, exported as overlays
225
overlays = import ./overlays;
···
230
# These are usually stuff you would upstream into home-manager
231
homeManagerModules = import ./modules/home-manager;
232
233
+
darwinConfigurations = {
234
+
"Anishs-MacBook-Pro" = darwin.lib.darwinSystem rec {
235
+
system = "aarch64-darwin";
236
+
pkgs = nixpkgsFor.${system};
237
+
specialArgs = { inherit inputs self; };
238
+
modules = [
239
+
./hosts/darwin
240
+
home-manager.darwinModules.home-manager
241
+
agenix.darwinModules.default
242
+
# nix-homebrew.darwinModules.nix-homebrew
243
+
{
244
+
users.users.anishlakhwara.home = "/Users/anishlakhwara";
245
+
home-manager = {
246
+
users.anishlakhwara = import ./home/darwin;
247
+
useGlobalPkgs = true;
248
+
useUserPackages = true;
249
+
};
250
+
# nix-homebrew = {
251
+
# user = "anishlakhwara";
252
+
# enable = true;
253
+
# # taps = {
254
+
# # "homebrew/homebrew-core" = homebrew-core;
255
+
# # "homebrew/homebrew-cask" = homebrew-cask;
256
+
# # "homebrew/homebrew-bundle" = homebrew-bundle;
257
+
# # "sourcegraph/homebrew-src-cli" = sourcegraph-src-cli-cask;
258
+
# # };
259
+
# mutableTaps = true;
260
+
# autoMigrate = true;
261
+
# };
262
+
}
263
+
];
264
+
};
265
+
};
266
+
267
# NixOS configuration entrypoint
268
nixosConfigurations = {
269
curve = nixpkgs.lib.nixosSystem rec {
···
345
nix.registry.nixpkgs.flake = nixpkgs;
346
home-manager.useGlobalPkgs = true;
347
home-manager.useUserPackages = true;
348
+
home-manager.users.anish = import ./home/core;
349
+
}
350
+
];
351
+
};
352
+
353
+
deck = unstable.lib.nixosSystem rec {
354
+
specialArgs = { inherit inputs self; };
355
+
system = "x86_64-linux";
356
+
pkgs = deckPkgsFor.${system};
357
+
modules = [
358
+
./hosts/deck
359
+
jovian.nixosModules.default
360
+
self.nixosModules.wireguard
361
+
agenix.nixosModules.age
362
+
self.nixosModules.backup
363
+
home-manager.nixosModules.home-manager
364
+
{
365
+
nix.registry.nixpkgs.flake = unstable;
366
+
home-manager.useGlobalPkgs = true;
367
+
home-manager.useUserPackages = true;
368
+
home-manager.users.anish = import ./home/gui;
369
}
370
];
371
};
···
375
# Available through 'home-manager --flake .#your-username@your-hostname'
376
homeConfigurations = {
377
"anish@work" = home-manager.lib.homeManagerConfiguration {
378
+
pkgs = nixpkgsFor."x86_64-linux"; # Home-manager requires 'pkgs' instance
379
extraSpecialArgs = { inherit inputs; };
380
+
modules = [
381
+
./home/core.nix
382
+
./home/profiles/firefox
383
+
];
384
};
385
};
386
···
392
remoteBuild = true;
393
profiles.system = {
394
user = "root";
395
+
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.box;
396
};
397
};
398
lituus = {
399
hostname = "sealight.xyz";
400
+
# autoRollback = false;
401
profiles.system = {
402
user = "root";
403
+
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.lituus;
404
};
405
};
406
helix = {
···
409
magicRollback = false;
410
profiles.system = {
411
user = "root";
412
+
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.helix;
413
};
414
};
415
};
416
417
+
checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
418
};
419
}
+1
-1
home/core/default.nix
+1
-1
home/core/default.nix
+156
home/darwin/aerospace/config.toml
+156
home/darwin/aerospace/config.toml
···
···
1
+
# You can use it to add commands that run after login to macOS user session.
2
+
# 'start-at-login' needs to be 'true' for 'after-login-command' to work
3
+
# Available commands: https://nikitabobko.github.io/AeroSpace/commands
4
+
after-login-command = []
5
+
6
+
# You can use it to add commands that run after AeroSpace startup.
7
+
# 'after-startup-command' is run after 'after-login-command'
8
+
# Available commands : https://nikitabobko.github.io/AeroSpace/commands
9
+
after-startup-command = []
10
+
11
+
# Start AeroSpace at login
12
+
start-at-login = true
13
+
14
+
# Normalizations. See: https://nikitabobko.github.io/AeroSpace/guide#normalization
15
+
enable-normalization-flatten-containers = true
16
+
enable-normalization-opposite-orientation-for-nested-containers = true
17
+
18
+
# See: https://nikitabobko.github.io/AeroSpace/guide#layouts
19
+
# The 'accordion-padding' specifies the size of accordion padding
20
+
# You can set 0 to disable the padding feature
21
+
accordion-padding = 10
22
+
23
+
# Possible values: tiles|accordion
24
+
default-root-container-layout = 'tiles'
25
+
26
+
# Possible values: horizontal|vertical|auto
27
+
# 'auto' means: wide monitor (anything wider than high) gets horizontal orientation,
28
+
# tall monitor (anything higher than wide) gets vertical orientation
29
+
default-root-container-orientation = 'auto'
30
+
31
+
# Mouse follows focus when focused monitor changes
32
+
# Drop it from your config, if you don't like this behavior
33
+
# See https://nikitabobko.github.io/AeroSpace/guide#on-focus-changed-callbacks
34
+
# See https://nikitabobko.github.io/AeroSpace/commands#move-mouse
35
+
# Fallback value (if you omit the key): on-focused-monitor-changed = []
36
+
on-focused-monitor-changed = ['move-mouse monitor-lazy-center']
37
+
38
+
# You can effectively turn off macOS "Hide application" (cmd-h) feature by toggling this flag
39
+
# Useful if you don't use this macOS feature, but accidentally hit cmd-h or cmd-alt-h key
40
+
# Also see: https://nikitabobko.github.io/AeroSpace/goodies#disable-hide-app
41
+
automatically-unhide-macos-hidden-apps = true
42
+
43
+
# Possible values: (qwerty|dvorak)
44
+
# See https://nikitabobko.github.io/AeroSpace/guide#key-mapping
45
+
[key-mapping]
46
+
preset = 'dvorak'
47
+
48
+
# Gaps between windows (inner-*) and between monitor edges (outer-*).
49
+
# Possible values:
50
+
# - Constant: gaps.outer.top = 8
51
+
# - Per monitor: gaps.outer.top = [{ monitor.main = 16 }, { monitor."some-pattern" = 32 }, 24]
52
+
# In this example, 24 is a default value when there is no match.
53
+
# Monitor pattern is the same as for 'workspace-to-monitor-force-assignment'.
54
+
# See: https://nikitabobko.github.io/AeroSpace/guide#assign-workspaces-to-monitors
55
+
[gaps]
56
+
inner.horizontal = 0
57
+
inner.vertical = 0
58
+
outer.left = 0
59
+
outer.bottom = 0
60
+
outer.top = 0
61
+
outer.right = 0
62
+
63
+
# 'main' binding mode declaration
64
+
# See: https://nikitabobko.github.io/AeroSpace/guide#binding-modes
65
+
# 'main' binding mode must be always presented
66
+
# Fallback value (if you omit the key): mode.main.binding = {}
67
+
[mode.main.binding]
68
+
69
+
# All possible keys:
70
+
# - Letters. a, b, c, ..., z
71
+
# - Numbers. 0, 1, 2, ..., 9
72
+
# - Keypad numbers. keypad0, keypad1, keypad2, ..., keypad9
73
+
# - F-keys. f1, f2, ..., f20
74
+
# - Special keys. minus, equal, period, comma, slash, backslash, quote, semicolon, backtick,
75
+
# leftSquareBracket, rightSquareBracket, space, enter, esc, backspace, tab
76
+
# - Keypad special. keypadClear, keypadDecimalMark, keypadDivide, keypadEnter, keypadEqual,
77
+
# keypadMinus, keypadMultiply, keypadPlus
78
+
# - Arrows. left, down, up, right
79
+
80
+
# All possible modifiers: cmd, alt, ctrl, shift
81
+
82
+
# All possible commands: https://nikitabobko.github.io/AeroSpace/commands
83
+
84
+
# See: https://nikitabobko.github.io/AeroSpace/commands#exec-and-forget
85
+
# You can uncomment the following lines to open up terminal with alt + enter shortcut (like in i3)
86
+
alt-enter = 'exec-and-forget open -n /System/Applications/Utilities/Kitty.app'
87
+
88
+
# See: https://nikitabobko.github.io/AeroSpace/commands#layout
89
+
alt-slash = 'layout tiles horizontal vertical'
90
+
alt-comma = 'layout accordion horizontal vertical'
91
+
92
+
# See: https://nikitabobko.github.io/AeroSpace/commands#focus
93
+
alt-h = 'focus left'
94
+
alt-j = 'focus down'
95
+
alt-k = 'focus up'
96
+
alt-l = 'focus right'
97
+
98
+
# See: https://nikitabobko.github.io/AeroSpace/commands#move
99
+
alt-shift-h = 'move left'
100
+
alt-shift-j = 'move down'
101
+
alt-shift-k = 'move up'
102
+
alt-shift-l = 'move right'
103
+
104
+
# See: https://nikitabobko.github.io/AeroSpace/commands#resize
105
+
alt-shift-minus = 'resize smart -50'
106
+
alt-shift-equal = 'resize smart +50'
107
+
108
+
# See: https://nikitabobko.github.io/AeroSpace/commands#workspace
109
+
alt-1 = 'workspace 1'
110
+
alt-2 = 'workspace 2'
111
+
alt-3 = 'workspace 3'
112
+
alt-4 = 'workspace 4'
113
+
alt-5 = 'workspace 5'
114
+
alt-6 = 'workspace 6'
115
+
alt-7 = 'workspace 7'
116
+
alt-8 = 'workspace 8'
117
+
alt-9 = 'workspace 9'
118
+
119
+
# See: https://nikitabobko.github.io/AeroSpace/commands#move-node-to-workspace
120
+
alt-shift-1 = 'move-node-to-workspace 1'
121
+
alt-shift-2 = 'move-node-to-workspace 2'
122
+
alt-shift-3 = 'move-node-to-workspace 3'
123
+
alt-shift-4 = 'move-node-to-workspace 4'
124
+
alt-shift-5 = 'move-node-to-workspace 5'
125
+
alt-shift-6 = 'move-node-to-workspace 6'
126
+
alt-shift-7 = 'move-node-to-workspace 7'
127
+
alt-shift-8 = 'move-node-to-workspace 8'
128
+
alt-shift-9 = 'move-node-to-workspace 9'
129
+
130
+
# See: https://nikitabobko.github.io/AeroSpace/commands#workspace-back-and-forth
131
+
alt-tab = 'workspace-back-and-forth'
132
+
# See: https://nikitabobko.github.io/AeroSpace/commands#move-workspace-to-monitor
133
+
alt-shift-tab = 'move-workspace-to-monitor --wrap-around next'
134
+
135
+
# See: https://nikitabobko.github.io/AeroSpace/commands#mode
136
+
alt-shift-semicolon = 'mode service'
137
+
138
+
# 'service' binding mode declaration.
139
+
# See: https://nikitabobko.github.io/AeroSpace/guide#binding-modes
140
+
[mode.service.binding]
141
+
esc = ['reload-config', 'mode main']
142
+
r = ['flatten-workspace-tree', 'mode main'] # reset layout
143
+
f = ['layout floating tiling', 'mode main'] # Toggle between floating and tiling layout
144
+
backspace = ['close-all-windows-but-current', 'mode main']
145
+
146
+
# sticky is not yet supported https://github.com/nikitabobko/AeroSpace/issues/2
147
+
#s = ['layout sticky tiling', 'mode main']
148
+
149
+
alt-shift-h = ['join-with left', 'mode main']
150
+
alt-shift-j = ['join-with down', 'mode main']
151
+
alt-shift-k = ['join-with up', 'mode main']
152
+
alt-shift-l = ['join-with right', 'mode main']
153
+
154
+
down = 'volume down'
155
+
up = 'volume up'
156
+
shift-down = ['volume set 0', 'mode main']
+34
home/darwin/default.nix
+34
home/darwin/default.nix
···
···
1
+
{ self, pkgs, ... }:
2
+
{
3
+
imports = [
4
+
../profiles/nvim
5
+
../profiles/cli
6
+
../profiles/direnv
7
+
../profiles/git
8
+
../profiles/task
9
+
../profiles/kitty
10
+
# ../profiles/firefox
11
+
];
12
+
13
+
home.username = "anishlakhwara";
14
+
home.homeDirectory = "/Users/anishlakhwara";
15
+
home.stateVersion = "22.05";
16
+
17
+
programs.zsh.initExtra = ''
18
+
PATH=/Users/anishlakhwara/.sourcegraph/bin:/Users/anishlakhwara/.sourcegraph/sg.zsh_autocomplete:/Users/anishlakhwara/google-cloud-sdk/bin:/Users/anishlakhwara/google-cloud-sdk/completion.zsh.inc:/Users/anishlakhwara/google-cloud-sdk/path.zsh.inc:/Users/anishlakhwara/.sg:/opt/homebrew/bin:$PATH
19
+
'';
20
+
21
+
# Managing sketchybar plugins from home-manager
22
+
home.file = {
23
+
".config/sketchybar" = {
24
+
source = ./sketchybar;
25
+
recursive = true;
26
+
};
27
+
".config/aerospace" = {
28
+
source = ./aerospace;
29
+
};
30
+
".tmux.conf" = {
31
+
source = ./tmux/tmuxrc;
32
+
};
33
+
};
34
+
}
+20
home/darwin/sketchybar/items/battery.sh
+20
home/darwin/sketchybar/items/battery.sh
···
···
1
+
#!/usr/bin/env bash
2
+
3
+
COLOR="$CYAN"
4
+
5
+
sketchybar --add item battery right \
6
+
--set battery \
7
+
update_freq=60 \
8
+
icon.color="$COLOR" \
9
+
icon.padding_left=10 \
10
+
label.padding_right=10 \
11
+
label.color="$COLOR" \
12
+
background.height=26 \
13
+
background.corner_radius="$CORNER_RADIUS" \
14
+
background.padding_right=5 \
15
+
background.border_width="$BORDER_WIDTH" \
16
+
background.border_color="$COLOR" \
17
+
background.color="$BAR_COLOR" \
18
+
background.drawing=on \
19
+
script="$PLUGIN_DIR/power.sh" \
20
+
--subscribe battery power_source_change
+18
home/darwin/sketchybar/items/calendar.sh
+18
home/darwin/sketchybar/items/calendar.sh
···
···
1
+
#!/usr/bin/env bash
2
+
3
+
COLOR="$BLUE"
4
+
5
+
sketchybar --add item calendar right \
6
+
--set calendar update_freq=15 \
7
+
icon.color="$COLOR" \
8
+
icon.padding_left=10 \
9
+
label.color="$COLOR" \
10
+
label.padding_right=10 \
11
+
background.height=26 \
12
+
background.corner_radius="$CORNER_RADIUS" \
13
+
background.padding_right=5 \
14
+
background.border_width="$BORDER_WIDTH" \
15
+
background.border_color="$COLOR" \
16
+
background.color="$BAR_COLOR" \
17
+
background.drawing=on \
18
+
script="$PLUGIN_DIR/calendar.sh"
+21
home/darwin/sketchybar/items/clock.sh
+21
home/darwin/sketchybar/items/clock.sh
···
···
1
+
#!/usr/bin/env bash
2
+
3
+
COLOR="$MAGENTA"
4
+
5
+
sketchybar --add item clock right \
6
+
--set clock update_freq=60 \
7
+
icon.padding_left=10 \
8
+
icon.color="$COLOR" \
9
+
icon="๏ " \
10
+
label.color="$COLOR" \
11
+
label.padding_right=5 \
12
+
label.width=43 \
13
+
align=center \
14
+
background.height=26 \
15
+
background.corner_radius="$CORNER_RADIUS" \
16
+
background.padding_right=2 \
17
+
background.border_width="$BORDER_WIDTH" \
18
+
background.border_color="$COLOR" \
19
+
background.color="$BAR_COLOR" \
20
+
background.drawing=on \
21
+
script="$PLUGIN_DIR/clock.sh"
+19
home/darwin/sketchybar/items/cpu.sh
+19
home/darwin/sketchybar/items/cpu.sh
···
···
1
+
#!/usr/bin/env bash
2
+
3
+
COLOR="$YELLOW"
4
+
5
+
sketchybar --add item cpu right \
6
+
--set cpu \
7
+
update_freq=3 \
8
+
icon.color="$COLOR" \
9
+
icon.padding_left=10 \
10
+
label.color="$COLOR" \
11
+
label.padding_right=10 \
12
+
background.height=26 \
13
+
background.corner_radius="$CORNER_RADIUS" \
14
+
background.padding_right=5 \
15
+
background.border_width="$BORDER_WIDTH" \
16
+
background.border_color="$COLOR" \
17
+
background.color="$BAR_COLOR" \
18
+
background.drawing=on \
19
+
script="$PLUGIN_DIR/cpu.sh"
+20
home/darwin/sketchybar/items/front_app.sh
+20
home/darwin/sketchybar/items/front_app.sh
···
···
1
+
#!/usr/bin/env bash
2
+
3
+
COLOR="$WHITE"
4
+
5
+
sketchybar \
6
+
--add item front_app left \
7
+
--set front_app script="$PLUGIN_DIR/front_app.sh" \
8
+
icon.drawing=off \
9
+
background.height=26 \
10
+
background.padding_left=0 \
11
+
background.padding_right=10 \
12
+
background.border_width="$BORDER_WIDTH" \
13
+
background.border_color="$COLOR" \
14
+
background.corner_radius="$CORNER_RADIUS" \
15
+
background.color="$BAR_COLOR" \
16
+
label.color="$COLOR" \
17
+
label.padding_left=10 \
18
+
label.padding_right=10 \
19
+
associated_display=active \
20
+
--subscribe front_app front_app_switched
+44
home/darwin/sketchybar/items/spaces.sh
+44
home/darwin/sketchybar/items/spaces.sh
···
···
1
+
#!/usr/bin/env bash
2
+
3
+
SPACE_ICONS=("1" "2" "3" "4" "5" "6" "7" "8" "9" "10")
4
+
5
+
sketchybar --add item spacer.1 left \
6
+
--set spacer.1 background.drawing=off \
7
+
label.drawing=off \
8
+
icon.drawing=off \
9
+
width=10
10
+
11
+
for i in {0..9}; do
12
+
sid=$((i + 1))
13
+
sketchybar --add space space.$sid left \
14
+
--set space.$sid associated_space=$sid \
15
+
label.drawing=off \
16
+
icon.padding_left=10 \
17
+
icon.padding_right=10 \
18
+
background.padding_left=-5 \
19
+
background.padding_right=-5 \
20
+
script="$PLUGIN_DIR/space.sh"
21
+
done
22
+
23
+
sketchybar --add item spacer.2 left \
24
+
--set spacer.2 background.drawing=off \
25
+
label.drawing=off \
26
+
icon.drawing=off \
27
+
width=5
28
+
29
+
sketchybar --add bracket spaces '/space.*/' \
30
+
--set spaces background.border_width="$BORDER_WIDTH" \
31
+
background.border_color="$RED" \
32
+
background.corner_radius="$CORNER_RADIUS" \
33
+
background.color="$BAR_COLOR" \
34
+
background.height=26 \
35
+
background.drawing=on
36
+
37
+
sketchybar --add item separator left \
38
+
--set separator icon=๏ \
39
+
icon.font="$FONT:Regular:16.0" \
40
+
background.padding_left=26 \
41
+
background.padding_right=15 \
42
+
label.drawing=off \
43
+
associated_display=active \
44
+
icon.color="$YELLOW"
+23
home/darwin/sketchybar/items/spotify.sh
+23
home/darwin/sketchybar/items/spotify.sh
···
···
1
+
#!/usr/bin/env bash
2
+
3
+
COLOR="$ORANGE"
4
+
5
+
sketchybar --add item spotify q \
6
+
--set spotify \
7
+
scroll_texts=on \
8
+
icon=๓ฐ \
9
+
icon.color="$COLOR" \
10
+
icon.padding_left=10 \
11
+
background.color="$BAR_COLOR" \
12
+
background.height=26 \
13
+
background.corner_radius="$CORNER_RADIUS" \
14
+
background.border_width="$BORDER_WIDTH" \
15
+
background.border_color="$COLOR" \
16
+
background.padding_right=-5 \
17
+
background.drawing=on \
18
+
label.padding_right=10 \
19
+
label.max_chars=20 \
20
+
associated_display=active \
21
+
updates=on \
22
+
script="$PLUGIN_DIR/spotify.sh" \
23
+
--subscribe spotify media_change
+20
home/darwin/sketchybar/items/volume.sh
+20
home/darwin/sketchybar/items/volume.sh
···
···
1
+
#!/usr/bin/env bash
2
+
3
+
COLOR="$GREEN"
4
+
5
+
sketchybar \
6
+
--add item sound right \
7
+
--set sound \
8
+
icon.color="$COLOR" \
9
+
icon.padding_left=10 \
10
+
label.color="$COLOR" \
11
+
label.padding_right=10 \
12
+
background.height=26 \
13
+
background.corner_radius="$CORNER_RADIUS" \
14
+
background.padding_right=5 \
15
+
background.border_width="$BORDER_WIDTH" \
16
+
background.border_color="$COLOR" \
17
+
background.color="$BAR_COLOR" \
18
+
background.drawing=on \
19
+
script="$PLUGIN_DIR/sound.sh" \
20
+
--subscribe sound volume_change
+4
home/darwin/sketchybar/items/vpn.sh
+4
home/darwin/sketchybar/items/vpn.sh
+3
home/darwin/sketchybar/plugins/calendar.sh
+3
home/darwin/sketchybar/plugins/calendar.sh
+4
home/darwin/sketchybar/plugins/clock.sh
+4
home/darwin/sketchybar/plugins/clock.sh
+3
home/darwin/sketchybar/plugins/cpu.sh
+3
home/darwin/sketchybar/plugins/cpu.sh
+7
home/darwin/sketchybar/plugins/front_app.sh
+7
home/darwin/sketchybar/plugins/front_app.sh
+30
home/darwin/sketchybar/plugins/power.sh
+30
home/darwin/sketchybar/plugins/power.sh
···
···
1
+
#!/usr/bin/env bash
2
+
3
+
PERCENTAGE=$(pmset -g batt | grep -Eo "\d+%" | cut -d% -f1)
4
+
CHARGING=$(pmset -g batt | grep 'AC Power')
5
+
6
+
if [ "$PERCENTAGE" = "" ]; then
7
+
exit 0
8
+
fi
9
+
10
+
case ${PERCENTAGE} in
11
+
9[0-9] | 100)
12
+
ICON="๏ "
13
+
;;
14
+
[6-8][0-9])
15
+
ICON="๏ "
16
+
;;
17
+
[3-5][0-9])
18
+
ICON="๏ "
19
+
;;
20
+
[1-2][0-9])
21
+
ICON="๏ "
22
+
;;
23
+
*) ICON="๏ " ;;
24
+
esac
25
+
26
+
if [ "$CHARGING" != "" ]; then
27
+
ICON="๏ง"
28
+
fi
29
+
30
+
sketchybar --set "$NAME" icon="$ICON" label="${PERCENTAGE}% "
+20
home/darwin/sketchybar/plugins/sound.sh
+20
home/darwin/sketchybar/plugins/sound.sh
···
···
1
+
#!/usr/bin/env bash
2
+
3
+
VOLUME=$(osascript -e "output volume of (get volume settings)")
4
+
MUTED=$(osascript -e "output muted of (get volume settings)")
5
+
6
+
if [ "$MUTED" != "false" ]; then
7
+
ICON="๓ฐ "
8
+
VOLUME=0
9
+
else
10
+
case ${VOLUME} in
11
+
100) ICON="๏จ " ;;
12
+
[5-9]*) ICON="๏จ " ;;
13
+
[0-9]*) ICON="๏ง " ;;
14
+
*) ICON="๏ง " ;;
15
+
esac
16
+
fi
17
+
18
+
sketchybar -m \
19
+
--set "$NAME" icon=$ICON \
20
+
--set "$NAME" label="$VOLUME%"
+19
home/darwin/sketchybar/plugins/space.sh
+19
home/darwin/sketchybar/plugins/space.sh
···
···
1
+
#!/usr/bin/env bash
2
+
3
+
source "$HOME/.config/sketchybar/variables.sh" # Loads all defined colors
4
+
5
+
SPACE_ICONS=("๏ฉ " "๏ " "๓ฐบป " "๏ " "๎ " "6" "7" "8" "9" "10")
6
+
7
+
SPACE_CLICK_SCRIPT="yabai -m space --focus $SID 2>/dev/null"
8
+
9
+
if [ "$SELECTED" = "true" ]; then
10
+
sketchybar --animate tanh 5 --set "$NAME" \
11
+
icon.color="$RED" \
12
+
icon="${SPACE_ICONS[$SID - 1]}" \
13
+
click_script="$SPACE_CLICK_SCRIPT"
14
+
else
15
+
sketchybar --animate tanh 5 --set "$NAME" \
16
+
icon.color="$COMMENT" \
17
+
icon="${SPACE_ICONS[$SID - 1]}" \
18
+
click_script="$SPACE_CLICK_SCRIPT"
19
+
fi
+11
home/darwin/sketchybar/plugins/spotify.sh
+11
home/darwin/sketchybar/plugins/spotify.sh
···
···
1
+
#!/usr/bin/env bash
2
+
3
+
STATE="$(echo "$INFO" | jq -r '.state')"
4
+
APP="$(echo "$INFO" | jq -r '.app')"
5
+
6
+
if [ "$STATE" = "playing" ] && [ "$APP" == "Spotify" ]; then
7
+
MEDIA="$(echo "$INFO" | jq -r '.title + " - " + .artist')"
8
+
sketchybar --set "$NAME" label="$MEDIA" drawing=on
9
+
else
10
+
sketchybar --set "$NAME" drawing=off
11
+
fi
+16
home/darwin/sketchybar/plugins/vpn.sh
+16
home/darwin/sketchybar/plugins/vpn.sh
···
···
1
+
#!/bin/bash
2
+
3
+
### You need to edit sudoers file to run wg-quick without password
4
+
5
+
# %admin ALL = (ALL) NOPASSWD: /nix/store/s2qw0sxax8pckbzmyw6wrarahmx65bq9-wireguard-tools-1.0.20210914/bin/wg-quick
6
+
7
+
WG_PIDFILE="/var/run/wireguard/wg0.name"
8
+
9
+
if [ -f $WG_PIDFILE ]; then
10
+
sketchybar -m --set vpn icon=๏ \
11
+
label="$VPN" \
12
+
drawing=on \
13
+
click_script="~/.config/sketchybar/plugins/wg_off.sh"
14
+
else
15
+
sketchybar -m --set vpn drawing=off click_script="~/.config/sketchybar/plugins/wg_on.sh"
16
+
fi
+5
home/darwin/sketchybar/plugins/wg_off.sh
+5
home/darwin/sketchybar/plugins/wg_off.sh
+5
home/darwin/sketchybar/plugins/wg_on.sh
+5
home/darwin/sketchybar/plugins/wg_on.sh
+50
home/darwin/sketchybar/variables.sh
+50
home/darwin/sketchybar/variables.sh
···
···
1
+
#!/usr/bin/env sh
2
+
3
+
# Color Palette
4
+
# Tokyonight Night
5
+
BLACK=0xff24283b
6
+
WHITE=0xffa9b1d6
7
+
MAGENTA=0xffbb9af7
8
+
BLUE=0xff7aa2f7
9
+
CYAN=0xff7dcfff
10
+
GREEN=0xff9ece6a
11
+
YELLOW=0xffe0af68
12
+
ORANGE=0xffff9e64
13
+
RED=0xfff7768e
14
+
BAR_COLOR=0xff1a1b26
15
+
COMMENT=0xff565f89
16
+
17
+
# Tokyonight Day
18
+
# BLACK=0xffe9e9ed
19
+
# WHITE=0xff3760bf
20
+
# MAGENTA=0xff9854f1
21
+
# BLUE=0xff2e7de9
22
+
# CYAN=0xff007197
23
+
# GREEN=0xff587539
24
+
# YELLOW=0xff8c6c3e
25
+
# ORANGE=0xffb15c00
26
+
# RED=0xfff52a65
27
+
# BAR_COLOR=0xffe1e2e7
28
+
29
+
TRANSPARENT=0x00000000
30
+
31
+
# General bar colors
32
+
ICON_COLOR=$WHITE # Color of all icons
33
+
LABEL_COLOR=$WHITE # Color of all labels
34
+
35
+
ITEM_DIR="$HOME/.config/sketchybar/items"
36
+
PLUGIN_DIR="$HOME/.config/sketchybar/plugins"
37
+
38
+
FONT="Iosevka Nerd Font"
39
+
40
+
PADDINGS=3
41
+
42
+
POPUP_BORDER_WIDTH=2
43
+
POPUP_CORNER_RADIUS=11
44
+
POPUP_BACKGROUND_COLOR=$BLACK
45
+
POPUP_BORDER_COLOR=$COMMENT
46
+
47
+
CORNER_RADIUS=15
48
+
BORDER_WIDTH=2
49
+
50
+
SHADOW=on
+63
home/darwin/tmux/tmuxrc
+63
home/darwin/tmux/tmuxrc
···
···
1
+
set -g base-index 1
2
+
setw -g pane-base-index 1
3
+
4
+
# https://old.reddit.com/r/tmux/comments/mesrci/tmux_2_doesnt_seem_to_use_256_colors/
5
+
set -g default-terminal "xterm-256color"
6
+
set -ga terminal-overrides ",*256col*:Tc"
7
+
set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q'
8
+
set-environment -g COLORTERM "truecolor"
9
+
10
+
# Mouse works as expected
11
+
set-option -g mouse on
12
+
# easy-to-remember split pane commands
13
+
bind | split-window -h -c "#{pane_current_path}"
14
+
bind - split-window -v -c "#{pane_current_path}"
15
+
16
+
# move between tabs using vim commands
17
+
bind-key -n C-h previous-window
18
+
bind-key -n C-l next-window
19
+
20
+
# hide and restore panes
21
+
bind-key ! break-pane -d -n _hidden_pane
22
+
bind-key @ join-pane -s $.0
23
+
24
+
# don't rename windows automatically
25
+
set-option -g allow-rename off
26
+
27
+
# DESIGN TWEAKS
28
+
29
+
# don't do anything when a 'bell' rings
30
+
set -g visual-activity off
31
+
set -g visual-bell off
32
+
set -g visual-silence off
33
+
setw -g monitor-activity off
34
+
set -g bell-action none
35
+
36
+
# copy mode
37
+
setw -g mode-style 'fg=black bg=blue bold'
38
+
39
+
# panes
40
+
set -g pane-border-style 'fg=blue'
41
+
set -g pane-active-border-style 'fg=black'
42
+
43
+
# statusbar
44
+
set -g status-position bottom
45
+
set -g status-justify left
46
+
set -g status-style 'fg=blue'
47
+
48
+
set -g status-left ''
49
+
set -g status-left-length 10
50
+
51
+
set -g status-right-style 'fg=black bg=blue'
52
+
set -g status-right ''
53
+
54
+
setw -g window-status-current-style 'fg=black bg=blue'
55
+
setw -g window-status-current-format ' #I #W #F '
56
+
57
+
setw -g window-status-style 'fg=blue bg=black'
58
+
setw -g window-status-format ' #I #[fg=white]#W #[fg=yellow]#F '
59
+
60
+
setw -g window-status-bell-style 'fg=black bg=blue bold'
61
+
62
+
# messages
63
+
set -g message-style 'fg=black bg=blue bold'
-5
home/dev/default.nix
-5
home/dev/default.nix
+1
-19
home/gui/default.nix
+1
-19
home/gui/default.nix
···
9
../profiles/cal
10
../profiles/sync/kitaab
11
../profiles/ssh
12
-
../profiles/task
13
];
14
-
15
-
# GPG configuration for user session
16
-
services.gpg-agent = {
17
-
enable = true;
18
-
pinentry.package = pkgs.pinentry-rofi; # Use rofi for consistency with desktop theme
19
-
enableSshSupport = true;
20
-
defaultCacheTtl = 28800; # 8 hours
21
-
maxCacheTtl = 86400; # 24 hours
22
-
extraConfig = ''
23
-
pinentry-program ${pkgs.writeShellScript "pinentry-rofi-themed" ''
24
-
exec ${pkgs.pinentry-rofi}/bin/pinentry-rofi -theme ~/.config/rofi/theme/passmenu.rasi "$@"
25
-
''}
26
-
'';
27
-
};
28
-
29
-
programs.gpg = {
30
-
enable = true;
31
-
};
32
}
+30
-41
home/profiles/cli/default.nix
+30
-41
home/profiles/cli/default.nix
···
1
{ lib, pkgs, config, ... }:
2
{
3
home.packages = with pkgs; [
4
binutils
5
-
coreutils
6
dnsutils
7
dasht
8
dosfstools
9
-
#git
10
git-machete
11
bottom
12
gptfdisk
13
starship
14
-
iputils
15
-
jq
16
manix
17
moreutils
18
nix-index
19
-
cached-nix-shell
20
nmap
21
ripgrep
22
skim
23
tealdeer
24
-
usbutils
25
-
utillinux
26
-
whois
27
iftop
28
wget
29
curl
···
38
nix-index
39
silver-searcher
40
tcpdump
41
-
mtr
42
file
43
lsof
44
atool
45
-
strace
46
zip
47
unzip
48
rsync
···
51
glow
52
pass
53
less
54
-
gdb
55
xxd
56
-
taskwarrior2
57
gnupg
58
syncthing
59
dijo
60
-
#ssb-patchwork
61
-
fontconfig
62
pandoc
63
taskwarrior-tui
64
-
# vimwiki-cli
65
zk
66
67
(pkgs.writeScriptBin "jq-repl" ''
68
#!/usr/bin/env bash
···
92
manix "" | grep '^# ' | sed 's/^# \(.*\) (.*/\1/;s/ (.*//;s/^# //' | fzf --preview="manix '{}'" | xargs manix
93
'')
94
(pkgs.writeScriptBin "monitor" ''
95
connect() {
96
# Turn it on if it was off
97
xrandr --output HDMI-2 --auto
98
xrandr --output HDMI-2 --same-as eDP-1
99
-
xrandr --output eDP-1 --off
100
-
pkill -9 polybar
101
-
feh --bg-scale ~/Downloads/stephen-walker-onIXxjH56AA-unsplash.jpg
102
-
polybar mybar > $XDG_DATA_HOME/polybar.log 2>&1 &
103
-
}
104
-
105
-
disconnect() {
106
-
xrandr --output HDMI-2 --off
107
-
xrandr --output eDP-1 --auto
108
-
}
109
-
110
-
xrandr | grep "HDMI-2 connected" &>>/dev/null && connect || disconnect
111
-
'')
112
-
(pkgs.writeScriptBin "big-monitor" ''
113
-
connect() {
114
-
# Turn it on if it was off
115
-
xrandr --output HDMI-2 --auto --primary
116
-
# Disable normal display
117
-
xrandr --output eDP-1 --off
118
-
# Use a nice background
119
-
feh --bg-scale ~/Downloads/stephen-walker-onIXxjH56AA-unsplash.jpg
120
-
# Reload Polybar
121
-
~/.config/bspwm/rc.d/polybar
122
}
123
124
disconnect() {
···
154
enableCompletion = true;
155
autosuggestion.enable = false;
156
157
-
initContent = ''
158
-
bindkey -v
159
autopair-init
160
'';
161
sessionVariables = {
···
227
enableZshIntegration = true;
228
};
229
230
-
services.kdeconnect.enable = true;
231
232
home.shellAliases = {
233
# quick cd
···
280
281
# git
282
g = "git";
283
284
# grep
285
grep = "rg";
···
300
srch = "ns nixpkgs";
301
orch = "ns override";
302
nrb = "cd /tmp; sudo nixos-rebuild switch --flake '/home/anish/usr/helm#curve'; cd $OLDPWD";
303
nrt = "cd /tmp; sudo nixos-rebuild test --flake '/home/anish/usr/helm#curve'; cd $OLDPWD";
304
ned = "cd /home/anish/usr/helm; vim; cd $OLDPWD";
305
ncd = "cd /home/anish/usr/helm";
···
1
{ lib, pkgs, config, ... }:
2
{
3
home.packages = with pkgs; [
4
+
# unstable.claude-code
5
binutils
6
+
# coreutils
7
dnsutils
8
dasht
9
dosfstools
10
+
# git
11
git-machete
12
+
git-spice
13
+
# jujitsu
14
+
asciinema
15
bottom
16
gptfdisk
17
starship
18
+
# TODO Not available on Darwin
19
+
# iputils
20
+
# usbutils
21
+
# cached-nix-shell
22
+
# utillinux
23
+
# strace
24
+
# mtr
25
+
# gdb
26
+
# fontconfig
27
+
# whois
28
+
29
+
# jq
30
manix
31
moreutils
32
nix-index
33
nmap
34
ripgrep
35
skim
36
tealdeer
37
iftop
38
wget
39
curl
···
48
nix-index
49
silver-searcher
50
tcpdump
51
file
52
lsof
53
atool
54
zip
55
unzip
56
rsync
···
59
glow
60
pass
61
less
62
xxd
63
+
taskwarrior
64
gnupg
65
syncthing
66
dijo
67
+
# ssb-patchwork
68
pandoc
69
taskwarrior-tui
70
zk
71
+
diffnav
72
+
73
+
# llms (needs 24.11)
74
+
aider-chat
75
76
(pkgs.writeScriptBin "jq-repl" ''
77
#!/usr/bin/env bash
···
101
manix "" | grep '^# ' | sed 's/^# \(.*\) (.*/\1/;s/ (.*//;s/^# //' | fzf --preview="manix '{}'" | xargs manix
102
'')
103
(pkgs.writeScriptBin "monitor" ''
104
+
# hotplug
105
connect() {
106
# Turn it on if it was off
107
xrandr --output HDMI-2 --auto
108
xrandr --output HDMI-2 --same-as eDP-1
109
}
110
111
disconnect() {
···
141
enableCompletion = true;
142
autosuggestion.enable = false;
143
144
+
initExtra = ''
145
autopair-init
146
'';
147
sessionVariables = {
···
213
enableZshIntegration = true;
214
};
215
216
+
# Only available on Linux
217
+
# services.kdeconnect.enable = true;
218
219
home.shellAliases = {
220
# quick cd
···
267
268
# git
269
g = "git";
270
+
gl = "git log --pretty=oneline --abbrev-commit";
271
272
# grep
273
grep = "rg";
···
288
srch = "ns nixpkgs";
289
orch = "ns override";
290
nrb = "cd /tmp; sudo nixos-rebuild switch --flake '/home/anish/usr/helm#curve'; cd $OLDPWD";
291
+
nrd = "cd /tmp; NIXPKGS_ALLOW_UNFREE=1 darwin-rebuild switch --flake /Users/anishlakhwara/usr/helm#Anishs-MacBook-Pro --impure; cd $OLDPWD";
292
nrt = "cd /tmp; sudo nixos-rebuild test --flake '/home/anish/usr/helm#curve'; cd $OLDPWD";
293
ned = "cd /home/anish/usr/helm; vim; cd $OLDPWD";
294
ncd = "cd /home/anish/usr/helm";
-23
home/profiles/desktop/ayu-dark-kitty.conf
-23
home/profiles/desktop/ayu-dark-kitty.conf
···
1
-
2
-
background #0A0E14
3
-
foreground #B3B1AD
4
-
cursor #E6B450
5
-
selection_background #273747
6
-
color0 #000000
7
-
color8 #4D5566
8
-
color1 #FF3333
9
-
color9 #D96C75
10
-
color2 #C2D94C
11
-
color10 #91B362
12
-
color3 #FF8F40
13
-
color11 #F29668
14
-
color4 #59C2FF
15
-
color12 #6994BF
16
-
color5 #D4BFFF
17
-
color13 #A37ACC
18
-
color6 #95E6CB
19
-
color14 #4CBF99
20
-
color7 #ffffff
21
-
color15 #F0F0F0
22
-
selection_foreground #B3B1AD
23
-
···
-25
home/profiles/desktop/ayu-kitty.conf
-25
home/profiles/desktop/ayu-kitty.conf
···
1
-
#: This is a port of ayu Mirage color scheme
2
-
#: based on :
3
-
#: https://github.com/ayu-theme/ayu-colors
4
-
5
-
background #1F2430
6
-
foreground #CBCCC6
7
-
cursor #FFCC66
8
-
selection_background #33415E
9
-
color0 #000000
10
-
color8 #4D5566
11
-
color1 #FF3333
12
-
color9 #F27983
13
-
color2 #BAE67E
14
-
color10 #A6CC70
15
-
color3 #FFA759
16
-
color11 #F29E74
17
-
color4 #73D0FF
18
-
color12 #77A8D9
19
-
color5 #D4BFFF
20
-
color13 #A37ACC
21
-
color6 #95E6CB
22
-
color14 #4CBF99
23
-
color7 #ffffff
24
-
color15 #F0F0F0
25
-
selection_foreground #CBCCC6
···
+4
-4
home/profiles/desktop/bspwmrc
+4
-4
home/profiles/desktop/bspwmrc
···
6
# esac
7
8
export MONITOR=$(xrandr -q | grep primary | cut -d' ' -f1)
9
-
export MONITORS=( $(xrandr -q | grep ' connected' | cut -d' ' -f1) )
10
MONITOR=${MONITOR:-${MONITORS[0]}}
11
12
# Only have workspaces for primary monitor
···
26
bspc config focused_border_color "#bd93f9"
27
bspc config presel_feedback_color "#bd93f9"
28
29
-
bspc config split_ratio 0.71
30
31
# Extra padding for polybar
32
-
bspc config top_padding 34
33
-
bspc config bottom_padding 0
34
35
# Rules
36
bspc rule -r '*'
···
6
# esac
7
8
export MONITOR=$(xrandr -q | grep primary | cut -d' ' -f1)
9
+
export MONITORS=($(xrandr -q | grep ' connected' | cut -d' ' -f1))
10
MONITOR=${MONITOR:-${MONITORS[0]}}
11
12
# Only have workspaces for primary monitor
···
26
bspc config focused_border_color "#bd93f9"
27
bspc config presel_feedback_color "#bd93f9"
28
29
+
bspc config split_ratio 0.71
30
31
# Extra padding for polybar
32
+
bspc config -m primary top_padding 34
33
+
bspc config -m primary bottom_padding 0
34
35
# Rules
36
bspc rule -r '*'
+3
-7
home/profiles/desktop/default.nix
+3
-7
home/profiles/desktop/default.nix
···
22
paper-icon-theme
23
papirus-icon-theme
24
libsForQt5.qtstyleplugin-kvantum
25
-
libsForQt5.qt5ct
26
gtk-engine-murrine
27
gtk_engines
28
maim
29
-
kitty
30
libreoffice
31
inotify-tools
32
offpunk
33
termpdfpy
34
# libsForQt5.kontact
35
-
thunderbird
36
-
libsecret # For secret-tool to manage keyring
37
];
38
39
# GTK4 color scheme?
···
67
recursive = true;
68
};
69
".config/dunst/dunstrc".source = ./dunstrc;
70
-
".config/kitty/kitty.conf".source = ./kitty.conf;
71
-
".config/kitty/ayu.conf".source = ./ayu-kitty.conf;
72
".config/zathura/zathurarc".source = ./zathurarc;
73
".background-image".source = ./background.jpg;
74
#gtk4 theme
75
".config/gtk-4.0/settings.ini".text = ''
76
[Settings]
77
-
gtk-application-prefer-dark-theme=true
78
'';
79
# gtk3 theme
80
".config/gtk-3.0/settings.ini".text = ''
···
22
paper-icon-theme
23
papirus-icon-theme
24
libsForQt5.qtstyleplugin-kvantum
25
+
# qt5ct
26
gtk-engine-murrine
27
gtk_engines
28
maim
29
libreoffice
30
inotify-tools
31
offpunk
32
termpdfpy
33
# libsForQt5.kontact
34
+
# thunderbird
35
];
36
37
# GTK4 color scheme?
···
65
recursive = true;
66
};
67
".config/dunst/dunstrc".source = ./dunstrc;
68
".config/zathura/zathurarc".source = ./zathurarc;
69
".background-image".source = ./background.jpg;
70
#gtk4 theme
71
".config/gtk-4.0/settings.ini".text = ''
72
[Settings]
73
+
gtk-application-prefer-dark-theme=1
74
'';
75
# gtk3 theme
76
".config/gtk-3.0/settings.ini".text = ''
-17
home/profiles/desktop/kitty.conf
-17
home/profiles/desktop/kitty.conf
···
1
-
include ayu.conf
2
-
font_family Hermit
3
-
font_size 13
4
-
bold_font auto
5
-
italic_font auto
6
-
bold_italic_font auto
7
-
open_url_with default
8
-
mouse_map left click ungrabbed mouse_click_url_or_select
9
-
confirm_os_window_close 0
10
-
enable_audio_bell no
11
-
12
-
# Ctrl+V for paste
13
-
map ctrl+v paste_from_clipboard
14
-
15
-
-- Allows zen-mode.nvim to increase font size
16
-
-- allow_remote_control socket-only
17
-
-- listen_on unix:/tmp/kitty
···
+1
-1
home/profiles/firefox/default.nix
+1
-1
home/profiles/firefox/default.nix
···
18
isDefault = true;
19
name = "anish";
20
userChrome = (builtins.readFile ./userChrome.css);
21
-
extensions.packages = with pkgs.nur.repos.rycee.firefox-addons; [
22
# Find extensions: https://github.com/nix-community/nur-combined/blob/master/repos/rycee/pkgs/firefox-addons/generated-firefox-addons.nix
23
ublock-origin
24
# wallabagger
···
18
isDefault = true;
19
name = "anish";
20
userChrome = (builtins.readFile ./userChrome.css);
21
+
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
22
# Find extensions: https://github.com/nix-community/nur-combined/blob/master/repos/rycee/pkgs/firefox-addons/generated-firefox-addons.nix
23
ublock-origin
24
# wallabagger
+38
-135
home/profiles/firefox/userChrome.css
+38
-135
home/profiles/firefox/userChrome.css
···
8
/*** NAV BAR ***/
9
/* Hide urlbar */
10
#nav-bar {
11
-
/* customize this value. */
12
-
--navbar-margin: -55px;
13
-
14
-
margin-top: var(--navbar-margin);
15
-
margin-bottom: 0;
16
-
z-index: -100;
17
-
transition: all 0.3s ease !important;
18
-
opacity: 0;
19
-
}
20
-
21
-
#navigator-toolbox:focus-within > #nav-bar,
22
-
#navigator-toolbox:hover > #nav-bar
23
-
{
24
-
margin-top: 0;
25
-
margin-bottom: var(--navbar-margin);
26
-
z-index: 100;
27
-
opacity: 1;
28
-
}
29
-
30
-
#main-window[chromehidden*="toolbar"] {
31
-
visibility: collapse;
32
-
height: -55px !important;
33
-
min-height: -55px !important;
34
}
35
36
/* But unfocus it when we invoke it with ctrl+L */
···
53
height: 28px !important;
54
}
55
56
-
/* hides the sidebar header
57
#sidebar-header {
58
display: none !important;
59
}
60
-
*/
61
62
.tab[selected="true"] {
63
visibility: collapse;
···
70
.tabbrowser-tab[visuallyselected="true"] {
71
visibility: collapse;
72
}
73
/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/autohide_sidebar.css made available under Mozilla Public License v. 2.0
74
See the above repository for updates as well as full license text. */
75
76
-
/* Show sidebar only when the cursor is over it.
77
-
The border controlling sidebar width will be removed so you'll need to modify
78
-
these values to change width.
79
-
By default the internal layout of sidebar changes when hovered, but this can
80
-
be changed by setting pref "userchrome.autohide-sidebar.static-layout.enabled" to true
81
-
*/
82
83
-
/* Note: If you want only *some* sidebar to be auto-hidden, then you can use [sidebarcommand] attribute selector.
84
-
For example, to only affect Sidebery's sidebar replace all instances of #sidebar-box with
85
-
#sidebar-box[sidebarcommand="_3c078156-979c-498b-8990-85f7987dd929_-sidebar-action"].
86
-
To find the sidebarcommand value for any other sidebar, open that sidebar and use Browser Toolbox to inspect it.
87
-
See: https://firefox-source-docs.mozilla.org/devtools-user/browser_toolbox/index.html
88
-
*/
89
-
/* The whole thing
90
-
:where(#main-window) #browser{
91
-
--uc-sidebar-width: 240px;
92
-
--uc-sidebar-hover-width: 210px;
93
-
}
94
-
#main-window[sizemode="fullscreen"] #browser{
95
-
--uc-sidebar-width: 1px;
96
-
}
97
#sidebar-box{
98
--uc-autohide-sidebar-delay: 600ms; /* Wait 0.6s before hiding sidebar */
99
-
--uc-autohide-transition-duration: 115ms;
100
-
--uc-autohide-transition-type: linear;
101
-
--browser-area-z-index-sidebar: 3;
102
position: relative;
103
min-width: var(--uc-sidebar-width) !important;
104
width: var(--uc-sidebar-width) !important;
105
max-width: var(--uc-sidebar-width) !important;
106
-
z-index: var(--browser-area-z-index-sidebar,3);
107
-
background-color: inherit;
108
-
/* This directionality flipper is played so that sidebar "grows" into the right direction */
109
-
direction: ltr;
110
-
&:is([positionend],[sidebar-positionend]):not(:-moz-locale-dir(rtl)){
111
-
direction: rtl;
112
-
}
113
}
114
-
.sidebar-browser-stack{
115
-
background: inherit;
116
-
}
117
-
#main-window[sizemode="fullscreen"] #browser{ --uc-sidebar-width: 1px; }
118
119
#sidebar-splitter{ display: none }
120
121
-
#sidebar-header{
122
-
overflow: hidden;
123
-
color: var(--chrome-color, inherit) !important;
124
-
padding-inline: 0 !important;
125
-
}
126
127
-
#sidebar-header::before,
128
-
#sidebar-header::after{
129
-
content: "";
130
-
display: flex;
131
-
padding-left: 8px;
132
-
}
133
-
134
-
#sidebar-header,
135
#sidebar{
136
-
transition: min-width var(--uc-autohide-transition-duration) var(--uc-autohide-transition-type) var(--uc-autohide-sidebar-delay) !important;
137
min-width: var(--uc-sidebar-width) !important;
138
will-change: min-width;
139
-
direction: ltr;
140
-
&:-moz-locale-dir(rtl){
141
-
direction: rtl;
142
-
}
143
}
144
-
#sidebar-box:hover > #sidebar-header,
145
-
#sidebar-box:hover > #sidebar,
146
-
#sidebar-box:hover > .sidebar-browser-stack > #sidebar{
147
-
min-width: var(--uc-sidebar-hover-width) !important;
148
-
transition-delay: 0ms !important;
149
-
}
150
151
.sidebar-panel{
152
-
background-color: transparent !important;
153
-
color: var(--newtab-text-primary-color) !important;
154
}
155
156
.sidebar-panel #search-box{
157
-moz-appearance: none !important;
158
-
background-color: rgba(249,249,250,0.1) !important;
159
color: inherit !important;
160
}
161
162
/* Add sidebar divider and give it background */
163
164
#sidebar,
165
#sidebar-header{
166
-
background-color: inherit !important;
167
border-inline: 1px solid rgb(80,80,80);
168
border-inline-width: 0px 1px;
169
}
170
171
-
#sidebar-box:not([positionend],[sidebar-positionend]) > :-moz-locale-dir(rtl),
172
-
#sidebar-box:is([positionend],[sidebar-positionend]) > *{
173
border-inline-width: 1px 0px;
174
}
175
-
@media -moz-pref("sidebar.revamp") {
176
-
#sidebar, #sidebar-header{ border-style: none }
177
-
#sidebar-box{ padding: 0 !important; }
178
-
}
179
/* Move statuspanel to the other side when sidebar is hovered so it doesn't get covered by sidebar */
180
181
-
#sidebar-box:not([positionend],[sidebar-positionend]):hover ~ #appcontent #statuspanel{
182
-
inset-inline: auto 0px !important;
183
-
}
184
-
#sidebar-box:not([positionend],[sidebar-positionend]):hover ~ #appcontent #statuspanel-label{
185
-
margin-inline: 0px !important;
186
-
border-left-style: solid !important;
187
-
}
188
-
@media -moz-pref("userchrome.autohide-sidebar.static-layout.enabled"){
189
-
#sidebar-box{
190
-
min-width: var(--uc-sidebar-width) !important;
191
-
contain: size;
192
-
box-shadow: var(--content-area-shadow);
193
-
}
194
-
#sidebar{
195
-
min-width: var(--uc-sidebar-hover-width) !important;
196
-
}
197
-
.sidebar-browser-stack{
198
-
overflow: hidden;
199
-
width: 100%;
200
-
transition: width var(--uc-autohide-transition-duration) var(--uc-autohide-transition-type) var(--uc-autohide-sidebar-delay);
201
-
direction: ltr;
202
-
&:hover{
203
-
transition-delay: 0ms;
204
-
width: var(--uc-sidebar-hover-width);
205
-
}
206
-
&:-moz-locale-dir(rtl){
207
-
transition-property: transform,width !important;
208
-
}
209
-
}
210
-
#sidebar-box[sidebar-positionend]:hover :is(#sidebar-header,#sidebar):-moz-locale-dir(ltr){
211
-
transform: translateX(0);
212
-
transition-delay: 0ms !important;
213
-
}
214
-
#sidebar-box:not([sidebar-positionend]):hover .sidebar-browser-stack:-moz-locale-dir(rtl){
215
-
transform: translateX(calc(-1 * var(--uc-sidebar-hover-width) + var(--uc-sidebar-width)));
216
-
}
217
-
#sidebar-box[sidebar-positionend]:hover > .sidebar-browser-stack:-moz-locale-dir(rtl){
218
-
transform: translateX(calc(var(--uc-sidebar-hover-width) - var(--uc-sidebar-width)));
219
-
transition-delay: 0ms !important;
220
-
}
221
-
}
222
-
*/
···
8
/*** NAV BAR ***/
9
/* Hide urlbar */
10
#nav-bar {
11
+
position: relative !important;
12
+
z-index: 2 !important;
13
+
height: 2px !important;
14
+
min-height: 2px !important;
15
+
margin-bottom: -2px !important;
16
+
opacity: 0 !important;
17
+
border: none !important;
18
}
19
20
/* But unfocus it when we invoke it with ctrl+L */
···
37
height: 28px !important;
38
}
39
40
+
/* hides the sidebar header */
41
#sidebar-header {
42
display: none !important;
43
}
44
45
.tab[selected="true"] {
46
visibility: collapse;
···
53
.tabbrowser-tab[visuallyselected="true"] {
54
visibility: collapse;
55
}
56
+
57
+
/* Credits to https://github.com/MrOtherGuy for hthe following snippet*/
58
+
59
/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/autohide_sidebar.css made available under Mozilla Public License v. 2.0
60
See the above repository for updates as well as full license text. */
61
62
+
/* Show sidebar only when the cursor is over it */
63
+
/* The border controlling sidebar width will be removed so you'll need to modify these values to change width */
64
65
#sidebar-box{
66
+
--uc-sidebar-width: 44px; /* Only thing I (gale) changed */
67
+
--uc-sidebar-hover-width: 210px;
68
--uc-autohide-sidebar-delay: 600ms; /* Wait 0.6s before hiding sidebar */
69
position: relative;
70
min-width: var(--uc-sidebar-width) !important;
71
width: var(--uc-sidebar-width) !important;
72
max-width: var(--uc-sidebar-width) !important;
73
+
z-index:1;
74
}
75
+
76
+
#sidebar-box[positionend]{ direction: rtl }
77
+
#sidebar-box[positionend] > *{ direction: ltr }
78
+
79
+
#sidebar-box[positionend]:-moz-locale-dir(rtl){ direction: ltr }
80
+
#sidebar-box[positionend]:-moz-locale-dir(rtl) > *{ direction: rtl }
81
+
82
+
#main-window[sizemode="fullscreen"] #sidebar-box{ --uc-sidebar-width: 1px; }
83
84
#sidebar-splitter{ display: none }
85
86
+
#sidebar-header{ overflow: hidden; /*color: var(--chrome-color, inherit) !important*/}
87
88
#sidebar{
89
+
transition: min-width 115ms linear var(--uc-autohide-sidebar-delay) !important;
90
min-width: var(--uc-sidebar-width) !important;
91
will-change: min-width;
92
}
93
+
94
+
#sidebar-box:hover > #sidebar{ min-width: var(--uc-sidebar-hover-width) !important; transition-delay: 0ms !important }
95
96
.sidebar-panel{
97
+
/*background-color: transparent !important;
98
+
color: var(--newtab-text-primary-color) !important;*/
99
}
100
101
.sidebar-panel #search-box{
102
-moz-appearance: none !important;
103
+
/*background-color: rgba(249,249,250,0.1) !important;
104
color: inherit !important;
105
+
*/
106
}
107
108
/* Add sidebar divider and give it background */
109
110
#sidebar,
111
#sidebar-header{
112
+
/*background-color: inherit !important;*/
113
border-inline: 1px solid rgb(80,80,80);
114
border-inline-width: 0px 1px;
115
}
116
117
+
#sidebar-box:not([positionend]) > :-moz-locale-dir(rtl),
118
+
#sidebar-box[positionend] > *{
119
border-inline-width: 1px 0px;
120
}
121
+
122
/* Move statuspanel to the other side when sidebar is hovered so it doesn't get covered by sidebar */
123
124
+
#sidebar-box:not([positionend]):hover ~ #appcontent #statuspanel{ inset-inline: auto 0px !important; }
125
+
#sidebar-box:not([positionend]):hover ~ #appcontent #statuspanel-label{ margin-inline: 0px !important; border-left-style: solid !important; }
+7
home/profiles/git/config
+7
home/profiles/git/config
···
15
default = current
16
[pull]
17
rebase = true
18
[alias]
19
unadd = reset HEAD
20
# data analysis
···
23
email-domains = !git log --format="%aE" | awk -F'@' '{print $2}' | sort -u
24
# pretty log
25
ls = !git log --graph --abbrev-commit --decorate --color=always --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) - %C(dim red)%an%C(reset)%C(bold yellow)%d%C(reset)' --all
26
[filter "lfs"]
27
required = true
28
smudge = git-lfs smudge -- %f
29
process = git-lfs filter-process
30
clean = git-lfs clean -- %f
31
[url "https://github.com/"]
32
insteadOf = gh:
33
[url "git@github.com:"]
···
15
default = current
16
[pull]
17
rebase = true
18
+
[merge]
19
+
mergetool = nvim -d
20
+
conflictstyle = diff3
21
[alias]
22
unadd = reset HEAD
23
# data analysis
···
26
email-domains = !git log --format="%aE" | awk -F'@' '{print $2}' | sort -u
27
# pretty log
28
ls = !git log --graph --abbrev-commit --decorate --color=always --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) - %C(dim red)%an%C(reset)%C(bold yellow)%d%C(reset)' --all
29
+
undo = !git reset HEAD~1 --mixed
30
+
blm = blame -w -C -C -C
31
[filter "lfs"]
32
required = true
33
smudge = git-lfs smudge -- %f
34
process = git-lfs filter-process
35
clean = git-lfs clean -- %f
36
+
[url "git@github.com:"]
37
+
insteadOf = https://github.com/
38
[url "https://github.com/"]
39
insteadOf = gh:
40
[url "git@github.com:"]
+3
home/profiles/git/default.nix
+3
home/profiles/git/default.nix
···
56
pull.rebase = false;
57
push.autoSetupRemote = true;
58
init.defaultBranch = "main";
59
+
"url \"git@github.com:\"" = { insteadOf = "https://github.com/"; };
60
};
61
62
aliases = {
···
95
96
# delete merged branches
97
bdm = "!git branch --merged | grep -v '*' | xargs -n 1 git branch -d";
98
+
undo = "!git reset HEAD~1 --mixed";
99
+
blm = "blame -w -C -C -C";
100
};
101
};
102
}
+23
home/profiles/kitty/ayu-dark-kitty.conf
+23
home/profiles/kitty/ayu-dark-kitty.conf
···
···
1
+
2
+
background #0A0E14
3
+
foreground #B3B1AD
4
+
cursor #E6B450
5
+
selection_background #273747
6
+
color0 #000000
7
+
color8 #4D5566
8
+
color1 #FF3333
9
+
color9 #D96C75
10
+
color2 #C2D94C
11
+
color10 #91B362
12
+
color3 #FF8F40
13
+
color11 #F29668
14
+
color4 #59C2FF
15
+
color12 #6994BF
16
+
color5 #D4BFFF
17
+
color13 #A37ACC
18
+
color6 #95E6CB
19
+
color14 #4CBF99
20
+
color7 #ffffff
21
+
color15 #F0F0F0
22
+
selection_foreground #B3B1AD
23
+
+25
home/profiles/kitty/ayu-kitty.conf
+25
home/profiles/kitty/ayu-kitty.conf
···
···
1
+
#: This is a port of ayu Mirage color scheme
2
+
#: based on :
3
+
#: https://github.com/ayu-theme/ayu-colors
4
+
5
+
background #1F2430
6
+
foreground #CBCCC6
7
+
cursor #FFCC66
8
+
selection_background #33415E
9
+
color0 #000000
10
+
color8 #4D5566
11
+
color1 #FF3333
12
+
color9 #F27983
13
+
color2 #BAE67E
14
+
color10 #A6CC70
15
+
color3 #FFA759
16
+
color11 #F29E74
17
+
color4 #73D0FF
18
+
color12 #77A8D9
19
+
color5 #D4BFFF
20
+
color13 #A37ACC
21
+
color6 #95E6CB
22
+
color14 #4CBF99
23
+
color7 #ffffff
24
+
color15 #F0F0F0
25
+
selection_foreground #CBCCC6
+11
home/profiles/kitty/default.nix
+11
home/profiles/kitty/default.nix
+14
home/profiles/kitty/kitty.conf
+14
home/profiles/kitty/kitty.conf
···
···
1
+
include ayu.conf
2
+
font_family Hermit
3
+
font_size 13
4
+
bold_font auto
5
+
italic_font auto
6
+
bold_italic_font auto
7
+
open_url_with default
8
+
mouse_map left click ungrabbed mouse_click_url_or_select
9
+
confirm_os_window_close 0
10
+
enable_audio_bell no
11
+
hide_window_decorations titlebar-only
12
+
-- Allows zen-mode.nvim to increase font size
13
+
-- allow_remote_control socket-only
14
+
-- listen_on unix:/tmp/kitty
+4
home/profiles/nvim/config/after/syntax/vimwiki.vim
+4
home/profiles/nvim/config/after/syntax/vimwiki.vim
+11
home/profiles/nvim/config/fnl/conf/formatting.fnl
+11
home/profiles/nvim/config/fnl/conf/formatting.fnl
···
···
1
+
(import-macros {: do-req } :lib/macros)
2
+
3
+
(do-req :conform :setup
4
+
{:formatters_by_ft {:lua ["stylua"]
5
+
:nix ["nixfmt"]
6
+
; :go ["goimports" "gofmt"] ; Go handled in special case
7
+
:terraform ["terraform_fmt"]
8
+
:sh ["shfmt"]
9
+
:bazel ["buildifier"]}
10
+
:format_on_save {:lsp_format "fallback"
11
+
:timeout_ms 500}})
+51
home/profiles/nvim/config/fnl/conf/init.fnl
+51
home/profiles/nvim/config/fnl/conf/init.fnl
···
···
1
+
(local nvim (require :lib/nvim))
2
+
3
+
(nvim.g :mapleader " ")
4
+
5
+
; (nvim.opt :runtimepath (.. vim.opt.runtimepath "/home/anish/.config/nvim/,"))
6
+
(nvim.opt :tabstop 2)
7
+
(nvim.opt :showmatch true)
8
+
(nvim.opt :shiftwidth 2)
9
+
(nvim.opt :autoindent true)
10
+
(nvim.opt :undofile true)
11
+
(nvim.opt :signcolumn "auto:4")
12
+
(nvim.opt :title true)
13
+
(nvim.opt :number true)
14
+
; (nvim.opt :nocompatible)
15
+
(nvim.opt :relativenumber true)
16
+
(nvim.opt :showtabline 2)
17
+
(nvim.opt :expandtab true)
18
+
(nvim.opt :autowriteall true)
19
+
(nvim.opt :cmdheight 2)
20
+
(nvim.opt :spelllang "en_gb")
21
+
(nvim.opt :ignorecase true)
22
+
(nvim.opt :smartcase true)
23
+
(nvim.opt :incsearch true)
24
+
(nvim.opt :updatetime 300) ; Diagnostics response time
25
+
(nvim.opt :signcolumn "yes")
26
+
(nvim.opt :cursorline true)
27
+
28
+
(nvim.opt :lisp true) ; include - in word to move better in snake-case)
29
+
(nvim.g :sexp_filetypes "clojure,scheme,lisp,janet,fennel,yuck") ; include the lisps I use
30
+
31
+
(nvim.opt :termguicolors)
32
+
(nvim.colorscheme "ayu-mirage")
33
+
34
+
(require :conf.plugins)
35
+
(require :conf.mappings)
36
+
(require :conf.lsp)
37
+
(require :conf.plugins.cmp)
38
+
(require :conf.formatting)
39
+
; (require :conf.kitaab)
40
+
41
+
; Spelling
42
+
(vim.api.nvim_create_autocmd ["BufRead" "BufNewFile"]
43
+
{:pattern ["*.wiki" "*.txt" "*.md" "*.tex"]
44
+
:command "setlocal spell"})
45
+
(vim.api.nvim_create_autocmd ["FileType"]
46
+
{:pattern ["mail"]
47
+
:command "setlocal spell"})
48
+
49
+
; Svelte
50
+
(vim.api.nvim_create_autocmd ["BufNewFile" "BufRead"] {:pattern ["*.svelte"]
51
+
:command "setf svelte"})
+99
home/profiles/nvim/config/fnl/conf/lsp.fnl
+99
home/profiles/nvim/config/fnl/conf/lsp.fnl
···
···
1
+
(import-macros {: do-req } :lib/macros)
2
+
(local lspkind (require :lspkind))
3
+
(local lspconfig (require :lspconfig))
4
+
; (local lspsaga (require :lspsaga))
5
+
(local cmp (require :cmp))
6
+
(local nvim (require :lib/nvim))
7
+
; (local lspfuzzy (require :lspfuzzy)) ; Not available on Nix
8
+
; (local sg (require :sg))
9
+
; (local lsputil (require :lspconfig/util))
10
+
11
+
;(lspsaga.setup {:border_style "rounded"
12
+
; :code_action_icon ""
13
+
; :code_action_num_shortcut false
14
+
; :ui {:code_action ""}
15
+
; :show_outline {:enable false}))
16
+
;
17
+
;(nvim.opt :winbar nil)
18
+
19
+
(local signs {:Error "๎ช "
20
+
:Warn "๏ฑ "
21
+
:Hint "๏ "
22
+
:Info "๏ "})
23
+
(each [t icon (pairs signs)]
24
+
(let [hl (.. "DiagnosticSign" t)]
25
+
(vim.fn.sign_define hl {:text icon
26
+
:texthl hl
27
+
:numhl hl})))
28
+
29
+
(tset vim.lsp.handlers
30
+
:textDocument/hover
31
+
(vim.lsp.with vim.lsp.handlers.hover
32
+
{:focusable false :border "rounded"}))
33
+
(tset vim.lsp.handlers
34
+
:textDocument/signatureHelp
35
+
(vim.lsp.with vim.lsp.handlers.signature_help
36
+
{:focusable false :border "rounded"}))
37
+
38
+
(local capabilities (let [cmp_nvim_lsp (require :cmp_nvim_lsp)]
39
+
(cmp_nvim_lsp.default_capabilities)))
40
+
41
+
(local formatting-augroup (nvim.augroup :LspFormatting))
42
+
43
+
(fn goimports [wait-ms]
44
+
(let [params (vim.lsp.util.make_range_params)
45
+
result (do
46
+
(tset params :context {:only [:source.organizeImports]})
47
+
(vim.lsp.buf_request_sync 0 :textDocument/codeAction params wait-ms))]
48
+
(each [_ res (pairs (or result {}))]
49
+
(each [_ r (pairs (or res.result {}))]
50
+
(if r.edit
51
+
(vim.lsp.util.apply_workspace_edit r.edit "utf-16")
52
+
(vim.lsp.buf.execute_command r.command))))
53
+
(vim.lsp.buf.format)))
54
+
55
+
(fn on-attach [client bufnr]
56
+
(let [filetype (vim.api.nvim_buf_get_option 0 "filetype")]
57
+
(if (client.supports_method "textDocument/formatting")
58
+
(do (nvim.autocmd "BufWritePre"
59
+
{:group formatting-augroup
60
+
:buffer bufnr
61
+
:callback (fn [_] (if (= filetype "go")
62
+
(goimports 2000)
63
+
(vim.lsp.buf.format {:bufnr bufnr})))})))))
64
+
65
+
(lspconfig.gopls.setup
66
+
{:capabilities capabilities
67
+
:codelens {:generate true :gc_details true}
68
+
:semanticTokens true
69
+
:flags {:debounce_text_changes 200}
70
+
:analyses {:unusedparams true
71
+
:unusedvariables true
72
+
:unusedwrite true
73
+
:nilness true
74
+
:unusedwrite true
75
+
:useany true}
76
+
:completeUnimported true
77
+
:staticcheck true
78
+
:experimentalPostfixCompletions true
79
+
:hints {:constantValues true
80
+
:functionTypeParameters true
81
+
:assignVariablesTypes true
82
+
:compositeLiteralTypes true
83
+
:compositeLiteralFields true
84
+
:parameterNames true
85
+
:rangeVariableTypes true}
86
+
:on_attach on-attach})
87
+
88
+
(local lsps [:nil_ls :terraform_lsp :fennel_ls :tsserver :starbin])
89
+
(each [index lsp (ipairs lsps)]
90
+
((. (. lspconfig lsp) :setup) {}))
91
+
92
+
; null-ls
93
+
(let [null-ls (require :null-ls)]
94
+
(null-ls.setup {:sources [; TODO fix these
95
+
;null-ls.builtins.diagnostics.shellcheck
96
+
null-ls.builtins.diagnostics.commitlint]}))
97
+
;null-ls.builtins.diagnostics.jsonlint]}))
98
+
;(null-ls.builtins.diagnostics.proselint.with {:filetypes ["vimwiki" "mail"]})]}))
99
+
+140
home/profiles/nvim/config/fnl/conf/mappings.fnl
+140
home/profiles/nvim/config/fnl/conf/mappings.fnl
···
···
1
+
(local nvim (require :lib/nvim))
2
+
(import-macros {: do-req } :lib/macros)
3
+
4
+
(local wk (require :which-key))
5
+
6
+
;; Convenient way to indent stuff in visual mode
7
+
(nvim.keymap [:v] "<" "<gv" {:noremap true})
8
+
(nvim.keymap [:v] ">" ">gv" {:noremap true})
9
+
(nvim.keymap [:n] "<space>" "<NOP>" {:noremap true :silent true})
10
+
;; Convenient way to move stuff in visual mode
11
+
(nvim.keymap [:v] "J" ":m '>+1<CR>gv=gv" {:noremap true})
12
+
(nvim.keymap [:v] "K" ":m '>-2<CR>gv=gv" {:noremap true})
13
+
;; Convientent screen shifting
14
+
(nvim.keymap [:n] "n" "nzzzv" {:noremap true})
15
+
(nvim.keymap [:n] "N" "Nzzzv" {:noremap true})
16
+
(nvim.keymap [:n] "J" "mzJ'z" {:noremap true})
17
+
; Fix Y
18
+
(nvim.keymap [:n] "Y" "y$")
19
+
; Unmap Q
20
+
(nvim.keymap [] "Q" "<Nop>")
21
+
; TODO
22
+
; ESC clears search
23
+
; (nvim.keymap [:n] "<ESC>" "")
24
+
25
+
; FTerm
26
+
(vim.api.nvim_create_user_command "FTermToggle" (fn [_]
27
+
((-> (require :FTerm)
28
+
(. :toggle))))
29
+
{:bang true})
30
+
(nvim.keymap [:t] "<TAB>" "<cmd>:FTermToggle<CR>")
31
+
(nvim.keymap [:n] "<TAB>" "<cmd>:FTermToggle<CR>" {:noremap true})
32
+
33
+
; Buffer Movement
34
+
(nvim.keymap [:n] "gT" ":BufferPrevious<CR>" {:silent true :noremap true})
35
+
(nvim.keymap [:n] "gt" ":BufferNext<CR>" {:silent true :noremap true})
36
+
(nvim.keymap [:n] "gj" ":BufferPick<CR>" {:silent true :noremap true})
37
+
(nvim.keymap [:n] "gb" ":Telescope buffers<CR>" {:silent true :noremap true})
38
+
(nvim.keymap [:n] "gq" ":BufferClose<CR>" {:silent true :noremap true})
39
+
40
+
; Flash
41
+
(vim.api.nvim_create_user_command "Flash" (fn [_] (do-req :flash :jump)) {})
42
+
(vim.api.nvim_create_user_command "FlashTreesitter" (fn [] (do-req :flash :treesitter)) {})
43
+
(nvim.keymap [:n] "f" "<cmd>Flash<CR>")
44
+
(nvim.keymap [:n] "s" "<cmd>FlashTreesitter<CR>")
45
+
46
+
(local
47
+
normal-map-leader
48
+
{"t" [":Neotree toggle<CR>"
49
+
"Toggle neo-tree"]
50
+
"w" ["<cmd>:w<cr>"
51
+
"Write file"]
52
+
"q" ["<cmd>:q<cr>"
53
+
"Quit"]
54
+
"r" [":RainbowParenthesesToggleAll<CR>"
55
+
"Toggle Rainbow Parens"]
56
+
"u" [":UndotreeToggle<CR>"
57
+
"Toggle Undo Tree"]
58
+
; Telescope
59
+
"f" {:name "Files"
60
+
:f ["<cmd>Telescope find_files<cr>"
61
+
"Find Files (in Telescope)"]
62
+
:g ["<cmd>Telescope live_grep<cr>"
63
+
"Find Grep (in Telescope)"]
64
+
:b ["<cmd>Telescope buffers<cr>"
65
+
"Find Buffers"]
66
+
:h ["<cmd>Telescope help_tags<cr>"
67
+
"Find Help"]
68
+
:t ["<cmd>Telescope tags<cr>"
69
+
"Find Tags"]
70
+
:r ["<cmd>Telescope oldfiles<CR>"
71
+
"Recent files"]}
72
+
; Git
73
+
"g" {:name "Git"
74
+
"s" [":G<CR>"
75
+
"Git Status"]
76
+
"f" [":G fetch --all<cr>"
77
+
"Git Fetch"]
78
+
"b" [":GBranches<cr>"
79
+
"Git Branch"]
80
+
"p" [":Git! push<cr>"
81
+
"Git Push"]
82
+
"d" [":GDiff<cr>"
83
+
"Git Diff"]
84
+
"h" [""
85
+
"Commit Hunk under Cursor"]}
86
+
; For handling merges
87
+
; nmap <leader>gl :diffget //3<CR>
88
+
; nmap <leader>gh :diffget //2<CR>
89
+
; nnoremap <leader>gc :G commit -v -q %:p<CR>
90
+
; Buffers
91
+
"b" {:name "Buffer"
92
+
:b ["<cmd>:Telescope buffers<CR>"
93
+
"Buffer List"]
94
+
:q ["<cmd>:BufferClose<CR>"
95
+
"Buffer Quit"]
96
+
:n ["<cmd>:BufferNext<CR>"
97
+
"Buffer Next"]
98
+
:N ["<cmd>:tabp<CR>"
99
+
"Buffer Previous"]
100
+
:p ["<cmd>:tabp<CR>"
101
+
"Buffer Previous"]}
102
+
; Search
103
+
"s" {:name "Search"
104
+
:b ["<cmd>Telescope current_buffer_fuzzy_find<CR>"
105
+
"Search in current buffer"]
106
+
:s ["<cmd>Telescope live_grep<CR>"
107
+
"Search in project"]
108
+
:t ["<cmd>TodoTelescope<CR>"
109
+
"Search TODOs in project"]
110
+
:c ["<cmd>let @/ = \"\"<CR>:echo 'Search highlight cleared'<CR>"
111
+
"Clear search"]
112
+
:g ["<cmd>Telescope live_grep<cr>"
113
+
"Find Grep (in Telescope)"]}
114
+
; Code
115
+
"c" {:name "Code"
116
+
:d [":lua vim.lsp.buf.definition()<CR>"
117
+
"Go to Definition"]
118
+
:i [":lua require('telescope.builtin').lsp_implementation()<CR>"
119
+
"Implementation"]
120
+
:s [":lua vim.lsp.buf.signature_help()<CR>"
121
+
"Signature Help"]
122
+
:r [":Lspsaga rename<CR>"
123
+
"Rename Symbol"]
124
+
:h [":Lspsaga hover_doc<CR>"
125
+
"Hover doc"]
126
+
:o ["<cmd>AerialToggle!<CR>"
127
+
"Outline"]
128
+
:t [":LspDiagnostics 0"
129
+
"Find Errors in Buffer"]}
130
+
; Kitaab
131
+
"z" {:name "Kitaab"
132
+
:n [":ZettelNew<CR>"
133
+
"Zettel New"]}
134
+
"v" {:name "Tabs"
135
+
:v [":vnew<CR>"
136
+
"Vertical Split"]
137
+
:h [":new<CR>"
138
+
"Horizontal Split"]}})
139
+
140
+
(wk.register normal-map-leader {:prefix "<leader>"})
+30
home/profiles/nvim/config/fnl/conf/music.fnl
+30
home/profiles/nvim/config/fnl/conf/music.fnl
···
···
1
+
(local nvim (require :lib/nvim))
2
+
3
+
(nvim.g :tidal_target "terminal")
4
+
(nvim.g :scnvim_snippet_format "luasnip")
5
+
6
+
; -- supercollider
7
+
; local scnvim = require 'scnvim'
8
+
; local map = scnvim.map
9
+
; local map_expr = scnvim.map_expr
10
+
; scnvim.setup {
11
+
; keymaps = {
12
+
; ['<localleader>e'] = map('editor.send_line', {'i', 'n'}),
13
+
; ['<localleader>s'] = map_expr('CmdPeriod.run', {'i', 'n'}),
14
+
; ['<localleader>t'] = {
15
+
; map('editor.send_block', {'i', 'n'}),
16
+
; map('editor.send_selection', 'x'),
17
+
; },
18
+
; ['<CR>'] = map('postwin.toggle'),
19
+
; ['<M-CR>'] = map('postwin.toggle', 'i'),
20
+
; ['<M-L>'] = map('postwin.clear', {'n', 'i'}),
21
+
; ['<C-k>'] = map('signature.show', {'n', 'i'}),
22
+
; ['<F12>'] = map('sclang.hard_stop', {'n', 'x', 'i'}),
23
+
; ['<leader>st'] = map('sclang.start'),
24
+
; ['<leader>sk'] = map('sclang.recompile'),
25
+
; ['<F1>'] = map_expr('s.boot'),
26
+
; ['<F2>'] = map_expr('s.meter'),
27
+
; }
28
+
; }
29
+
; -- You gotta run :SCNvimGenerateAssets for this first
30
+
; -- require("luasnip").add_snippets("supercollider", require("scnvim/utils").get_snippets())
+35
home/profiles/nvim/config/fnl/conf/plugins/cmp.fnl
+35
home/profiles/nvim/config/fnl/conf/plugins/cmp.fnl
···
···
1
+
(local cmp (require :cmp))
2
+
3
+
(fn has-words-before []
4
+
(let [(line col) (unpack (vim.api.nvim_win_get_cursor 0))
5
+
cur-line (. (vim.api.nvim_buf_get_lines 0
6
+
(- line 1)
7
+
line
8
+
true
9
+
1))]
10
+
(and (not= col 0)
11
+
(= (: (: cur-line :sub col col) :match "%s")
12
+
nil))))
13
+
14
+
(let [lspkind (require :lspkind)]
15
+
(cmp.setup {:formatting {:format (lspkind.cmp_format {:mode "symbol_text"
16
+
:maxwidth 50})
17
+
:show_labelDetails true}
18
+
:snippet {:expand (fn [args] (vim.snippet.expand args.body))}
19
+
:sources [{:name "buffer"} {:name "nvim_lsp"}
20
+
{:name "look"} {:name "path"}
21
+
{:name "calc"} {:name "spell"}
22
+
{:name "tags"}]
23
+
:mapping {"<C-d>" (cmp.mapping.scroll_docs -4)
24
+
"<C-u>" (cmp.mapping.scroll_docs 4)
25
+
"<C-g>" (cmp.mapping.close)
26
+
"<CR>" (cmp.mapping.confirm {:select true})
27
+
"<Tab>" (cmp.mapping (fn [fallback]
28
+
(if (cmp.visible) (cmp.select_next_item)
29
+
(has-words-before) (cmp.complete)
30
+
(fallback)))
31
+
[:i :s])
32
+
"<S-Tab>" (cmp.mapping (fn [fallback]
33
+
(if (cmp.visible) (cmp.select_prev_item)
34
+
(fallback)))
35
+
[:i :s])}}))
+38
home/profiles/nvim/config/fnl/conf/plugins/kitaab.fnl
+38
home/profiles/nvim/config/fnl/conf/plugins/kitaab.fnl
···
···
1
+
; Kitaab is why I'm so tied to vim.
2
+
; If only I could find a nice notes editor...
3
+
4
+
(local nvim (require :lib/nvim))
5
+
6
+
(import-macros {: do-req } :lib/macros)
7
+
8
+
(nvim.g :vimwiki_list [{:path "~/kitaab/vimwiki"
9
+
:auto_tags 1
10
+
:auto_diary_index 1
11
+
:auto_generate_links 0
12
+
:nested_syntaxes {:python "python"
13
+
:c++ "cpp"
14
+
:nix "nix"
15
+
:bash "sh"}}])
16
+
(nvim.g :zettel_format "%y%m%d-%H%M")
17
+
18
+
; Custom functions
19
+
(fn update_date []
20
+
(var written false)
21
+
(let [time (os.date "%Y-%m-%d %H:%M")
22
+
message (.. "%update " time)
23
+
lines (vim.api.nvim_buf_get_lines 0 0 4 false)]
24
+
(each [index line (ipairs lines)]
25
+
(if (and (= (length line) 0) (not written))
26
+
(do
27
+
(vim.api.nvim_buf_set_lines 0 (- index 1) index false [message ""])
28
+
(set written true)))
29
+
(if (and (= index 4) (not written))
30
+
(vim.api.nvim_buf_set_lines 0 3 index false [message])))))
31
+
32
+
; Custom function for inserting links through telescope grep_search
33
+
; Visual mode too!
34
+
35
+
(vim.api.nvim_create_autocmd "BufWritePre" {:pattern ["*.wiki"]
36
+
:callback update_date})
37
+
38
+
(do-req :hologram :setup {:auto_display false})
+47
home/profiles/nvim/config/fnl/conf/plugins.fnl
+47
home/profiles/nvim/config/fnl/conf/plugins.fnl
···
···
1
+
(local nvim (require :lib/nvim))
2
+
(local navic (require :nvim-navic))
3
+
4
+
(import-macros {: do-req } :lib/macros)
5
+
6
+
(let [lualine (require :lualine)]
7
+
(lualine.setup {:options {:theme "ayu"}
8
+
:sections {; :lualine_c [:filename (fn []
9
+
; (let [lspsaga (require :lspsaga.symbol.winbar)]
10
+
; (lspsaga.get_bar))
11
+
:lualine_y [(fn []
12
+
(var msg "No Active LSP")
13
+
(let [buf_ft (vim.api.nvim_buf_get_option 0 "filetype")
14
+
clients (vim.lsp.get_active_clients)]
15
+
(each [_ client (ipairs clients)]
16
+
(let [filetypes (. client :config :filetypes)]
17
+
(if (and filetypes (vim.fn.index filetypes buf_ft)) (set msg client.name))))
18
+
msg))]
19
+
:lualine_x [:filetype]}}))
20
+
21
+
(require :neo-tree)
22
+
(do-req :gitsigns :setup)
23
+
(do-req :marks :setup)
24
+
; (do-req :mini.pairs :setup)
25
+
(do-req :mini.diff :setup)
26
+
(do-req :mini.ai :setup)
27
+
(do-req :mini.surround :setup {:mappings {:add "ys"
28
+
:delete "ds"
29
+
:replace "cs"}})
30
+
(do-req :todo-comments :setup)
31
+
(do-req :ibl :setup {:scope {:exclude {:language ["fennel" "clojure" "janet"]}}})
32
+
33
+
(do-req :nvim-treesitter.configs :setup {:highlight {:enable true}
34
+
:textobjects {:enable true}
35
+
:indent {:enable true}})
36
+
(do-req :treesitter-context :setup {:max_lines 5})
37
+
38
+
(do-req :auto-session :setup {:log_level "info"
39
+
:auto_session_suppress_dirs ["~/"]})
40
+
(nvim.opt :sessionoptions "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions")
41
+
42
+
(do-req :aerial :setup {}) ;{:on_attach (fn [bufnr]
43
+
; (do
44
+
; (vim.keymap.set "n" "{" "<cmd>AerialPrev<CR>" { :buffer bufnr})
45
+
; (vim.keymap.set "n" "}" "<cmd>AerialNext<CR>" { :buffer bufnr}))
46
+
47
+
(do-req :zk :setup)
+8
home/profiles/nvim/config/fnl/lib/macros.fnl
+8
home/profiles/nvim/config/fnl/lib/macros.fnl
+37
home/profiles/nvim/config/fnl/lib/nvim.fnl
+37
home/profiles/nvim/config/fnl/lib/nvim.fnl
···
···
1
+
(fn autocmd [events opts]
2
+
"Create autocommand"
3
+
(vim.api.nvim_create_autocmd events opts))
4
+
5
+
(fn clear-autocmds [opts]
6
+
"Clear autocommands"
7
+
(vim.api.nvim_clear_autocmds opts))
8
+
9
+
(fn augroup [name ?opts]
10
+
"Create autocommand group"
11
+
(vim.api.nvim_create_augroup name (or ?opts {})))
12
+
13
+
(fn keymap [mode lhs rhs ?opts]
14
+
"Sets a global mapping for the given mode.
15
+
Ex: `(keymap [:n :i] ...)`"
16
+
(let [string-mode (table.concat mode)]
17
+
(vim.api.nvim_set_keymap string-mode lhs rhs (or ?opts {}))))
18
+
19
+
(fn opt [key value]
20
+
"Set a vim option"
21
+
(tset vim.opt key value))
22
+
23
+
(fn g [key value]
24
+
"Set a vim global"
25
+
(tset vim.g key value))
26
+
27
+
(fn colorscheme [name]
28
+
"Set the current colorscheme"
29
+
(vim.cmd (.. "colorscheme " name)))
30
+
31
+
{: autocmd
32
+
: clear-autocmds
33
+
: augroup
34
+
: keymap
35
+
: opt
36
+
: g
37
+
: colorscheme}
+26
home/profiles/nvim/config/init.lua
+26
home/profiles/nvim/config/init.lua
···
···
1
+
if pcall(require, "hotpot") then
2
+
-- Setup hotpot.nvim
3
+
require("hotpot").setup({
4
+
provide_require_fennel = true,
5
+
-- show fennel compiler results in when editing fennel files
6
+
enable_hotpot_diagnostics = true,
7
+
compiler = {
8
+
-- options passed to fennel.compile for modules, defaults to {}
9
+
modules = {
10
+
-- not default but recommended, align lua lines with fnl source
11
+
-- for more debuggable errors, but less readable lua.
12
+
correlate = true
13
+
},
14
+
macros = {
15
+
-- allow macros to access vim global, needed for nyoom modules
16
+
env = "_COMPILER",
17
+
compilerEnv = _G,
18
+
allowGlobals = true,
19
+
},
20
+
}
21
+
})
22
+
-- Import neovim configuration
23
+
require("conf")
24
+
else
25
+
print("Unable to require hotpot")
26
+
end
+117
-1072
home/profiles/nvim/default.nix
+117
-1072
home/profiles/nvim/default.nix
···
1
{ pkgs, ... }:
2
-
let
3
-
customPlugins = {
4
-
vim-zettel = pkgs.vimUtils.buildVimPlugin {
5
-
name = "vim-zettel";
6
-
src = pkgs.fetchFromGitHub {
7
-
owner = "michal-h21";
8
-
repo = "vim-zettel";
9
-
rev = "929d90eec62e6f693c2702d2b6f76a93f2f1689d";
10
-
sha256 = "1fzKmknfVlEYwqeXgbKITbb2/PJ023iJyMz6vak3qh4=";
11
-
};
12
-
};
13
-
14
-
my-lspsaga = pkgs.vimUtils.buildVimPlugin {
15
-
name = "lspsaga.nvim";
16
-
src = pkgs.fetchFromGitHub {
17
-
owner = "glepnir";
18
-
repo = "lspsaga.nvim";
19
-
rev = "b7b4777369b441341b2dcd45c738ea4167c11c9e";
20
-
sha256 = "sciX/fMxzY1YOxXxjj1+ymrdMi451avcFFu+14R+/pk=";
21
-
};
22
-
};
23
-
nvim-luapad = pkgs.vimUtils.buildVimPlugin {
24
-
name = "nvim-luapad";
25
-
src = pkgs.fetchFromGitHub {
26
-
owner = "rafcamlet";
27
-
repo = "nvim-luapad";
28
-
rev = "9815e2659ce8e2ef4b55e401531cf09b6423e0ea";
29
-
sha256 = "gMaS5YFi3+gmUIfkCMEt9vhm8XSgv54Cquv5+WCWeTo=";
30
-
};
31
-
};
32
-
leap = pkgs.vimUtils.buildVimPlugin {
33
-
name = "leap";
34
-
src = pkgs.fetchFromGitHub {
35
-
owner = "ggandor";
36
-
repo = "leap.nvim";
37
-
rev = "1bb1fec369b1e9ae96e6ff1b829ea9272c51f844";
38
-
sha256 = "dH0v1D5q5OlMLA/omTDMb/taKyIgQ5VfVMYXJ609k/k=";
39
-
};
40
-
};
41
-
nvim-navic = pkgs.vimUtils.buildVimPlugin {
42
-
name = "nvim-navic";
43
-
src = pkgs.fetchFromGitHub {
44
-
owner = "SmiteshP";
45
-
repo = "nvim-navic";
46
-
rev = "096b23e73c84a653fd317c0c10261875fa573a6d";
47
-
sha256 = "vX7ZVJxgatIicmijehtaRvyHxk1i4gFfXrbPM/+VoFc=";
48
-
};
49
-
};
50
-
my-which-key-nvim = pkgs.vimUtils.buildVimPlugin {
51
-
pname = "which-key.nvim";
52
-
version = "2022-05-04";
53
-
src = pkgs.fetchFromGitHub {
54
-
owner = "folke";
55
-
repo = "which-key.nvim";
56
-
rev = "bd4411a2ed4dd8bb69c125e339d837028a6eea71";
57
-
sha256 = "0vf685xgdb967wmvffk1pfrvbhg1jkvzp1kb7r0vs90mg8gpv1aj";
58
-
};
59
-
meta.homepage = "https://github.com/folke/which-key.nvim/";
60
-
};
61
-
yuck-vim = pkgs.vimUtils.buildVimPlugin {
62
-
pname = "yuck.vim";
63
-
version = "2021-08-09";
64
-
src = pkgs.fetchFromGitHub {
65
-
owner = "elkowar";
66
-
repo = "yuck.vim";
67
-
rev = "6dc3da77c53820c32648cf67cbdbdfb6994f4e08";
68
-
sha256 = "lp7qJWkvelVfoLCyI0aAiajTC+0W1BzDhmtta7tnICE=";
69
-
};
70
-
};
71
-
nvim-parinfer = pkgs.vimUtils.buildVimPlugin {
72
-
pname = "nvim-parinfer";
73
-
version = "v1.2.0";
74
-
src = pkgs.fetchFromGitHub {
75
-
owner = "gpanders";
76
-
repo = "nvim-parinfer";
77
-
rev = "82bce5798993f4fe5ced20e74003b492490b4fe8";
78
-
sha256 = "Dlzfp3CZTzq8zQeHByWf3ER6/Em+KNGYNI4Z17ui8Lc=";
79
-
};
80
-
};
81
-
my-marks = pkgs.vimUtils.buildVimPlugin {
82
-
pname = "marks";
83
-
version = "2022-08-31";
84
-
src = pkgs.fetchFromGitHub {
85
-
owner = "chentoast";
86
-
repo = "marks.nvim";
87
-
rev = "b27cbb78e9082229590b396d3ae4fe07f1aeafe0";
88
-
sha256 = "XdbgIWuAHNdTfyKDrKmQVq5oSbBoi56DpwtgOqhScAk=";
89
-
};
90
-
};
91
-
my-fterm = pkgs.vimUtils.buildVimPlugin {
92
-
pname = "fterm";
93
-
version = "2022-07-22";
94
-
src = pkgs.fetchFromGitHub {
95
-
owner = "numToStr";
96
-
repo = "FTerm.nvim";
97
-
rev = "efd10656724a269e21ba68d65e2b058a4e606424";
98
-
sha256 = "rR6KDwj58aYfyaSsoUy75536SdBhk394yspCUl/hzfE=";
99
-
};
100
-
};
101
-
my-nvim-peekup = pkgs.vimUtils.buildVimPlugin {
102
-
pname = "nvim-peekup";
103
-
version = "0.1.0";
104
-
src = pkgs.fetchFromGitHub {
105
-
owner = "gennaro-tedesco";
106
-
repo = "nvim-peekup";
107
-
rev = "73a67c1ee3b5a7ea7b42d85399bf093f428c8ee3";
108
-
sha256 = "czKjJgCpvRSdtR7rNGlJrluDgPIdx94KUyx33op5gdY=";
109
-
};
110
-
};
111
-
};
112
-
113
-
my-python-packages = python-packages: with python-packages; [
114
-
tasklib
115
-
pynvim
116
-
six
117
-
# other python packages you want
118
-
];
119
-
python-with-my-packages = pkgs.python3.withPackages my-python-packages;
120
-
in
121
{
122
home.sessionVariables.EDITOR = "nvim";
123
home.shellAliases = {
124
k = "cd ~/kitaab/vimwiki; vim -c :VimwikiIndex; cd $OLDPWD";
125
# kitaab zettel
126
kz = "cd ~/kitaab/vimwiki; vim -c :VimwikiIndex -c :ZettelNew; cd $OLDPWD";
127
-
# kitaab recents
128
-
kr = "cd /home/anish/kitaab/vimwiki; eza --sort=modified --reverse | fzf --preview 'bat --style=numbers --color=always --terminal-width -1 ./{}';cd $OLDPWD";
129
# kitaab get by tagged
130
-
kt = "cd /home/anish/kitaab/vimwiki; eza *_index.wiki | fzf --preview 'bat --style=numbers --color=always --terminal-width -1 ./{}';cd $OLDPWD";
131
-
# List files that have no links in them
132
-
ku = "cd /home/anish/kitaab/;vim ./vimwiki/$(python3 poonam/main.py report --titles=false | tail -n +4 | fzf --preview 'bat --style=numbers --color=always --terminal-width -1 ./vimwiki/{}');cd $OLDPWD";
133
};
134
-
# Add %update to the highlight clause for vimwiki files
135
-
home.file.".config/nvim/after/syntax/vimwiki.vim".text = ''
136
-
" match with %update
137
-
syntax match VimwikiPlaceholder /^\s*%update\ze\%(\s.*\)\?$/ nextgroup=VimwikiPlaceholderParam skipwhite
138
-
" match with %link
139
-
syntax match VimwikiPlaceholder /^\s*%link\ze\%(\s.*\)\?$/ nextgroup=VimwikiPlaceholderParam skipwhite
140
-
'';
141
142
-
#environment.systemPackages = with customPlugins; [ tidal ];
143
programs.neovim = {
144
enable = true;
145
-
146
-
extraConfig = ''
147
-
" so our custom files still get included
148
-
set runtimepath+=/home/anish/.config/nvim/
149
-
set tabstop=2
150
-
set showmatch
151
-
set shiftwidth=2
152
-
set noexpandtab
153
-
set autoindent
154
-
set undofile
155
-
set signcolumn=auto:4
156
-
set title
157
-
158
-
" set foldmethod=indent " fold based on indent
159
-
set number
160
-
set nocompatible
161
-
set relativenumber
162
-
set showtabline=2
163
-
set noexpandtab
164
-
set autowriteall
165
-
set list lcs=tab:\|\
166
-
filetype plugin on
167
-
168
-
" include - in word to move across easier in lisp / clojure
169
-
set iskeyword+=-
170
-
171
-
set termguicolors
172
-
colorscheme ayu-mirage
173
-
174
-
" set spell
175
-
set spelllang=en_gb
176
-
set ignorecase
177
-
set smartcase
178
-
set incsearch
179
-
" if hidden is not set, TextEdit might fail.
180
-
set hidden
181
-
" Some servers have issues with backup files, see #649
182
-
set nobackup
183
-
set nowritebackup
184
-
" Better display for messages
185
-
set cmdheight=0
186
-
" You will have bad experience for diagnostic messages when it's default 4000.
187
-
set updatetime=300
188
-
" don't give |ins-completion-menu| messages.
189
-
set shortmess+=c
190
-
" always show signcolumns
191
-
set signcolumn=yes
192
-
" highlight row
193
-
set cursorline
194
-
set autoread
195
-
196
-
let mapleader = "\<Space>"
197
-
let maplocalleader = ","
198
-
199
-
" window
200
-
nmap <leader>wh :topleft vnew<CR>
201
-
nmap <leader>wl :botright vnew<CR>
202
-
nmap <leader>wk :topleft new<CR>
203
-
nmap <leader>wj :botright new<CR>
204
-
205
-
" tabs
206
-
nmap <leader>rt :retab!<CR>
207
-
vmap <leader>rt :retab!<CR>
208
-
209
-
" Alt+hjkl navigation now handled by Navigator.nvim plugin
210
-
:nnoremap <F5> "=strftime("%Y-%m-%d %H:%M")<CR>
211
-
:inoremap <F5> <C-R>=strftime("%Y-%m-%d %H:%M")<CR>
212
-
:inoremap <F4> <C-R>=strftime("%H:%M")<CR>
213
-
214
-
" tidal nvim terminal
215
-
let g:tidal_target = "terminal"
216
-
217
-
" latex
218
-
" let g:tex_flavor='latex'
219
-
" let g:vimtex_view_method='zathura'
220
-
" let g:vimtex_quickfix_mode=0
221
-
" set conceallevel=1
222
-
" let g:tex_conceal='abdmg'
223
-
224
-
" telescope
225
-
" Find files using Telescope command-line sugar.
226
-
nnoremap <leader>ff <cmd>Telescope find_files<cr>
227
-
nnoremap <leader>fg <cmd>Telescope live_grep<cr>
228
-
nnoremap <leader>fb <cmd>Telescope buffers<cr>
229
-
nnoremap <leader>fh <cmd>Telescope help_tags<cr>
230
-
nnoremap <leader>ft <cmd>Telescope tags<cr>
231
-
232
-
" exit normal mode in terminal
233
-
:tnoremap <C-n> <C-\><C-n>
234
-
235
-
" Sexp in Conjure (since it's fennel)
236
-
let g:sexp_filetypes = "clojure,scheme,lisp,janet,fennel,yuck"
237
-
let g:conjure#filetype#fennel = "conjure.client.fennel.stdio"
238
-
" we only use fennel with love; no we don't...
239
-
let g:conjure#client#fennel#stdio#command = "fennel"
240
-
" let g:conjure#extract#tree_sitter#enabled = true
241
-
map <localleader>lt :ConjureLogToggle<CR>
242
-
243
-
let g:rainbow_active = 0
244
-
autocmd BufReadPost,BufNewFile c,clj,cljs RainbowParenthesesToggleAll
245
-
246
-
" general commands
247
-
map <leader>e :Neotree toggle<CR>
248
-
map <leader>s :w<CR>
249
-
map <leader>q :q<CR>
250
-
map <leader>r :RainbowParenthesesToggleAll<CR>
251
-
nnoremap <Esc> :noh<CR>
252
-
map Q <Nop>
253
-
nnoremap Y y$
254
-
nnoremap <leader>n :vnew<CR>
255
-
" center moving
256
-
nnoremap n nzzzv
257
-
nnoremap N Nzzzv
258
-
nnoremap J mzJ'z
259
-
" undo points
260
-
inoremap , ,<c-g>u
261
-
inoremap . .<c-g>u
262
-
inoremap ? ?<c-g>u
263
-
inoremap ! !<c-g>u
264
-
inoremap ) )<c-g>u
265
-
inoremap [ [<c-g>u
266
-
inoremap ] ]<c-g>u
267
-
inoremap { {<c-g>u
268
-
inoremap ( (<c-g>u
269
-
inoremap } }<c-g>u
270
-
" moving text
271
-
vnoremap J :m '>+1<CR>gv=gv
272
-
vnoremap K :m '>-2<CR>gv=gv
273
-
inoremap <c-j> <esc>:m .+1<CR>==
274
-
inoremap <c-k> <esc>:m .-2<CR>==
275
-
nnoremap <leader>j <esc>:m .+1<CR>==
276
-
nnoremap <leader>k <esc>:m .-2<CR>==
277
-
" Pasting
278
-
:map <leader>sy :!xclip -i<CR><CR>
279
-
:vmap <leader>sy "*y
280
-
:map <leader>sp :r!xclip -o<CR>
281
-
282
-
" buffer navigation (using built-in commands)
283
-
nnoremap <silent> gT :bprevious<CR>
284
-
nnoremap <silent> gt :bnext<CR>
285
-
nnoremap <silent> gj :buffers<CR>
286
-
nnoremap <silent> gq :bdelete<CR>
287
-
288
-
" git
289
-
nnoremap <leader>ga :G fetch --all
290
-
nmap <leader>gs :G<CR>
291
-
nmap <leader>gl :diffget //3<CR>
292
-
nmap <leader>gh :diffget //2<CR>
293
-
nmap <leader>gb :GBranches<CR>
294
-
nnoremap <leader>gp :Git! push<CR>
295
-
nnoremap <leader>gd :Gdiff<CR>
296
-
nnoremap <leader>gc :G commit -v -q %:p<CR>
297
-
298
-
" kitaab
299
-
"map <leader>cz :VimwikiIndex<CR>:ZettelNew
300
-
"map <leader>zs :ZettelSearch<CR>
301
-
map <leader>zn :ZettelNew<CR>
302
-
"map <leader>zo :ZettelOpen<CR>
303
-
"map <leader>zf :Telescope oldfiles only_cwd=true<CR>
304
-
"map <leader>wt :VimwikiMakeTomorrowDiaryNote
305
-
"map <leader>wd :VimwikiMakeYesterdayDiaryNote
306
-
"map <leader>zm :ZenMode<CR>:setlocal nospell<CR>
307
-
let g:vimwiki_list = [{ 'path': '~/kitaab/vimwiki', 'auto_tags': 1, 'auto_diary_index': 1, 'auto_generate_links': 1 }]
308
-
let g:sync_taskwarrior = 0
309
-
let g:zettel_format = "%y%m%d-%H%M"
310
-
let g:vimwiki_list = [{'path': '~/kitaab/vimwiki', 'nested_syntaxes': {'python': 'python', 'c++': 'cpp', 'nix': 'nix', 'bash': 'sh'}}]
311
-
312
-
let g:mapleader="\<Space>"
313
-
314
-
" fzf
315
-
" not sure we even use this
316
-
let g:fzf_layout = { 'window': { 'width': 0.8, 'height': 0.8 } }
317
-
318
-
" lsp commands
319
-
nnoremap <leader>vgd :lua vim.lsp.buf.definition()<CR>
320
-
nnoremap <leader>vi :lua require('telescope.builtin').lsp_implementation()<CR>
321
-
nnoremap <leader>vsh :lua vim.lsp.buf.signature_help()<CR>
322
-
nnoremap <leader>vrr :lua require('telescope.builtin').lsp_references()<CR>
323
-
" nnoremap <leader>vrn :lua vim.lsp.buf.rename()<CR>
324
-
" nnoremap <leader>vh :lua vim.lsp.buf.hover()<CR>
325
-
" nnoremap <leader>vca :lua vim.lsp.buf.code_action()<CR>
326
-
" nnoremap <leader>vsd :lua vim.lsp.util.show_line_diagnostics()<CR>
327
-
" nnoremap <leader>vn :lua vim.lsp.diagnostic.goto_next()<CR>
328
-
" nnoremap <leader>va :lua require('telescope.builtin').lsp_code_actions(require('telescope.themes').get_cursor())<cr>
329
-
" lspsaga stuff doesn't work
330
-
nnoremap <leader>vd :Lspsaga peek_definition<CR>
331
-
nnoremap <leader>vrn :Lspsaga rename<CR><CR>
332
-
nnoremap <leader>vh :Lspsaga hover_doc<CR>
333
-
nnoremap <leader>vca :Lspsaga code_action<CR>
334
-
nnoremap <leader>vsd :Lspsaga show_line_diagnostics<CR>
335
-
nnoremap <leader>vs :Dasht<Space>
336
-
nnoremap <leader>vn :Lspsaga diagnostic_jump_prev<CR>
337
-
nnoremap <leader>co :Outline<CR>
338
-
" Trouble keybindings
339
-
nnoremap <leader>xx :Trouble diagnostics<CR>
340
-
nnoremap <leader>xw :Trouble workspace_diagnostics<CR>
341
-
nnoremap <leader>xd :Trouble document_diagnostics<CR>
342
-
nnoremap <leader>xl :Trouble loclist<CR>
343
-
nnoremap <leader>xq :Trouble quickfix<CR>
344
-
nnoremap <leader>xr :Trouble lsp_references<CR>
345
-
346
-
" Yank to system clipboard (y operations only, not d)
347
-
nnoremap y "+y
348
-
vnoremap y "+y
349
-
nnoremap Y "+Y
350
-
351
-
" Note-taking keybindings
352
-
nnoremap <leader>zz :ZkNew { title = vim.fn.input('Title: ') }<CR>
353
-
354
-
" dashboard
355
-
let g:dashboard_custom_header = [
356
-
\' ',
357
-
\' โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โฃคโฃฆโ โ โ โ โ โ โ โ โ โฃคโกโ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ ',
358
-
\'โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โฃฟโกโ โ โ โ โ โ โ โ โฃฟโ โ โ โ โ โ โ โ โข โฃฟโฃถโ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ ',
359
-
\'โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โขนโฃงโ โ โ โ โ โ โ โ โขปโ โ โ โ โ โ โ โ โฃธโฃฟโ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ ',
360
-
\'โ โ โ โ โ โ โ โขดโฃทโ โ โ โ โ โ โ โ โ โ โขปโกโ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โฃฟโกโ โ โ โ โ โ โ โ โ โ โขโฃดโฃฟโกโ โ โ โ โ โ ',
361
-
\'โ โ โ โ โ โ โ โ โขฟโฃงโ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โฃ โฃฟโ โ โ โ โ โ โ โ โ ',
362
-
\'โ โ โ โ โ โ โ โ โ โ ปโกโ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โขโ ถโ โ โ โ โ โ โ โ โ โ โ ',
363
-
\'โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ ',
364
-
\'โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ ',
365
-
\'โ โ โ โ โ โ โ โขโฃโกคโ คโ คโ โฃโ โกโ ฒโกฆโฃคโฃโฃโกโ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โขโฃ โฃคโฃคโฃคโฃคโฃคโฃโฃโ โ โ โ โ โ โ โ โ ',
366
-
\'โ โ โ โ โ โฃ โขถโ โ ฉโขโฃ โกคโ คโ ฏโ ฌโ ฅโฃผโฃ
โกโ ธโ โ โกทโฃฆโกโ โ โ โ โ โ โ โ โ โ โ โ โขโฃคโขถโขปโขปโขนโฃโฃจโฃงโฃคโฃดโฃนโฃโ โขถโฃโ โ โ โ โ โ ',
367
-
\'โ โ โ โฃฐโ โ โขโกคโ โ โ โ โ โฃโกโ โกโ โ โ โ ฒโขผโฃฐโขกโฃโขถโฃโ โ โ โ โ โ โ โขโฃ โ ถโกโฃโฃบโ พโ โ โ โ โ โ โ โ โ โ โ ณโขฟโฃทโฃโ โ โ โ ',
368
-
\'โ โขโกผโกโขธโฃฐโ โ โ โ โ โ โ โ โกโ โ โ โ โ โ โ โ โ ปโฃฟโกโกผโฃทโฃโ โ โ โฃ โฃพโ โ โฃทโ โ โ โ โ โ โ โ โ โขโฃโ โ โ โข โ โ โ ปโฃงโ โ โ ',
369
-
\'โ โกผโ โขโกผโ โ โ โ โฃโ คโ โ โ โ โ โ โ ฒโ คโฃโกโ โ โ โ โ ปโขทโฃฟโฃฟโฃทโฃคโฃพโ นโขโกทโ โ โ โ โ โ โฃโกคโ โ โ โ โ โ โ โ ฒโฃโฃโ โ โ โฃทโ โ ',
370
-
\'โขฐโ ทโฃโกโ โ โ โขโ โ โ โ โ โ โ โ โ โ โ โ โ โ ฒโฃคโกโขโกคโ โขปโฃฟโฃฟโขฃโขโกดโ โ โ โ โ โฃ โ โ โ โ โ โ โ โ โ โ โ โ โ โขปโกโ โ โ โฃโ ',
371
-
\'โฃพโฃโฃนโขโกโ โขโกโ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โขฟโฃทโฃพโฃโกโขนโกผโ โ โ โ โข โกดโ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โขนโ โ โ โขนโ ',
372
-
\'โขนโขโฃฟโ โกโ โขธโ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โขโกดโขโขฑโขนโกพโ โ โ โ โฃ โฃพโฃฟโฃฆโฃโ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โขธโ โ โ โขธโก ',
373
-
\'โขธโฃ
โฃฏโ โฃโ โขธโกโ โ โ โ โ โ โ โ โ โ โ โ โ โขโกดโขปโฃนโขธโกผโ โ โ โ โขโกผโขปโฃปโฃฟโกฝโกนโ ณโขคโฃโ โ โ โ โ โ โ โ โ โ โ โขโกพโ โ โ โขธโ ',
374
-
\'โ โฃฟโฃฟโกโ โ โ โฃฟโฃคโฃโ โ โ โ โ โ โ โ โฃโฃคโขพโขปโขฟโฃฟโ โ โ โ โ โ โฃ โฃโ โฃฟโกโ โ ปโขฅโฃโกโฃฝโ ปโขฆโฃโฃโ โ โ โ โ โฃโกดโฃพโ โ โ โ โกผโ ',
375
-
\'โ โ โฃโฃงโ โ โ โ โขปโฃโ โ ฒโฃถโฃถโฃถโฃถโกโขโฃฟโฃโกงโ โ โ โ โ โ โขโฃคโ โ โ โ ปโฃทโฃงโ โกโ โ โ โขงโฃโขฐโขโ โขปโ โกโขฒโ โฃโกดโ โ โ โ โฃดโ โ ',
376
-
\'โ โ โ โขพโฃทโกโ โ โ โ โ โ โ พโ ฟโ พโ ฟโ ฟโ โ โ โ โ โ โ โ โฃ โกดโ โ โ โ โ โ โ โ โ ทโฃโ ฃโ โ โ โ โ โ โ ถโ พโ คโ งโ ผโ โ โ โ โ โขโกดโ โ โ ',
377
-
\'โ โ โ โ โ โ ฟโฃฆโฃโ โ โ โ โ โกโ โ โ โ โ โ โ โขโฃ โกดโ โ โ โ โ โ โ โ โ โ โ โ โ โ โ ถโฃโฃโ โ โ โ โ โ โ โ โ โ โ โขโกดโ โ โ โ โ ',
378
-
\'โ โ โ โ โ โ โ โ โ โ โ คโ คโฃโฃโฃโฃโฃ โ คโ คโ ถโ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ ฆโ คโขคโฃโฃโฃ โกคโ คโ โ โ โ โ โ โ โ ',
379
-
\'โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โขโ โ โ โ โ โ โ โ โ โ โ โ โ ',
380
-
\'โ โ โ โ โ โ โ โ โ โ โ โ โ โขโกโ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ ธโฃโ โ โ โ โ โ โ โ โ โ โ โ ',
381
-
\'โ โ โ โ โ โ โ โ โ โ โ โฃ โกถโ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โขทโกโ โ โ โ โ โ โ โ โ โ ',
382
-
\'โ โ โ โ โ โ โ โ โ โฃ โกพโ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โกโ โ โ โ โ โ โ โ โ โ โ ปโฃฆโกโ โ โ โ โ โ โ โ ',
383
-
\'โ โ โ โ โ โ โขโฃดโกพโ โ โ โ โ โ โ โ โ โ โข โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โขนโกโ โ โ โ โ โ โ โ โ โ โ โขฟโฃฆโฃโ โ โ โ โ โ ',
384
-
\'โ โ โ โ โ โ โ ปโ โ โ โ โ โ โ โ โ โ โ โฃดโ โ โ โ โ โ โ โ โ โ ฐโกโ โ โ โ โ โ โ โ โ นโฃฆโกโ โ โ โ โ โ โ โ โ โ โ ฝโ โ โ โ โ โ โ ',
385
-
\'โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โขโฃผโ โ โ โ โ โ โ โ โ โ โ โฃฟโ โ โ โ โ โ โ โ โ โ โฃทโกโ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ ',
386
-
\'โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โฃฟโกโ โ โ โ โ โ โ โ โ โ โ ฟโ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ ',
387
-
\'โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ นโ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ ',
388
-
\]
389
-
let g:dashboard_default_executive = 'telescope'
390
-
nmap <Leader>ss :<C-u>SessionSave<CR>
391
-
nmap <Leader>sl :<C-u>SessionLoad<CR>
392
-
" nnoremap <silent> <Leader>fh :DashboardFindHistory<CR>
393
-
" nnoremap <silent> <Leader>fm :DashboardJumpMark<CR>
394
-
" nnoremap <silent> <Leader>cn :DashboardNewFile<CR>
395
-
autocmd FileType dashboard set showtabline=0 | autocmd WinLeave <buffer> set showtabline=2
396
-
let g:dashboard_custom_footer = ["Run wild"]
397
-
let g:dashboard_custom_section={
398
-
\ 'create_zettel': {
399
-
\ 'description': ['๏ค Create Zettel SPC c z'],
400
-
\ 'command': ':VimwikiIndex' },
401
-
\ 'load_session': {
402
-
\ 'description': ['๏
Load Session SPC s l'],
403
-
\ 'command': 'SessionLoad' }
404
-
\ }
405
-
406
-
let g:scnvim_snippet_format = "luasnip"
407
-
408
-
409
-
" lua config
410
-
lua <<EOF
411
-
local signs = { Error = "โฎพ ", Warn = "โ ", Hint = "๐ก", Info = "๏ " }
412
-
for type, icon in pairs(signs) do
413
-
local hl = "DiagnosticSign" .. type
414
-
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
415
-
end
416
-
vim.g.diagnostics_active = true
417
-
function _G.toggle_diagnostics()
418
-
if vim.g.diagnostics_active then
419
-
vim.g.diagnostics_active = false
420
-
vim.lsp.diagnostic.clear(0)
421
-
vim.lsp.handlers["textDocument/publishDiagnostics"] = function() end
422
-
else
423
-
vim.g.diagnostics_active = true
424
-
vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(
425
-
vim.lsp.diagnostic.on_publish_diagnostics, {
426
-
virtual_text = true,
427
-
signs = true,
428
-
underline = true,
429
-
update_in_insert = false,
430
-
}
431
-
)
432
-
end
433
-
end
434
-
435
-
vim.diagnostic.config({
436
-
signs = true,
437
-
update_in_insert = false,
438
-
underline = false,
439
-
severity_sort = true,
440
-
float = {
441
-
focusable = false,
442
-
style = 'minimal',
443
-
border = 'rounded',
444
-
source = 'always',
445
-
},
446
-
})
447
-
448
-
vim.lsp.handlers['textDocument/hover'] = vim.lsp.with(
449
-
vim.lsp.handlers.hover,
450
-
{
451
-
border = 'rounded',
452
-
}
453
-
)
454
-
455
-
vim.lsp.handlers['textDocument/signatureHelp'] = vim.lsp.with(
456
-
vim.lsp.handlers.signature_help,
457
-
{
458
-
border = 'rounded',
459
-
}
460
-
)
461
-
462
-
local orig_util_open_floating_preview = vim.lsp.util.open_floating_preview
463
-
function vim.lsp.util.open_floating_preview(contents, syntax, opts, ...)
464
-
opts = opts or {}
465
-
opts.border = opts.border or 'rounded'
466
-
return orig_util_open_floating_preview(contents, syntax, opts, ...)
467
-
end
468
-
469
-
470
-
vim.api.nvim_set_keymap('n', '<leader>vt', ':call v:lua.toggle_diagnostics()<CR>', {noremap = true, silent = true})
471
-
472
-
-- autopairs
473
-
require('nvim-autopairs').setup{}
474
-
475
-
-- marks
476
-
require('marks').setup{}
477
-
478
-
-- Setup nvim-cmp.
479
-
local has_words_before = function()
480
-
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
481
-
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
482
-
end
483
-
484
-
local luasnip = require("luasnip")
485
-
local lspkind = require("lspkind")
486
-
local cmp = require('cmp')
487
-
local cmp_autopairs = require('nvim-autopairs.completion.cmp')
488
-
local t = function(str)
489
-
return vim.api.nvim_replace_termcodes(str, true, true, true)
490
-
end
491
-
local check_back_space = function()
492
-
local col = vim.fn.col(".") - 1
493
-
return col == 0 or vim.fn.getline("."):sub(col, col):match("%s") ~= nil
494
-
end
495
-
cmp.setup {
496
-
formatting = {
497
-
format = lspkind.cmp_format({
498
-
mode = 'symbol_text',
499
-
maxwidth = 50,
500
-
})
501
-
},
502
-
mapping = {
503
-
['<C-p>'] = cmp.mapping.select_prev_item(),
504
-
['<C-n>'] = cmp.mapping.select_next_item(),
505
-
['<C-d>'] = cmp.mapping.scroll_docs(-4),
506
-
['<C-f>'] = cmp.mapping.scroll_docs(4),
507
-
['<C-Space>'] = cmp.mapping.complete(),
508
-
['<C-e>'] = cmp.mapping.close(),
509
-
['<CR>'] = cmp.mapping.confirm({
510
-
behavior = cmp.ConfirmBehavior.Insert,
511
-
select = true
512
-
}),
513
-
["<Tab>"] = cmp.mapping(function(fallback)
514
-
if cmp.visible() then
515
-
cmp.select_next_item()
516
-
elseif luasnip.expand_or_jumpable() then
517
-
luasnip.expand_or_jump()
518
-
elseif has_words_before() then
519
-
cmp.complete()
520
-
else
521
-
fallback()
522
-
end
523
-
end, {"i", "s"}),
524
-
["<S-Tab>"] = cmp.mapping(function(fallback)
525
-
if cmp.visible() then
526
-
cmp.select_prev_item()
527
-
elseif luasnip.jumpable(-1) then
528
-
luasnip.jump(-1)
529
-
else
530
-
fallback()
531
-
end
532
-
end, { "i", "s" }),
533
-
},
534
-
snippet = {
535
-
expand = function(args)
536
-
require'luasnip'.lsp_expand(args.body)
537
-
end
538
-
},
539
-
sources = {
540
-
{name = 'buffer'}, {name = 'nvim_lsp'},
541
-
{name = "look"}, {name = "path"},
542
-
{name = "calc"}, {name = "spell"},
543
-
{name = 'cmp-conjure'}, {name = "luasnip"},
544
-
{name = 'tags'}
545
-
},
546
-
completion = {completeopt = 'menu,menuone,noinsert'}
547
-
}
548
-
cmp.event:on( 'confirm_done', cmp_autopairs.on_confirm_done({ map_char = { tex = ' ' } }))
549
-
require("luasnip.loaders.from_vscode").lazy_load()
550
-
551
-
-- lsp-format removed, using conform.nvim instead
552
-
require("nvim-navic").setup {
553
-
icons = {
554
-
Constant = "ฯ ",
555
-
Function = "ฦ "
556
-
}
557
-
}
558
-
559
-
-- Setup neo-tree
560
-
require("neo-tree").setup {}
561
-
562
-
-- Setup outline
563
-
require("outline").setup {}
564
-
565
-
-- Setup trouble
566
-
require("trouble").setup {}
567
-
568
-
-- Setup noice for floating command palette and notifications
569
-
require("noice").setup({
570
-
cmdline = {
571
-
enabled = true,
572
-
view = "cmdline_popup",
573
-
},
574
-
messages = {
575
-
enabled = true,
576
-
},
577
-
popupmenu = {
578
-
enabled = true,
579
-
},
580
-
notify = {
581
-
enabled = true,
582
-
view = "notify",
583
-
},
584
-
lsp = {
585
-
progress = {
586
-
enabled = true,
587
-
format = "lsp_progress",
588
-
format_done = "lsp_progress_done",
589
-
throttle = 1000 / 30, -- frequency to update lsp progress message
590
-
view = "mini",
591
-
},
592
-
override = {
593
-
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
594
-
["vim.lsp.util.stylize_markdown"] = true,
595
-
["cmp.entry.get_documentation"] = true,
596
-
},
597
-
},
598
-
presets = {
599
-
command_palette = true,
600
-
long_message_to_split = true,
601
-
inc_rename = false,
602
-
lsp_doc_border = false,
603
-
},
604
-
views = {
605
-
cmdline_popup = {
606
-
border = {
607
-
style = "rounded",
608
-
padding = { 0, 1 },
609
-
},
610
-
filter_options = {},
611
-
win_options = {
612
-
winhighlight = "NormalFloat:NormalFloat,FloatBorder:FloatBorder",
613
-
},
614
-
},
615
-
},
616
-
})
617
-
618
-
-- Setup barbar (tabline with icons)
619
-
require'barbar'.setup {
620
-
icons = {
621
-
filetype = {
622
-
enabled = true,
623
-
},
624
-
},
625
-
}
626
-
local navic = require("nvim-navic")
627
-
628
-
-- Setup conform.nvim for formatting
629
-
require("conform").setup({
630
-
formatters_by_ft = {
631
-
javascript = { "prettier", "lsp" },
632
-
typescript = { "prettier", "lsp" },
633
-
javascriptreact = { "prettier", "lsp" },
634
-
typescriptreact = { "prettier", "lsp" },
635
-
json = { "prettier", "lsp" },
636
-
html = { "prettier", "lsp" },
637
-
css = { "prettier", "lsp" },
638
-
yaml = { "prettier", "lsp" },
639
-
rust = { "lsp" },
640
-
go = { "lsp" },
641
-
lua = { "lsp" },
642
-
nix = { "nixfmt-rfc-style" },
643
-
clojure = { "lsp" },
644
-
fennel = { "lsp" },
645
-
terraform = { "lsp" },
646
-
bash = { "shfmt" },
647
-
sh = { "shfmt" },
648
-
},
649
-
format_on_save = {
650
-
timeout_ms = 500,
651
-
lsp_fallback = true,
652
-
},
653
-
})
654
-
655
-
-- lspsaga, code_action lightbulb is annoying
656
-
local saga = require('lspsaga')
657
-
saga.init_lsp_saga({
658
-
border_style = "rounded",
659
-
code_action_icon = "",
660
-
code_action_num_shortcut = true,
661
-
code_action_lightbulb = {
662
-
enable = false,
663
-
enable_in_insert = false,
664
-
cache_code_action = true,
665
-
sign = true,
666
-
update_time = 150,
667
-
sign_priority = 20,
668
-
virtual_text = false,
669
-
},
670
-
code_action_keys = {
671
-
quit = 'q',
672
-
exec = '<CR>',
673
-
},
674
-
-- show outline
675
-
show_outline = {
676
-
win_position = 'right',
677
-
--set special filetype win that outline window split.like NvimTree neotree
678
-
-- defx, db_ui
679
-
auto_enter = true,
680
-
auto_preview = true,
681
-
virt_text = 'โ',
682
-
jump_key = 'o',
683
-
-- auto refresh when change buffer
684
-
auto_refresh = true,
685
-
},
686
-
})
687
-
688
-
capabilities = require('cmp_nvim_lsp').default_capabilities()
689
-
690
-
-- fennel-ls is bleeding edge
691
-
local lspconfig = require('lspconfig')
692
-
require("lspconfig.configs")["fennel-ls"] = {
693
-
default_config = {
694
-
cmd = {"fennel-ls"},
695
-
filetypes = {"fennel"},
696
-
root_dir = function(dir) return lspconfig.util.find_git_ancestor(dir) end,
697
-
settings = {}
698
-
}
699
-
}
700
-
701
-
local servers = { 'clojure_lsp', 'terraform_lsp', 'zls', 'pyright', 'rust_analyzer', 'ts_ls', 'lua_ls', 'nil_ls', 'gopls', 'bashls'}
702
-
for _, lsp in ipairs(servers) do
703
-
lspconfig[lsp].setup {
704
-
on_attach = function(client, bufnr)
705
-
navic.attach(client, bufnr)
706
-
end,
707
-
capabilities = capabilities,
708
-
}
709
-
end
710
-
711
-
-- fennel-ls doesn't support navic
712
-
lspconfig['fennel-ls'].setup {
713
-
on_attach = function(client, bufnr)
714
-
-- fennel-ls setup without navic
715
-
end,
716
-
capabilities = capabilities,
717
-
}
718
-
719
-
-- deprecated pylsp
720
-
-- require('lspconfig').pylsp.setup {
721
-
-- on_attach = function(client, bufnr)
722
-
-- format.on_attach(client)
723
-
-- navic.attach(client, bufnr)
724
-
-- end,
725
-
-- capabilities = capabilities,
726
-
-- settings = {
727
-
-- pylsp = {
728
-
-- configurationSources = { "flake8", "mypy", "black" },
729
-
-- plugins = {
730
-
-- black = {enabled = true},
731
-
-- jedi_signature_help = {enabled = true},
732
-
-- jedi_completion = { include_params = true },
733
-
-- pylsp_mypy={ enabled = true },
734
-
-- pycodestyle={
735
-
-- enabled=true,
736
-
-- ignore={'E501', 'E231'},
737
-
-- maxLineLength=120,
738
-
-- },
739
-
-- },
740
-
-- },
741
-
-- },
742
-
-- }
743
-
744
-
require('gitsigns').setup { sign_priority=80 }
745
-
746
-
-- treesitter
747
-
require('nvim-treesitter.configs').setup {
748
-
-- parser_install_dir = "~/.local/share/nvim/site/parser/",
749
-
-- ensure_installed={'nix', 'clojure', 'python', 'fennel', 'lua', 'html', 'css', 'regex', 'supercollider', 'beancount', 'janet'},
750
-
highlight = { enabled = true, additional_vim_regex_highting = true, },
751
-
textobjects = { enabled = true },
752
-
}
753
-
-- 'glsl' needs c++ compiler lol
754
-
755
-
-- lualine
756
-
local navic = require("nvim-navic")
757
-
require('lualine').setup {
758
-
options = { theme = 'ayu' },
759
-
sections = {
760
-
lualine_c = {
761
-
'filename', { navic.get_location, condition=navic.is_available },
762
-
},
763
-
lualine_y = {
764
-
function()
765
-
local msg = 'No Active Lsp'
766
-
local buf_ft = vim.api.nvim_buf_get_option(0, 'filetype')
767
-
local clients = vim.lsp.get_clients()
768
-
if next(clients) == nil then
769
-
return msg
770
-
end
771
-
for _, client in ipairs(clients) do
772
-
local filetypes = client.config.filetypes
773
-
if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then
774
-
return client.name
775
-
end
776
-
end
777
-
return msg
778
-
end
779
-
},
780
-
lualine_x = {'filetype'}
781
-
}
782
-
}
783
-
784
-
-- nvim-lint
785
-
-- require('lint').linters_by_ft = {
786
-
-- markdown = {'vale'},
787
-
-- }
788
-
789
-
-- f_term
790
-
local map = vim.api.nvim_set_keymap
791
-
local opts = { noremap = true, silent = true }
792
-
map('n', '<TAB>', '<CMD>lua require("FTerm").toggle()<CR>', opts)
793
-
map('t', '<TAB>', '<C-\\><C-n><CMD>lua require("FTerm").toggle()<CR>', opts)
794
-
795
-
-- Custom functions
796
-
function update_date()
797
-
local time = os.date("%Y-%m-%d %H:%M")
798
-
local message = "%update " .. time
799
-
local lines = vim.api.nvim_buf_get_lines(0, 0,4,false)
800
-
for i=1,4,1 do
801
-
if (lines[i]:len() == 0) then
802
-
vim.api.nvim_buf_set_lines(0, i-1, i, false, {message, ""})
803
-
return
804
-
end
805
-
end
806
-
if (lines[4]:len() ~= 0) then
807
-
vim.api.nvim_buf_set_lines(0, 3, 4, false, {message})
808
-
end
809
-
return
810
-
end
811
-
812
-
vim.api.nvim_create_autocmd(
813
-
"BufWritePre",
814
-
{ pattern = { "*.wiki" }, callback = update_date}
815
-
)
816
-
817
-
-- set spelling for text files
818
-
vim.api.nvim_create_autocmd(
819
-
{ "BufRead", "BufNewFile" },
820
-
{ pattern = { "*.wiki", "*.txt", "*.md", "*.tex" },
821
-
command = "setlocal spell" }
822
-
)
823
-
vim.api.nvim_create_autocmd(
824
-
"FileType",
825
-
{ pattern = { "mail" },
826
-
command = "setlocal spell" }
827
-
)
828
-
829
-
-- auto session
830
-
vim.o.sessionoptions="blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions"
831
-
require('auto-session').setup {
832
-
log_level = 'error',
833
-
auto_session_suppress_dirs = {'~/', '/tmp', '/'},
834
-
auto_session_enable_last_session = false,
835
-
auto_session_root_dir = vim.fn.stdpath('data').."/sessions/",
836
-
auto_session_enabled = true,
837
-
auto_save_enabled = nil,
838
-
auto_restore_enabled = nil,
839
-
auto_session_create_enabled = nil,
840
-
}
841
-
842
-
require("which-key").setup{}
843
-
require('leap').set_default_keymaps()
844
-
845
-
-- supercollider
846
-
local scnvim = require 'scnvim'
847
-
local map = scnvim.map
848
-
local map_expr = scnvim.map_expr
849
-
scnvim.setup {
850
-
keymaps = {
851
-
['<localleader>e'] = map('editor.send_line', {'i', 'n'}),
852
-
['<localleader>s'] = map_expr('CmdPeriod.run', {'i', 'n'}),
853
-
['<localleader>t'] = {
854
-
map('editor.send_block', {'i', 'n'}),
855
-
map('editor.send_selection', 'x'),
856
-
},
857
-
['<CR>'] = map('postwin.toggle'),
858
-
['<M-CR>'] = map('postwin.toggle', 'i'),
859
-
['<M-L>'] = map('postwin.clear', {'n', 'i'}),
860
-
['<C-k>'] = map('signature.show', {'n', 'i'}),
861
-
['<F12>'] = map('sclang.hard_stop', {'n', 'x', 'i'}),
862
-
['<leader>st'] = map('sclang.start'),
863
-
['<leader>sk'] = map('sclang.recompile'),
864
-
['<F1>'] = map_expr('s.boot'),
865
-
['<F2>'] = map_expr('s.meter'),
866
-
}
867
-
}
868
-
-- You gotta run :SCNvimGenerateAssets for this first
869
-
-- require("luasnip").add_snippets("supercollider", require("scnvim/utils").get_snippets())
870
-
871
-
-- zk
872
-
require("zk").setup()
873
-
-- vim.api.nvim_set_keymap("n", "<leader>zn", "<Cmd>ZkNew { title = vim.fn.input('Title: ') }<CR>", opts)
874
-
875
-
-- Open notes.
876
-
vim.api.nvim_set_keymap("n", "<leader>zo", "<Cmd>ZkNotes { sort = { 'modified' } }<CR>", opts)
877
-
-- Open notes associated with the selected tags.
878
-
vim.api.nvim_set_keymap("n", "<leader>zt", "<Cmd>ZkTags<CR>", opts)
879
-
880
-
local map = vim.api.nvim_set_keymap
881
-
-- Search for the notes matching a given query.
882
-
vim.api.nvim_set_keymap("n", "<leader>zf", "<Cmd>ZkNotes { sort = { 'modified' }, match = { vim.fn.input('Search: ') } }<CR>", opts)
883
-
-- Search for the notes matching the current visual selection.
884
-
vim.api.nvim_set_keymap("v", "<leader>zf", ":'<,'>ZkMatch<CR>", opts)
885
-
map("n", "<CR>", "<Cmd>lua vim.lsp.buf.definition()<CR>", opts)
886
-
887
-
-- Create a new note after asking for its title.
888
-
-- This overrides the global `<leader>zn` mapping to create the note in the same directory as the current buffer.
889
-
-- map("n", "<leader>zn", "<Cmd>ZkNew { dir = vim.fn.expand('%:p:h'), title = vim.fn.input('Title: ') }<CR>", opts)
890
-
-- Create a new note in the same directory as the current buffer, using the current selection for title.
891
-
-- map("v", "<leader>znt", ":'<,'>ZkNewFromTitleSelection { dir = vim.fn.expand('%:p:h') }<CR>", opts)
892
-
-- Create a new note in the same directory as the current buffer, using the current selection for note content and asking for its title.
893
-
map("v", "<leader>znc", ":'<,'>ZkNewFromContentSelection { dir = vim.fn.expand('%:p:h'), title = vim.fn.input('Title: ') }<CR>", opts)
894
-
895
-
-- Open notes linking to the current buffer.
896
-
map("n", "<leader>zb", "<Cmd>ZkBacklinks<CR>", opts)
897
-
-- Alternative for backlinks using pure LSP and showing the source context.
898
-
--map('n', '<leader>zb', '<Cmd>lua vim.lsp.buf.references()<CR>', opts)
899
-
-- Open notes linked by the current buffer.
900
-
map("n", "<leader>zl", "<Cmd>ZkLinks<CR>", opts)
901
-
902
-
-- Preview a linked note.
903
-
map("n", "K", "<Cmd>lua vim.lsp.buf.hover()<CR>", opts)
904
-
-- Open the code actions for a visual selection.
905
-
map("v", "<leader>za", ":'<,'>lua vim.lsp.buf.range_code_action()<CR>", opts)
906
-
907
-
-- zen mode
908
-
require('zen-mode').setup{
909
-
window = {
910
-
backdrop = 1.0, -- shade the backdrop of the Zen window. Set to 1 to keep the same as Normal
911
-
-- height and width can be:
912
-
-- * an absolute number of cells when > 1
913
-
-- * a percentage of the width / height of the editor when <= 1
914
-
-- * a function that returns the width or the height
915
-
width = 120, -- width of the Zen window
916
-
height = 1, -- height of the Zen window
917
-
-- by default, no options are changed for the Zen window
918
-
-- uncomment any of the options below, or add other vim.wo options you want to apply
919
-
options = {
920
-
signcolumn = "no", -- disable signcolumn
921
-
number = false, -- disable number column
922
-
relativenumber = false, -- disable relative numbers
923
-
cursorline = false, -- disable cursorline
924
-
cursorcolumn = false, -- disable cursor column
925
-
foldcolumn = "0", -- disable fold column
926
-
list = false, -- disable whitespace characters
927
-
},
928
-
},
929
-
plugins = {
930
-
-- disable some global vim options (vim.o...)
931
-
-- comment the lines to not apply the options
932
-
options = {
933
-
enabled = true,
934
-
ruler = false, -- disables the ruler text in the cmd line area
935
-
showcmd = false, -- disables the command in the last line of the screen
936
-
},
937
-
twilight = { enabled = true }, -- enable to start Twilight when zen mode opens
938
-
gitsigns = { enabled = false }, -- disables git signs
939
-
tmux = { enabled = false }, -- disables the tmux statusline
940
-
-- this will change the font size on kitty when in zen mode
941
-
-- to make this work, you need to set the following kitty options:
942
-
-- - allow_remote_control socket-only
943
-
-- - listen_on unix:/tmp/kitty
944
-
kitty = {
945
-
enabled = true,
946
-
font = "+2", -- font size increment
947
-
},
948
-
},
949
-
}
950
-
require('twilight').setup{}
951
-
952
-
-- hologram
953
-
require('hologram').setup{
954
-
auto_display = false -- WIP automatic markdown image display, may be prone to breaking
955
-
}
956
-
957
-
-- Setup Navigator.nvim
958
-
require('Navigator').setup {
959
-
disable_on_zoom = true,
960
-
mux = 'auto', -- auto-detect tmux
961
-
}
962
-
963
-
-- Set up Navigator.nvim keybindings
964
-
vim.keymap.set({'n', 't'}, '<M-h>', '<CMD>NavigatorLeft<CR>')
965
-
vim.keymap.set({'n', 't'}, '<M-j>', '<CMD>NavigatorDown<CR>')
966
-
vim.keymap.set({'n', 't'}, '<M-k>', '<CMD>NavigatorUp<CR>')
967
-
vim.keymap.set({'n', 't'}, '<M-l>', '<CMD>NavigatorRight<CR>')
968
-
969
-
-- Disable Ctrl+V in nvim so Kitty can handle paste
970
-
vim.keymap.set({'n', 'v', 'i'}, '<C-v>', '<Nop>', {noremap = true, silent = true})
971
-
972
-
-- Pane resizing with Alt+Shift+hjkl (to match tmux)
973
-
vim.keymap.set('n', '<M-S-h>', '<Cmd>vertical resize -2<CR>', {silent = true})
974
-
vim.keymap.set('n', '<M-S-j>', '<Cmd>resize -2<CR>', {silent = true})
975
-
vim.keymap.set('n', '<M-S-k>', '<Cmd>resize +2<CR>', {silent = true})
976
-
vim.keymap.set('n', '<M-S-l>', '<Cmd>vertical resize +2<CR>', {silent = true})
977
-
978
-
EOF
979
-
980
-
'';
981
-
extraPackages = with pkgs // customPlugins; [
982
# used to compile tree-sitter grammar
983
-
python-with-my-packages
984
-
nodejs
985
-
clojure-lsp
986
-
clojure
987
nil
988
-
terraform-lsp
989
-
rust-analyzer
990
-
clj-kondo
991
-
zls
992
gopls
993
gcc
994
-
pyright
995
shellcheck
996
proselint
997
-
statix
998
-
nodePackages.typescript
999
-
nodePackages.typescript-language-server
1000
-
nodePackages.bash-language-server
1001
-
luajitPackages.lua-lsp
1002
fennel-ls
1003
-
nixfmt-rfc-style
1004
-
shfmt
1005
-
zk
1006
];
1007
1008
-
plugins = with pkgs.vimPlugins // customPlugins; [
1009
-
# ui
1010
-
lualine-nvim
1011
-
fzf-vim
1012
-
neo-tree-nvim
1013
-
outline-nvim
1014
-
noice-nvim
1015
-
nui-nvim
1016
-
trouble-nvim
1017
-
neovim-ayu
1018
-
rainbow_parentheses-vim
1019
-
vim-surround
1020
-
vim-devicons
1021
-
nvim-web-devicons
1022
-
undotree
1023
-
telescope-nvim
1024
-
plenary-nvim
1025
-
nvim-navic
1026
-
(nvim-treesitter.withPlugins (p: [ p.nix p.clojure p.python p.fennel p.lua p.html p.css p.regex p.supercollider p.beancount p.markdown p.glsl p.yaml p.toml p.dockerfile p.json ]))
1027
-
nvim-treesitter-context
1028
-
my-fterm
1029
-
barbar-nvim
1030
-
auto-session
1031
-
my-marks
1032
-
which-key-nvim
1033
-
nvim-peekup
1034
-
zen-mode-nvim
1035
-
twilight-nvim
1036
-
my-lspsaga
1037
-
vim-dasht
1038
1039
-
# language
1040
-
vim-nix
1041
-
vim-elixir
1042
-
emmet-vim
1043
-
csv-vim
1044
-
direnv-vim
1045
-
zig-vim
1046
-
conjure
1047
1048
-
# kitaab stuff
1049
-
vimwiki
1050
-
taskwiki
1051
-
vim-zettel
1052
-
hologram-nvim
1053
-
zk-nvim
1054
1055
-
# lsp stuff
1056
-
# nvim-lint
1057
-
nvim-lspconfig
1058
-
nvim-cmp
1059
-
cmp-nvim-lsp
1060
-
cmp-treesitter
1061
-
nvim-lsp-ts-utils
1062
-
cmp-conjure
1063
-
cmp-buffer
1064
-
cmp-path
1065
-
cmp-spell
1066
-
nvim-autopairs
1067
-
cmp_luasnip
1068
-
luasnip
1069
-
conform-nvim
1070
-
friendly-snippets
1071
-
lspkind-nvim
1072
1073
-
# git stuff
1074
-
vim-fugitive
1075
-
gitsigns-nvim
1076
-
fzf-checkout-vim
1077
1078
-
# Clojure stuff
1079
-
# conjure
1080
-
vim-sexp
1081
-
vim-sexp-mappings-for-regular-people
1082
-
fennel-vim
1083
1084
-
vim-tidal
1085
-
# experimental
1086
-
nvim-luapad
1087
-
scnvim
1088
-
leap
1089
-
Navigator-nvim
1090
-
vim-beancount
1091
-
# vimtex
1092
-
# custom
1093
-
yuck-vim
1094
-
nvim-parinfer
1095
-
# vim-processing
1096
-
];
1097
-
withPython3 = true;
1098
-
extraPython3Packages = pkgs: with pkgs; [ tasklib six packaging ];
1099
-
vimAlias = true;
1100
};
1101
}
1102
···
1
{ pkgs, ... }:
2
+
# TODO Need to find a solution to have my own packages?
3
+
# Or at least update to recent versions of the packages I do use in nixpkgs
4
{
5
home.sessionVariables.EDITOR = "nvim";
6
home.shellAliases = {
7
+
vim = "nvim";
8
k = "cd ~/kitaab/vimwiki; vim -c :VimwikiIndex; cd $OLDPWD";
9
# kitaab zettel
10
kz = "cd ~/kitaab/vimwiki; vim -c :VimwikiIndex -c :ZettelNew; cd $OLDPWD";
11
# kitaab get by tagged
12
+
kt =
13
+
"cd /home/anish/kitaab/vimwiki; eza *_index.wiki | fzf --preview 'bat --style=numbers --color=always --terminal-width -1 ./{}';cd $OLDPWD";
14
};
15
+
16
+
home.file.".config/nvim".source = ./config;
17
18
programs.neovim = {
19
enable = true;
20
+
extraPackages = with pkgs; [
21
# used to compile tree-sitter grammar
22
+
# python-with-my-packages
23
+
# nodejs
24
+
# clojure-lsp
25
+
# clojure
26
+
# clj-kondo
27
+
terraform-lsp
28
nil
29
gopls
30
gcc
31
shellcheck
32
+
shfmt
33
proselint
34
+
nixfmt
35
+
# statix
36
+
# nodePackages.typescript
37
+
# nodePackages.typescript-language-server
38
+
# luajitPackages.lua-lsp
39
fennel-ls
40
];
41
42
+
plugins = with pkgs.vimPlugins;
43
+
[
44
+
#hotpot
45
+
hotpot-nvim
46
+
nvim-navic
47
+
# ui
48
+
lualine-nvim
49
+
neo-tree-nvim
50
+
fzf-vim
51
+
vim-devicons
52
+
nvim-web-devicons
53
+
telescope-nvim
54
+
plenary-nvim
55
+
FTerm-nvim
56
+
barbar-nvim
57
+
neovim-ayu
58
+
rainbow_parentheses-vim
59
+
auto-session
60
+
which-key-nvim
61
+
aerial-nvim
62
+
todo-comments-nvim
63
+
indent-blankline-nvim
64
+
nvim-parinfer
65
+
66
+
# Tree sitter
67
+
(nvim-treesitter.withPlugins (p: [
68
+
p.nix
69
+
p.clojure
70
+
p.fennel
71
+
p.lua
72
+
p.html
73
+
p.css
74
+
p.regex
75
+
p.supercollider
76
+
p.beancount
77
+
p.markdown_inline
78
+
p.markdown
79
+
p.glsl
80
+
p.yaml
81
+
p.toml
82
+
p.dockerfile
83
+
p.json
84
+
p.go
85
+
p.svelte
86
+
p.javascript
87
+
p.janet-simple
88
+
p.starlark
89
+
]))
90
+
nvim-treesitter-context
91
+
nvim-treesitter-textobjects
92
93
+
# TODO
94
+
undotree
95
+
marks-nvim
96
97
+
# language
98
+
vim-nix
99
+
emmet-vim
100
+
csv-vim
101
+
direnv-vim
102
+
vim-svelte
103
+
# conjure
104
105
+
# kitaab stuff
106
+
vimwiki
107
+
vim-zettel
108
+
hologram-nvim
109
+
zk-nvim
110
111
+
# lsp stuff
112
+
nvim-lspconfig
113
+
nvim-cmp
114
+
cmp-nvim-lsp
115
+
cmp-treesitter
116
+
# cmp-conjure
117
+
cmp-buffer
118
+
cmp-path
119
+
cmp-spell
120
+
lspkind-nvim
121
+
conform-nvim
122
+
none-ls-nvim
123
+
mini-nvim
124
+
# nvim-lspfuzzy
125
126
+
# git stuff
127
+
vim-fugitive
128
+
gitsigns-nvim
129
+
fzf-checkout-vim
130
+
131
+
# Clojure stuff
132
+
# conjure
133
+
vim-sexp
134
+
vim-sexp-mappings-for-regular-people
135
+
fennel-vim
136
137
+
# nvim-luapad
138
+
# scnvim
139
+
flash-nvim
140
+
vim-beancount
141
+
]; # ++ [ pkgs.vimPlugins.vim-tidal ];
142
+
# withPython3 = true;
143
+
# extraPython3Packages = pkgs: with pkgs; [ tasklib six ];
144
+
# vimAlias = true;
145
};
146
}
147
+8
home/profiles/nvim/lazynvim/.config/nvim/.gitignore
+8
home/profiles/nvim/lazynvim/.config/nvim/.gitignore
+15
home/profiles/nvim/lazynvim/.config/nvim/.neoconf.json
+15
home/profiles/nvim/lazynvim/.config/nvim/.neoconf.json
+201
home/profiles/nvim/lazynvim/.config/nvim/LICENSE
+201
home/profiles/nvim/lazynvim/.config/nvim/LICENSE
···
···
1
+
Apache License
2
+
Version 2.0, January 2004
3
+
http://www.apache.org/licenses/
4
+
5
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+
1. Definitions.
8
+
9
+
"License" shall mean the terms and conditions for use, reproduction,
10
+
and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+
"Licensor" shall mean the copyright owner or entity authorized by
13
+
the copyright owner that is granting the License.
14
+
15
+
"Legal Entity" shall mean the union of the acting entity and all
16
+
other entities that control, are controlled by, or are under common
17
+
control with that entity. For the purposes of this definition,
18
+
"control" means (i) the power, direct or indirect, to cause the
19
+
direction or management of such entity, whether by contract or
20
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+
outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+
"You" (or "Your") shall mean an individual or Legal Entity
24
+
exercising permissions granted by this License.
25
+
26
+
"Source" form shall mean the preferred form for making modifications,
27
+
including but not limited to software source code, documentation
28
+
source, and configuration files.
29
+
30
+
"Object" form shall mean any form resulting from mechanical
31
+
transformation or translation of a Source form, including but
32
+
not limited to compiled object code, generated documentation,
33
+
and conversions to other media types.
34
+
35
+
"Work" shall mean the work of authorship, whether in Source or
36
+
Object form, made available under the License, as indicated by a
37
+
copyright notice that is included in or attached to the work
38
+
(an example is provided in the Appendix below).
39
+
40
+
"Derivative Works" shall mean any work, whether in Source or Object
41
+
form, that is based on (or derived from) the Work and for which the
42
+
editorial revisions, annotations, elaborations, or other modifications
43
+
represent, as a whole, an original work of authorship. For the purposes
44
+
of this License, Derivative Works shall not include works that remain
45
+
separable from, or merely link (or bind by name) to the interfaces of,
46
+
the Work and Derivative Works thereof.
47
+
48
+
"Contribution" shall mean any work of authorship, including
49
+
the original version of the Work and any modifications or additions
50
+
to that Work or Derivative Works thereof, that is intentionally
51
+
submitted to Licensor for inclusion in the Work by the copyright owner
52
+
or by an individual or Legal Entity authorized to submit on behalf of
53
+
the copyright owner. For the purposes of this definition, "submitted"
54
+
means any form of electronic, verbal, or written communication sent
55
+
to the Licensor or its representatives, including but not limited to
56
+
communication on electronic mailing lists, source code control systems,
57
+
and issue tracking systems that are managed by, or on behalf of, the
58
+
Licensor for the purpose of discussing and improving the Work, but
59
+
excluding communication that is conspicuously marked or otherwise
60
+
designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+
"Contributor" shall mean Licensor and any individual or Legal Entity
63
+
on behalf of whom a Contribution has been received by Licensor and
64
+
subsequently incorporated within the Work.
65
+
66
+
2. Grant of Copyright License. Subject to the terms and conditions of
67
+
this License, each Contributor hereby grants to You a perpetual,
68
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+
copyright license to reproduce, prepare Derivative Works of,
70
+
publicly display, publicly perform, sublicense, and distribute the
71
+
Work and such Derivative Works in Source or Object form.
72
+
73
+
3. Grant of Patent License. Subject to the terms and conditions of
74
+
this License, each Contributor hereby grants to You a perpetual,
75
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+
(except as stated in this section) patent license to make, have made,
77
+
use, offer to sell, sell, import, and otherwise transfer the Work,
78
+
where such license applies only to those patent claims licensable
79
+
by such Contributor that are necessarily infringed by their
80
+
Contribution(s) alone or by combination of their Contribution(s)
81
+
with the Work to which such Contribution(s) was submitted. If You
82
+
institute patent litigation against any entity (including a
83
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+
or a Contribution incorporated within the Work constitutes direct
85
+
or contributory patent infringement, then any patent licenses
86
+
granted to You under this License for that Work shall terminate
87
+
as of the date such litigation is filed.
88
+
89
+
4. Redistribution. You may reproduce and distribute copies of the
90
+
Work or Derivative Works thereof in any medium, with or without
91
+
modifications, and in Source or Object form, provided that You
92
+
meet the following conditions:
93
+
94
+
(a) You must give any other recipients of the Work or
95
+
Derivative Works a copy of this License; and
96
+
97
+
(b) You must cause any modified files to carry prominent notices
98
+
stating that You changed the files; and
99
+
100
+
(c) You must retain, in the Source form of any Derivative Works
101
+
that You distribute, all copyright, patent, trademark, and
102
+
attribution notices from the Source form of the Work,
103
+
excluding those notices that do not pertain to any part of
104
+
the Derivative Works; and
105
+
106
+
(d) If the Work includes a "NOTICE" text file as part of its
107
+
distribution, then any Derivative Works that You distribute must
108
+
include a readable copy of the attribution notices contained
109
+
within such NOTICE file, excluding those notices that do not
110
+
pertain to any part of the Derivative Works, in at least one
111
+
of the following places: within a NOTICE text file distributed
112
+
as part of the Derivative Works; within the Source form or
113
+
documentation, if provided along with the Derivative Works; or,
114
+
within a display generated by the Derivative Works, if and
115
+
wherever such third-party notices normally appear. The contents
116
+
of the NOTICE file are for informational purposes only and
117
+
do not modify the License. You may add Your own attribution
118
+
notices within Derivative Works that You distribute, alongside
119
+
or as an addendum to the NOTICE text from the Work, provided
120
+
that such additional attribution notices cannot be construed
121
+
as modifying the License.
122
+
123
+
You may add Your own copyright statement to Your modifications and
124
+
may provide additional or different license terms and conditions
125
+
for use, reproduction, or distribution of Your modifications, or
126
+
for any such Derivative Works as a whole, provided Your use,
127
+
reproduction, and distribution of the Work otherwise complies with
128
+
the conditions stated in this License.
129
+
130
+
5. Submission of Contributions. Unless You explicitly state otherwise,
131
+
any Contribution intentionally submitted for inclusion in the Work
132
+
by You to the Licensor shall be under the terms and conditions of
133
+
this License, without any additional terms or conditions.
134
+
Notwithstanding the above, nothing herein shall supersede or modify
135
+
the terms of any separate license agreement you may have executed
136
+
with Licensor regarding such Contributions.
137
+
138
+
6. Trademarks. This License does not grant permission to use the trade
139
+
names, trademarks, service marks, or product names of the Licensor,
140
+
except as required for reasonable and customary use in describing the
141
+
origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+
7. Disclaimer of Warranty. Unless required by applicable law or
144
+
agreed to in writing, Licensor provides the Work (and each
145
+
Contributor provides its Contributions) on an "AS IS" BASIS,
146
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+
implied, including, without limitation, any warranties or conditions
148
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+
PARTICULAR PURPOSE. You are solely responsible for determining the
150
+
appropriateness of using or redistributing the Work and assume any
151
+
risks associated with Your exercise of permissions under this License.
152
+
153
+
8. Limitation of Liability. In no event and under no legal theory,
154
+
whether in tort (including negligence), contract, or otherwise,
155
+
unless required by applicable law (such as deliberate and grossly
156
+
negligent acts) or agreed to in writing, shall any Contributor be
157
+
liable to You for damages, including any direct, indirect, special,
158
+
incidental, or consequential damages of any character arising as a
159
+
result of this License or out of the use or inability to use the
160
+
Work (including but not limited to damages for loss of goodwill,
161
+
work stoppage, computer failure or malfunction, or any and all
162
+
other commercial damages or losses), even if such Contributor
163
+
has been advised of the possibility of such damages.
164
+
165
+
9. Accepting Warranty or Additional Liability. While redistributing
166
+
the Work or Derivative Works thereof, You may choose to offer,
167
+
and charge a fee for, acceptance of support, warranty, indemnity,
168
+
or other liability obligations and/or rights consistent with this
169
+
License. However, in accepting such obligations, You may act only
170
+
on Your own behalf and on Your sole responsibility, not on behalf
171
+
of any other Contributor, and only if You agree to indemnify,
172
+
defend, and hold each Contributor harmless for any liability
173
+
incurred by, or claims asserted against, such Contributor by reason
174
+
of your accepting any such warranty or additional liability.
175
+
176
+
END OF TERMS AND CONDITIONS
177
+
178
+
APPENDIX: How to apply the Apache License to your work.
179
+
180
+
To apply the Apache License to your work, attach the following
181
+
boilerplate notice, with the fields enclosed by brackets "[]"
182
+
replaced with your own identifying information. (Don't include
183
+
the brackets!) The text should be enclosed in the appropriate
184
+
comment syntax for the file format. We also recommend that a
185
+
file or class name and description of purpose be included on the
186
+
same "printed page" as the copyright notice for easier
187
+
identification within third-party archives.
188
+
189
+
Copyright [yyyy] [name of copyright owner]
190
+
191
+
Licensed under the Apache License, Version 2.0 (the "License");
192
+
you may not use this file except in compliance with the License.
193
+
You may obtain a copy of the License at
194
+
195
+
http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+
Unless required by applicable law or agreed to in writing, software
198
+
distributed under the License is distributed on an "AS IS" BASIS,
199
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+
See the License for the specific language governing permissions and
201
+
limitations under the License.
+4
home/profiles/nvim/lazynvim/.config/nvim/README.md
+4
home/profiles/nvim/lazynvim/.config/nvim/README.md
+2
home/profiles/nvim/lazynvim/.config/nvim/init.lua
+2
home/profiles/nvim/lazynvim/.config/nvim/init.lua
+60
home/profiles/nvim/lazynvim/.config/nvim/lazy-lock.json
+60
home/profiles/nvim/lazynvim/.config/nvim/lazy-lock.json
···
···
1
+
{
2
+
"LazyVim": { "branch": "main", "commit": "12818a6cb499456f4903c5d8e68af43753ebc869" },
3
+
"SchemaStore.nvim": { "branch": "main", "commit": "54a2cf0105166d5a48172e81f12a2bf10cfc8b2c" },
4
+
"aerial.nvim": { "branch": "master", "commit": "e585934fef8d253dbc5655cff3deb3444e064e6c" },
5
+
"bufferline.nvim": { "branch": "main", "commit": "0b2fd861eee7595015b6561dade52fb060be10c4" },
6
+
"catppuccin": { "branch": "main", "commit": "4fd72a9ab64b393c2c22b168508fd244877fec96" },
7
+
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
8
+
"cmp-emoji": { "branch": "main", "commit": "e8398e2adf512a03bb4e1728ca017ffeac670a9f" },
9
+
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
10
+
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
11
+
"conform.nvim": { "branch": "master", "commit": "62eba813b7501b39612146cbf29cd07f1d4ac29c" },
12
+
"dashboard-nvim": { "branch": "master", "commit": "fabf5feec96185817c732d47d363f34034212685" },
13
+
"dressing.nvim": { "branch": "master", "commit": "c5775a888adbc50652cb370073fcfec963eca93e" },
14
+
"flash.nvim": { "branch": "main", "commit": "34c7be146a91fec3555c33fe89c7d643f6ef5cf1" },
15
+
"friendly-snippets": { "branch": "main", "commit": "00ebcaa159e817150bd83bfe2d51fa3b3377d5c4" },
16
+
"gitsigns.nvim": { "branch": "main", "commit": "562dc47189ad3c8696dbf460d38603a74d544849" },
17
+
"grug-far.nvim": { "branch": "main", "commit": "ebab68b2150079732ae8074eefb261a124824139" },
18
+
"indent-blankline.nvim": { "branch": "master", "commit": "db926997af951da38e5004ec7b9fbdc480b48f5d" },
19
+
"lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" },
20
+
"lazydev.nvim": { "branch": "main", "commit": "491452cf1ca6f029e90ad0d0368848fac717c6d2" },
21
+
"lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" },
22
+
"luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" },
23
+
"mason-lspconfig.nvim": { "branch": "main", "commit": "482350b050bd413931c2cdd4857443c3da7d57cb" },
24
+
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
25
+
"mini.ai": { "branch": "main", "commit": "a9b992b13d22a8db8df6beac25afa59a10b5584d" },
26
+
"mini.icons": { "branch": "main", "commit": "12e7b5d47bfc1b4c5ba4278fb49ec9100138df14" },
27
+
"mini.pairs": { "branch": "main", "commit": "927d19cbdd0e752ab1c7eed87072e71d2cd6ff51" },
28
+
"mini.surround": { "branch": "main", "commit": "d8913ed23be0a1a4585ae34414821cc343a46174" },
29
+
"neo-tree.nvim": { "branch": "main", "commit": "206241e451c12f78969ff5ae53af45616ffc9b72" },
30
+
"neovim-ayu": { "branch": "master", "commit": "6993189dd0ee38299879a1a0064718a8392e8713" },
31
+
"noice.nvim": { "branch": "main", "commit": "448bb9c524a7601035449210838e374a30153172" },
32
+
"nui.nvim": { "branch": "main", "commit": "61574ce6e60c815b0a0c4b5655b8486ba58089a1" },
33
+
"nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" },
34
+
"nvim-lint": { "branch": "master", "commit": "debabca63c0905b59ce596a55a8e33eafdf66342" },
35
+
"nvim-lspconfig": { "branch": "master", "commit": "911167921d49cd5c1c9b2436031d0da3945e787f" },
36
+
"nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" },
37
+
"nvim-snippets": { "branch": "main", "commit": "56b4052f71220144689caaa2e5b66222ba5661eb" },
38
+
"nvim-treesitter": { "branch": "master", "commit": "04401b5dd17c3419dae5141677bd256f52d54733" },
39
+
"nvim-treesitter-textobjects": { "branch": "master", "commit": "41e3abf6bfd9a9a681eb1f788bdeba91c9004b2b" },
40
+
"nvim-ts-autotag": { "branch": "main", "commit": "0cb76eea80e9c73b88880f0ca78fbd04c5bdcac7" },
41
+
"outline.nvim": { "branch": "main", "commit": "02a18194b3d2adfb537dd1a9f21d1fc29dd31382" },
42
+
"persistence.nvim": { "branch": "main", "commit": "f6aad7dde7fcf54148ccfc5f622c6d5badd0cc3d" },
43
+
"plenary.nvim": { "branch": "master", "commit": "ec289423a1693aeae6cd0d503bac2856af74edaa" },
44
+
"sg.nvim": { "branch": "master", "commit": "8bdd4d19da2268072708d5fe18fda9c23e16509d" },
45
+
"tailwindcss-colorizer-cmp.nvim": { "branch": "main", "commit": "3d3cd95e4a4135c250faf83dd5ed61b8e5502b86" },
46
+
"telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" },
47
+
"telescope-terraform-doc.nvim": { "branch": "main", "commit": "7ac642765615e6ff164ecfc82eb278aa68d06840" },
48
+
"telescope-terraform.nvim": { "branch": "main", "commit": "072c97023797ca1a874668aaa6ae0b74425335df" },
49
+
"telescope.nvim": { "branch": "master", "commit": "5972437de807c3bc101565175da66a1aa4f8707a" },
50
+
"todo-comments.nvim": { "branch": "main", "commit": "8f45f353dc3649cb9b44cecda96827ea88128584" },
51
+
"tokyonight.nvim": { "branch": "main", "commit": "b0e7c7382a7e8f6456f2a95655983993ffda745e" },
52
+
"trouble.nvim": { "branch": "main", "commit": "6efc446226679fda0547c0fd6a7892fd5f5b15d8" },
53
+
"ts-comments.nvim": { "branch": "main", "commit": "98d7d4dec0af1312d38e288f800bbf6ff562b6ab" },
54
+
"vim-dadbod": { "branch": "master", "commit": "7888cb7164d69783d3dce4e0283decd26b82538b" },
55
+
"vim-dadbod-completion": { "branch": "master", "commit": "880f7e9f2959e567c718d52550f9fae1aa07aa81" },
56
+
"vim-dadbod-ui": { "branch": "master", "commit": "0f51d8de368c8c6220973e8acd156d17da746f4c" },
57
+
"vim-fugitive": { "branch": "master", "commit": "0444df68cd1cdabc7453d6bd84099458327e5513" },
58
+
"vim-helm": { "branch": "master", "commit": "ae1ebc160d2b9b90108477ab10df7a4fc501e358" },
59
+
"which-key.nvim": { "branch": "main", "commit": "6c1584eb76b55629702716995cca4ae2798a9cca" }
60
+
}
+19
home/profiles/nvim/lazynvim/.config/nvim/lazyvim.json
+19
home/profiles/nvim/lazynvim/.config/nvim/lazyvim.json
···
···
1
+
{
2
+
"extras": [
3
+
"lazyvim.plugins.extras.editor.aerial",
4
+
"lazyvim.plugins.extras.editor.outline",
5
+
"lazyvim.plugins.extras.lang.go",
6
+
"lazyvim.plugins.extras.lang.helm",
7
+
"lazyvim.plugins.extras.lang.json",
8
+
"lazyvim.plugins.extras.lang.nix",
9
+
"lazyvim.plugins.extras.lang.sql",
10
+
"lazyvim.plugins.extras.lang.svelte",
11
+
"lazyvim.plugins.extras.lang.tailwind",
12
+
"lazyvim.plugins.extras.lang.terraform",
13
+
"lazyvim.plugins.extras.lang.typescript"
14
+
],
15
+
"news": {
16
+
"NEWS.md": "6520"
17
+
},
18
+
"version": 6
19
+
}
+3
home/profiles/nvim/lazynvim/.config/nvim/lua/config/autocmds.lua
+3
home/profiles/nvim/lazynvim/.config/nvim/lua/config/autocmds.lua
+21
home/profiles/nvim/lazynvim/.config/nvim/lua/config/keymaps.lua
+21
home/profiles/nvim/lazynvim/.config/nvim/lua/config/keymaps.lua
···
···
1
+
-- Keymaps are automatically loaded on the VeryLazy event
2
+
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
3
+
-- Add any additional keymaps here
4
+
local map = vim.keymap.set
5
+
6
+
-- Navigation
7
+
map("n", "gt", "<cmd>bnext<cr>", { desc = "Next Buffer" })
8
+
map("n", "gT", "<cmd>bprevious<cr>", { desc = "Prev Buffer" })
9
+
map("n", "gq", "<cmd>bdelete<cr>", { desc = "Prev Buffer" })
10
+
map("n", "<leader>q", "<cmd>q<cr>", { desc = "Quit" })
11
+
12
+
-- Git
13
+
map("n", "<leader>gs", "<cmd>:G<cr>", { desc = "Git Status" })
14
+
map("n", "<leader>gb", "<cmd>Telescope git_branches<cr>", { desc = "Git Status" })
15
+
map("n", "<leader>gp", "<cmd>:G! push<cr>", { desc = "Git Status" })
16
+
17
+
-- Telescope
18
+
map("n", "<leader>fs", "<cmd>Telescope live_grep<cr>", { desc = "Telescop Live Grep" })
19
+
20
+
-- Cody
21
+
map("n", "<leader>co", "<cmd>CodyChat<cr>", { desc = "Cody Chat" })
+57
home/profiles/nvim/lazynvim/.config/nvim/lua/config/lazy.lua
+57
home/profiles/nvim/lazynvim/.config/nvim/lua/config/lazy.lua
···
···
1
+
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
2
+
if not (vim.uv or vim.loop).fs_stat(lazypath) then
3
+
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
4
+
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
5
+
if vim.v.shell_error ~= 0 then
6
+
vim.api.nvim_echo({
7
+
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
8
+
{ out, "WarningMsg" },
9
+
{ "\nPress any key to exit..." },
10
+
}, true, {})
11
+
vim.fn.getchar()
12
+
os.exit(1)
13
+
end
14
+
end
15
+
vim.opt.rtp:prepend(lazypath)
16
+
17
+
require("lazy").setup({
18
+
spec = {
19
+
-- add LazyVim and import its plugins
20
+
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
21
+
-- import/override with your plugins
22
+
{ import = "plugins" },
23
+
},
24
+
defaults = {
25
+
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
26
+
-- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
27
+
lazy = false,
28
+
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
29
+
-- have outdated releases, which may break your Neovim install.
30
+
version = false, -- always use the latest git commit
31
+
-- version = "*", -- try installing the latest stable version for plugins that support semver
32
+
},
33
+
install = { colorscheme = { "tokyonight", "habamax" } },
34
+
checker = {
35
+
enabled = true, -- check for plugin updates periodically
36
+
notify = false, -- notify on update
37
+
}, -- automatically check for plugin updates
38
+
performance = {
39
+
rtp = {
40
+
-- disable some rtp plugins
41
+
disabled_plugins = {
42
+
"gzip",
43
+
-- "matchit",
44
+
-- "matchparen",
45
+
-- "netrwPlugin",
46
+
"tarPlugin",
47
+
"tohtml",
48
+
"tutor",
49
+
"zipPlugin",
50
+
},
51
+
},
52
+
},
53
+
})
54
+
55
+
require("sg").setup({})
56
+
-- require("ayu").setup({ mirage = true })
57
+
-- require("ayu").colorscheme()
+3
home/profiles/nvim/lazynvim/.config/nvim/lua/config/options.lua
+3
home/profiles/nvim/lazynvim/.config/nvim/lua/config/options.lua
+13
home/profiles/nvim/lazynvim/.config/nvim/lua/plugins/cody.lua
+13
home/profiles/nvim/lazynvim/.config/nvim/lua/plugins/cody.lua
+50
home/profiles/nvim/lazynvim/.config/nvim/lua/plugins/colorscheme.lua
+50
home/profiles/nvim/lazynvim/.config/nvim/lua/plugins/colorscheme.lua
···
···
1
+
return {
2
+
{
3
+
"catppuccin/nvim",
4
+
lazy = true,
5
+
name = "catppuccin",
6
+
opts = {
7
+
integrations = {
8
+
aerial = true,
9
+
alpha = true,
10
+
cmp = true,
11
+
dashboard = true,
12
+
flash = true,
13
+
gitsigns = true,
14
+
headlines = true,
15
+
illuminate = true,
16
+
indent_blankline = { enabled = true },
17
+
leap = true,
18
+
lsp_trouble = true,
19
+
mason = true,
20
+
markdown = true,
21
+
mini = true,
22
+
native_lsp = {
23
+
enabled = true,
24
+
underlines = {
25
+
errors = { "undercurl" },
26
+
hints = { "undercurl" },
27
+
warnings = { "undercurl" },
28
+
information = { "undercurl" },
29
+
},
30
+
},
31
+
navic = { enabled = true, custom_bg = "lualine" },
32
+
neotest = true,
33
+
neotree = true,
34
+
noice = true,
35
+
semantic_tokens = true,
36
+
telescope = true,
37
+
treesitter = true,
38
+
treesitter_context = true,
39
+
which_key = true,
40
+
},
41
+
},
42
+
},
43
+
{ "Shatur/neovim-ayu", lazy = false },
44
+
{
45
+
"LazyVim/LazyVim",
46
+
opts = {
47
+
colorscheme = "catppuccin-macchiato",
48
+
},
49
+
},
50
+
}
+193
home/profiles/nvim/lazynvim/.config/nvim/lua/plugins/example.lua
+193
home/profiles/nvim/lazynvim/.config/nvim/lua/plugins/example.lua
···
···
1
+
-- since this is just an example spec, don't actually load anything here and return an empty spec
2
+
-- stylua: ignore
3
+
if true then return {} end
4
+
5
+
-- every spec file under the "plugins" directory will be loaded automatically by lazy.nvim
6
+
--
7
+
-- In your plugin files, you can:
8
+
-- * add extra plugins
9
+
-- * disable/enabled LazyVim plugins
10
+
-- * override the configuration of LazyVim plugins
11
+
return {
12
+
-- add gruvbox
13
+
{ "ellisonleao/gruvbox.nvim" },
14
+
15
+
-- Configure LazyVim to load gruvbox
16
+
{
17
+
"LazyVim/LazyVim",
18
+
opts = {
19
+
colorscheme = "gruvbox",
20
+
},
21
+
},
22
+
23
+
-- change trouble config
24
+
{
25
+
"folke/trouble.nvim",
26
+
-- opts will be merged with the parent spec
27
+
opts = { use_diagnostic_signs = true },
28
+
},
29
+
30
+
-- disable trouble
31
+
{ "folke/trouble.nvim", enabled = false },
32
+
33
+
-- override nvim-cmp and add cmp-emoji
34
+
{
35
+
"hrsh7th/nvim-cmp",
36
+
dependencies = { "hrsh7th/cmp-emoji" },
37
+
---@param opts cmp.ConfigSchema
38
+
opts = function(_, opts)
39
+
table.insert(opts.sources, { name = "emoji" })
40
+
end,
41
+
},
42
+
43
+
-- change some telescope options and a keymap to browse plugin files
44
+
{
45
+
"nvim-telescope/telescope.nvim",
46
+
keys = {
47
+
-- add a keymap to browse plugin files
48
+
-- stylua: ignore
49
+
{
50
+
"<leader>fp",
51
+
function() require("telescope.builtin").find_files({ cwd = require("lazy.core.config").options.root }) end,
52
+
desc = "Find Plugin File",
53
+
},
54
+
},
55
+
-- change some options
56
+
opts = {
57
+
defaults = {
58
+
layout_strategy = "horizontal",
59
+
layout_config = { prompt_position = "top" },
60
+
sorting_strategy = "ascending",
61
+
winblend = 0,
62
+
},
63
+
},
64
+
},
65
+
66
+
-- add pyright to lspconfig
67
+
{
68
+
"neovim/nvim-lspconfig",
69
+
---@class PluginLspOpts
70
+
opts = {
71
+
---@type lspconfig.options
72
+
servers = {
73
+
-- pyright will be automatically installed with mason and loaded with lspconfig
74
+
pyright = {},
75
+
},
76
+
},
77
+
},
78
+
79
+
-- add tsserver and setup with typescript.nvim instead of lspconfig
80
+
{
81
+
"neovim/nvim-lspconfig",
82
+
dependencies = {
83
+
"jose-elias-alvarez/typescript.nvim",
84
+
init = function()
85
+
require("lazyvim.util").lsp.on_attach(function(_, buffer)
86
+
-- stylua: ignore
87
+
vim.keymap.set( "n", "<leader>co", "TypescriptOrganizeImports", { buffer = buffer, desc = "Organize Imports" })
88
+
vim.keymap.set("n", "<leader>cR", "TypescriptRenameFile", { desc = "Rename File", buffer = buffer })
89
+
end)
90
+
end,
91
+
},
92
+
---@class PluginLspOpts
93
+
opts = {
94
+
---@type lspconfig.options
95
+
servers = {
96
+
-- tsserver will be automatically installed with mason and loaded with lspconfig
97
+
tsserver = {},
98
+
},
99
+
-- you can do any additional lsp server setup here
100
+
-- return true if you don't want this server to be setup with lspconfig
101
+
---@type table<string, fun(server:string, opts:_.lspconfig.options):boolean?>
102
+
setup = {
103
+
-- example to setup with typescript.nvim
104
+
tsserver = function(_, opts)
105
+
require("typescript").setup({ server = opts })
106
+
return true
107
+
end,
108
+
-- Specify * to use this function as a fallback for any server
109
+
-- ["*"] = function(server, opts) end,
110
+
},
111
+
},
112
+
},
113
+
114
+
-- for typescript, LazyVim also includes extra specs to properly setup lspconfig,
115
+
-- treesitter, mason and typescript.nvim. So instead of the above, you can use:
116
+
{ import = "lazyvim.plugins.extras.lang.typescript" },
117
+
118
+
-- add more treesitter parsers
119
+
{
120
+
"nvim-treesitter/nvim-treesitter",
121
+
opts = {
122
+
ensure_installed = {
123
+
"bash",
124
+
"html",
125
+
"javascript",
126
+
"json",
127
+
"lua",
128
+
"markdown",
129
+
"markdown_inline",
130
+
"python",
131
+
"query",
132
+
"regex",
133
+
"tsx",
134
+
"typescript",
135
+
"vim",
136
+
"yaml",
137
+
},
138
+
},
139
+
},
140
+
141
+
-- since `vim.tbl_deep_extend`, can only merge tables and not lists, the code above
142
+
-- would overwrite `ensure_installed` with the new value.
143
+
-- If you'd rather extend the default config, use the code below instead:
144
+
{
145
+
"nvim-treesitter/nvim-treesitter",
146
+
opts = function(_, opts)
147
+
-- add tsx and treesitter
148
+
vim.list_extend(opts.ensure_installed, {
149
+
"tsx",
150
+
"typescript",
151
+
})
152
+
end,
153
+
},
154
+
155
+
-- the opts function can also be used to change the default opts:
156
+
{
157
+
"nvim-lualine/lualine.nvim",
158
+
event = "VeryLazy",
159
+
opts = function(_, opts)
160
+
table.insert(opts.sections.lualine_x, "๐")
161
+
end,
162
+
},
163
+
164
+
-- or you can return new options to override all the defaults
165
+
{
166
+
"nvim-lualine/lualine.nvim",
167
+
event = "VeryLazy",
168
+
opts = function()
169
+
return {
170
+
--[[add your custom lualine config here]]
171
+
}
172
+
end,
173
+
},
174
+
175
+
-- use mini.starter instead of alpha
176
+
{ import = "lazyvim.plugins.extras.ui.mini-starter" },
177
+
178
+
-- add jsonls and schemastore packages, and setup treesitter for json, json5 and jsonc
179
+
{ import = "lazyvim.plugins.extras.lang.json" },
180
+
181
+
-- add any tools you want to have installed below
182
+
{
183
+
"williamboman/mason.nvim",
184
+
opts = {
185
+
ensure_installed = {
186
+
"stylua",
187
+
"shellcheck",
188
+
"shfmt",
189
+
"flake8",
190
+
},
191
+
},
192
+
},
193
+
}
+6
home/profiles/nvim/lazynvim/.config/nvim/lua/plugins/git.lua
+6
home/profiles/nvim/lazynvim/.config/nvim/lua/plugins/git.lua
+15
home/profiles/nvim/lazynvim/.config/nvim/lua/plugins/surround.lua
+15
home/profiles/nvim/lazynvim/.config/nvim/lua/plugins/surround.lua
+3
home/profiles/nvim/lazynvim/.config/nvim/stylua.toml
+3
home/profiles/nvim/lazynvim/.config/nvim/stylua.toml
-9
home/profiles/nvim/package.json
-9
home/profiles/nvim/package.json
-3
home/profiles/tmux/default.nix
-3
home/profiles/tmux/default.nix
-85
home/profiles/tmux/tmux.conf
-85
home/profiles/tmux/tmux.conf
···
1
-
set -g base-index 1
2
-
setw -g pane-base-index 1
3
-
4
-
# https://old.reddit.com/r/tmux/comments/mesrci/tmux_2_doesnt_seem_to_use_256_colors/
5
-
set -g default-terminal "xterm-256color"
6
-
set -ga terminal-overrides ",*256col*:Tc"
7
-
set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q'
8
-
set-environment -g COLORTERM "truecolor"
9
-
10
-
# Mouse works as expected
11
-
set-option -g mouse on
12
-
# easy-to-remember split pane commands
13
-
bind | split-window -h -c "#{pane_current_path}"
14
-
bind - split-window -v -c "#{pane_current_path}"
15
-
16
-
# don't rename windows automatically
17
-
set-option -g allow-rename off
18
-
19
-
# DESIGN TWEAKS
20
-
21
-
# don't do anything when a 'bell' rings
22
-
set -g visual-activity off
23
-
set -g visual-bell off
24
-
set -g visual-silence off
25
-
setw -g monitor-activity off
26
-
set -g bell-action none
27
-
28
-
# clock mode
29
-
setw -g clock-mode-colour yellow
30
-
31
-
# copy mode
32
-
setw -g mode-style 'fg=black bg=green bold'
33
-
34
-
# panes
35
-
set -g pane-border-style 'fg=green'
36
-
set -g pane-active-border-style 'fg=yellow'
37
-
38
-
# statusbar
39
-
set -g status-position bottom
40
-
set -g status-justify left
41
-
set -g status-style 'fg=green'
42
-
43
-
set -g status-left ''
44
-
set -g status-left-length 10
45
-
46
-
set -g status-right-style 'fg=black bg=yellow'
47
-
set -g status-right '%Y-%m-%d %H:%M '
48
-
set -g status-right-length 50
49
-
50
-
setw -g window-status-current-style 'fg=black bg=green'
51
-
setw -g window-status-current-format ' #I #W #F '
52
-
53
-
setw -g window-status-style 'fg=green bg=black'
54
-
setw -g window-status-format ' #I #[fg=white]#W #[fg=yellow]#F '
55
-
56
-
setw -g window-status-bell-style 'fg=yellow bg=green bold'
57
-
58
-
# messages
59
-
set -g message-style 'fg=yellow bg=green bold'
60
-
61
-
# Unbind Ctrl+V so it passes through to Kitty for paste
62
-
unbind C-v
63
-
64
-
# Vim-aware pane navigation with Alt+hjkl
65
-
is_vim="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
66
-
bind-key -n M-h if-shell "$is_vim" "send-keys M-h" "select-pane -L"
67
-
bind-key -n M-j if-shell "$is_vim" "send-keys M-j" "select-pane -D"
68
-
bind-key -n M-k if-shell "$is_vim" "send-keys M-k" "select-pane -U"
69
-
bind-key -n M-l if-shell "$is_vim" "send-keys M-l" "select-pane -R"
70
-
71
-
# Window navigation with Alt+n/p
72
-
bind-key -n M-n next-window
73
-
bind-key -n M-p previous-window
74
-
75
-
# Pane resizing with Alt+Shift+hjkl
76
-
bind-key -n M-S-h resize-pane -L 2
77
-
bind-key -n M-S-j resize-pane -D 2
78
-
bind-key -n M-S-k resize-pane -U 2
79
-
bind-key -n M-S-l resize-pane -R 2
80
-
81
-
# Copy mode setup
82
-
bind v copy-mode
83
-
setw -g mode-keys vi
84
-
bind-key -T copy-mode-vi 'v' send -X begin-selection
85
-
bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
···
+1
-4
hosts/box/configuration.nix
+1
-4
hosts/box/configuration.nix
···
66
address = "192.168.1.240";
67
prefixLength = 24;
68
}];
69
-
ipv6.addresses = [{
70
-
address = "fd7d:587a:4300:1::240";
71
-
prefixLength = 64;
72
-
}];
73
ipv4.routes = [{ address = "192.168.1.0"; prefixLength = 24; via = "192.168.1.1"; }];
74
useDHCP = false;
75
};
···
92
# Enable the OpenSSH daemon.
93
services.openssh.enable = true;
94
networking.firewall.allowedTCPPorts = [ 22 ];
95
96
programs.gnupg.agent.enable = true;
97
programs.gnupg.agent.pinentryPackage = pkgs.pinentry-curses;
···
66
address = "192.168.1.240";
67
prefixLength = 24;
68
}];
69
ipv4.routes = [{ address = "192.168.1.0"; prefixLength = 24; via = "192.168.1.1"; }];
70
useDHCP = false;
71
};
···
88
# Enable the OpenSSH daemon.
89
services.openssh.enable = true;
90
networking.firewall.allowedTCPPorts = [ 22 ];
91
+
sound.enable = false;
92
93
programs.gnupg.agent.enable = true;
94
programs.gnupg.agent.pinentryPackage = pkgs.pinentry-curses;
+23
-14
hosts/box/default.nix
+23
-14
hosts/box/default.nix
···
1
-
{ self, pkgs, ... }: {
2
imports = [
3
./configuration.nix
4
../profiles/core
···
9
# ../profiles/monitoring
10
../profiles/nfs
11
../profiles/gonic
12
-
../profiles/headphones
13
../profiles/radicale
14
# ../profiles/seafile # waiting for https://github.com/NixOS/nixpkgs/pull/249523 to be merged
15
../profiles/syncthing
···
18
../profiles/wallabag
19
../profiles/finance
20
../profiles/sync/website
21
-
../profiles/sync/music
22
../profiles/grasp
23
# ../profiles/archivebox
24
# ../profiles/woodpecker-agent
25
# ../profiles/jellyfin
26
../profiles/ulogger-server
27
-
../profiles/immich
28
-
../profiles/jacket
29
../profiles/gpodder
30
-
../profiles/transmission
31
#../profiles/postgres_upgrade_script
32
];
33
···
35
age.secrets.borg-password.file = "${self}/secrets/borg-password.age";
36
services.postgresqlBackup = {
37
enable = true;
38
-
databases = [ "wallabag" "immich" "ulogger" ];
39
location = "/var/backup/postgresql";
40
};
41
mossnet.backup = {
···
50
"/data/books" # calibre-web
51
# "/home/anish/usr/nonfiction" # syncthing
52
"/home/anish/usr/finance" # beancount
53
-
"/mnt/two/postgres" # sealight postgres backups TODO remove once moved to capsul
54
-
"/mnt/two/photos"
55
-
"/mnt/two/music"
56
];
57
# seafile
58
};
59
60
-
environment.systemPackages = with pkgs; [ lm_sensors ];
61
-
hardware.fancontrol = {
62
-
enable = false;
63
-
config = '''';
64
};
65
66
age.secrets.box-wg.file = "${self}/secrets/box-wg.age";
···
1
+
{ self, pkgs, ... }:
2
+
{
3
imports = [
4
./configuration.nix
5
../profiles/core
···
10
# ../profiles/monitoring
11
../profiles/nfs
12
../profiles/gonic
13
+
# ../profiles/headphones # TODO broken on 23.11, see: https://github.com/rembo10/headphones/issues/3320
14
../profiles/radicale
15
# ../profiles/seafile # waiting for https://github.com/NixOS/nixpkgs/pull/249523 to be merged
16
../profiles/syncthing
···
19
../profiles/wallabag
20
../profiles/finance
21
../profiles/sync/website
22
../profiles/grasp
23
# ../profiles/archivebox
24
# ../profiles/woodpecker-agent
25
# ../profiles/jellyfin
26
../profiles/ulogger-server
27
+
../profiles/photoprism # Replace with immich
28
../profiles/gpodder
29
#../profiles/postgres_upgrade_script
30
];
31
···
33
age.secrets.borg-password.file = "${self}/secrets/borg-password.age";
34
services.postgresqlBackup = {
35
enable = true;
36
+
databases = [ "wallabag" "photoprism" "ulogger" ];
37
location = "/var/backup/postgresql";
38
};
39
mossnet.backup = {
···
48
"/data/books" # calibre-web
49
# "/home/anish/usr/nonfiction" # syncthing
50
"/home/anish/usr/finance" # beancount
51
+
"/mnt/two/postgres" # sealight postgres backups TODO remove once moved to capsul
52
];
53
# seafile
54
};
55
56
+
services.transmission = {
57
+
enable = true;
58
+
settings = {
59
+
rpc.bind-address = "0.0.0.0";
60
+
download-dir = "/mnt/two/new-music";
61
+
};
62
+
};
63
+
services.nginx.virtualHosts."transmission.mossnet.lan" = {
64
+
enableACME = false;
65
+
forceSSL = false;
66
+
67
+
locations."/" = {
68
+
extraConfig = ''
69
+
proxy_pass http://localhost:9091/;
70
+
proxy_set_header X-Forwarded-Host $host;
71
+
'';
72
+
};
73
};
74
75
age.secrets.box-wg.file = "${self}/secrets/box-wg.age";
+2
hosts/curve/configuration.nix
+2
hosts/curve/configuration.nix
+4
-3
hosts/curve/default.nix
+4
-3
hosts/curve/default.nix
···
38
pkgs.lib.mkForce [ ]; # Normally ["network-online.target"]
39
};
40
41
-
42
43
fileSystems."/mnt/ftp" = {
44
device = "192.168.1.240:/home/ftp";
···
69
70
# lazy enable of ports necessary for KDE connect which is installed via cli home profile (for some reason?)
71
networking.firewall = {
72
-
allowedTCPPorts = [ 22 4173 ]; # allow ssh
73
allowedTCPPortRanges = [{
74
from = 1714;
75
to = 1764;
···
93
mossnet.backup = {
94
enable = true;
95
name = "curve";
96
-
paths = [ "/home/anish/usr" "/home/anish/.ssh" "/home/anish/.password-store/" ];
97
};
98
99
# enable adb
···
38
pkgs.lib.mkForce [ ]; # Normally ["network-online.target"]
39
};
40
41
+
programs.gnupg.agent.enable = true;
42
+
programs.gnupg.agent.pinentryPackage = pkgs.pinentry-gnome3;
43
44
fileSystems."/mnt/ftp" = {
45
device = "192.168.1.240:/home/ftp";
···
70
71
# lazy enable of ports necessary for KDE connect which is installed via cli home profile (for some reason?)
72
networking.firewall = {
73
+
allowedTCPPorts = [ 22 ]; # allow ssh
74
allowedTCPPortRanges = [{
75
from = 1714;
76
to = 1764;
···
94
mossnet.backup = {
95
enable = true;
96
name = "curve";
97
+
paths = [ "/home/anish/usr" "/home/anish/.ssh" ];
98
};
99
100
# enable adb
+44
hosts/darwin/casks/default.nix
+44
hosts/darwin/casks/default.nix
···
···
1
+
{ ... }:
2
+
3
+
{
4
+
homebrew.enable = true;
5
+
homebrew.brews = [
6
+
"kind"
7
+
"kubectl"
8
+
"bazelisk"
9
+
"sourcegraph/src-cli/src-cli"
10
+
"gh"
11
+
# "postgresql@15"
12
+
# "redis"
13
+
];
14
+
homebrew.casks = [
15
+
# Development Tools
16
+
"homebrew/cask/docker"
17
+
# "syncthing"
18
+
# "insomnia"
19
+
# "tableplus"
20
+
# "ngrok"
21
+
"postico"
22
+
"wireshark"
23
+
"1password"
24
+
"orbstack"
25
+
# "aerospace"
26
+
27
+
# Communication Tools
28
+
# Already installed manually
29
+
# "loom"
30
+
# "slack"
31
+
# "zoom"
32
+
# "firefox"
33
+
# "1password-cli"
34
+
35
+
# Utility Tools
36
+
# "syncthing"
37
+
38
+
# Productivity Tools
39
+
"raycast"
40
+
41
+
# AI
42
+
# "diffusionbee"
43
+
];
44
+
}
+154
hosts/darwin/default.nix
+154
hosts/darwin/default.nix
···
···
1
+
{ self, pkgs, config, ... }:
2
+
3
+
{
4
+
imports = [
5
+
./sketchybar
6
+
# ./yabai # Now using aerospace
7
+
# ./casks
8
+
# ../../modules/darwin/home-manager.nix
9
+
# ../../modules/shared
10
+
# ../../modules/shared/cachix
11
+
];
12
+
13
+
environment.systemPackages = [
14
+
pkgs.go
15
+
pkgs.python3
16
+
pkgs.cargo
17
+
pkgs.k9s
18
+
pkgs.kubernetes-helm
19
+
pkgs.shellcheck
20
+
];
21
+
22
+
age.identityPaths = [ "/Users/anishlakhwara/.ssh/id_ed25519" ];
23
+
age.secrets.work-wg.file = "${self}/secrets/work-wg.age";
24
+
age.secrets.work-wg.owner = "anishlakhwara";
25
+
networking.wg-quick.interfaces = {
26
+
wg0 = {
27
+
address = [ "10.0.69.7/24" ];
28
+
listenPort = 60990; # to match firewall allowedUDPPorts (without this wg uses random port numbers)
29
+
privateKeyFile = config.age.secrets.work-wg.path;
30
+
dns = [ "10.0.69.4" ];
31
+
postDown = ''
32
+
sudo /usr/sbin/networksetup -setdnsservers Wi-Fi "Empty"
33
+
'';
34
+
peers = [
35
+
# For a client configuration, one peer entry for the server will suffice.
36
+
{
37
+
publicKey = "c1J4p63rD3IlszugMZiki7UBV3YmDdqa3DU4UejXzAI=";
38
+
allowedIPs = [ "10.0.69.0/24" ];
39
+
# Set this to the server IP and port.
40
+
endpoint = "sealight.xyz:60990"; # ToDo: route to endpoint not automatically configured https://wiki.archlinux.org/index.php/WireGuard#Loop_routing https://discourse.nixos.org/t/solved-minimal-firewall-setup-for-wireguard-client/7577
41
+
persistentKeepalive = 25;
42
+
}
43
+
];
44
+
};
45
+
};
46
+
47
+
# Auto upgrade nix package and the daemon service.
48
+
services.nix-daemon.enable = true;
49
+
nixpkgs.hostPlatform = "aarch64-darwin";
50
+
programs.zsh.enable = true;
51
+
52
+
# Setup user, packages, programs
53
+
nix = {
54
+
# package = pkgs.nixUnstable;
55
+
settings.trusted-users = [ "@admin" "anishlakhwara" ];
56
+
57
+
gc = {
58
+
user = "root";
59
+
automatic = true;
60
+
interval = { Weekday = 0; Hour = 2; Minute = 0; };
61
+
options = "--delete-older-than 30d";
62
+
};
63
+
64
+
# Turn this on to make command line easier
65
+
extraOptions = ''
66
+
experimental-features = nix-command flakes
67
+
'';
68
+
};
69
+
70
+
# Turn off NIX_PATH warnings now that we're using flakes
71
+
system.checks.verifyNixPath = false;
72
+
73
+
# Load configuration that is shared across systems
74
+
# environment.systemPackages = with pkgs; [
75
+
#
76
+
# ] ++ (import ../../modules/shared/packages.nix { inherit pkgs; });
77
+
78
+
# Enable fonts dir
79
+
# fonts.fontDir.enable = true;
80
+
fonts.packages = with pkgs; [
81
+
fira-code
82
+
fira-code-symbols
83
+
hermit
84
+
#hack
85
+
siji
86
+
font-awesome
87
+
proggyfonts
88
+
(nerdfonts.override { fonts = [ "FiraCode" "DroidSansMono" "Iosevka" ]; })
89
+
];
90
+
91
+
system = {
92
+
stateVersion = 4;
93
+
94
+
keyboard = {
95
+
enableKeyMapping = true;
96
+
};
97
+
98
+
defaults = {
99
+
LaunchServices = {
100
+
LSQuarantine = false;
101
+
};
102
+
103
+
NSGlobalDomain = {
104
+
AppleShowAllExtensions = true;
105
+
ApplePressAndHoldEnabled = false;
106
+
107
+
# 120, 90, 60, 30, 12, 6, 2
108
+
KeyRepeat = 2;
109
+
110
+
# 120, 94, 68, 35, 25, 15
111
+
InitialKeyRepeat = 15;
112
+
113
+
"com.apple.mouse.tapBehavior" = 1;
114
+
"com.apple.sound.beep.volume" = 0.0;
115
+
"com.apple.sound.beep.feedback" = 0;
116
+
};
117
+
118
+
loginwindow = {
119
+
# disable guest account
120
+
GuestEnabled = false;
121
+
# show name instead of username
122
+
SHOWFULLNAME = false;
123
+
};
124
+
125
+
dock = {
126
+
autohide = true;
127
+
autohide-delay = 0.0;
128
+
autohide-time-modifier = 1.0;
129
+
static-only = false;
130
+
showhidden = false;
131
+
show-recents = false;
132
+
launchanim = true;
133
+
mouse-over-hilite-stack = true;
134
+
orientation = "bottom";
135
+
tilesize = 48;
136
+
mru-spaces = false;
137
+
};
138
+
139
+
finder = {
140
+
_FXShowPosixPathInTitle = false;
141
+
};
142
+
143
+
trackpad = {
144
+
Clicking = false;
145
+
TrackpadThreeFingerDrag = true;
146
+
};
147
+
};
148
+
149
+
# keyboard = {
150
+
# enableKeyMapping = true;
151
+
# remapCapsLockToControl = true;
152
+
# };
153
+
};
154
+
}
+10
hosts/darwin/sketchybar/default.nix
+10
hosts/darwin/sketchybar/default.nix
+59
hosts/darwin/sketchybar/sketchybarrc
+59
hosts/darwin/sketchybar/sketchybarrc
···
···
1
+
#!/usr/bin/env bash
2
+
3
+
source "$HOME/.config/sketchybar/variables.sh" # Loads all defined colors
4
+
5
+
# General bar and defaults
6
+
# parts I didn't want
7
+
# y_offset=5 \
8
+
# margin=5 \
9
+
10
+
sketchybar --bar height=35 \
11
+
color="$BAR_COLOR" \
12
+
shadow="$SHADOW" \
13
+
position=top \
14
+
sticky=on \
15
+
padding_right=0 \
16
+
padding_left=3 \
17
+
corner_radius="$CORNER_RADIUS" \
18
+
blur_radius=20 \
19
+
notch_width=200 \
20
+
--default updates=when_shown \
21
+
icon.font="$FONT:Bold:13.5" \
22
+
icon.color="$ICON_COLOR" \
23
+
icon.padding_left="$PADDINGS" \
24
+
icon.padding_right="$PADDINGS" \
25
+
label.font="$FONT:Bold:13.0" \
26
+
label.color="$LABEL_COLOR" \
27
+
label.padding_left="$PADDINGS" \
28
+
label.padding_right="$PADDINGS" \
29
+
background.padding_right="$PADDINGS" \
30
+
background.padding_left="$PADDINGS" \
31
+
popup.background.border_width=1 \
32
+
popup.background.corner_radius=11 \
33
+
popup.background.border_color="$POPUP_BORDER_COLOR" \
34
+
popup.background.color="$POPUP_BACKGROUND_COLOR" \
35
+
popup.background.shadow.drawing="$SHADOW"
36
+
37
+
# Left
38
+
# source "$ITEM_DIR/apple.sh"
39
+
source "$ITEM_DIR/spaces.sh"
40
+
41
+
# Center (of notch)
42
+
# source "$ITEM_DIR/spotify.sh"
43
+
source "$ITEM_DIR/front_app.sh"
44
+
45
+
# Right
46
+
source "$ITEM_DIR/clock.sh"
47
+
source "$ITEM_DIR/calendar.sh"
48
+
source "$ITEM_DIR/battery.sh"
49
+
source "$ITEM_DIR/volume.sh"
50
+
source "$ITEM_DIR/cpu.sh"
51
+
source "$ITEM_DIR/vpn.sh"
52
+
53
+
#################### Finalizing Setup ####################
54
+
55
+
# sketchybar --hotload true
56
+
57
+
sketchybar --update
58
+
59
+
echo "sketchybar configuration loaded.."
+102
hosts/darwin/yabai/default.nix
+102
hosts/darwin/yabai/default.nix
···
···
1
+
{pkgs, ... }:
2
+
3
+
{
4
+
services.yabai = {
5
+
enable = true;
6
+
config = {
7
+
mouse_follows_focus = "off";
8
+
focus_follows_mouse = "off";
9
+
window_placement = "second_child";
10
+
window_topmost = "off";
11
+
window_opacity = "off";
12
+
window_opacity_duration = 0.0;
13
+
window_shadow = "on";
14
+
window_border = "off";
15
+
window_border_placement = "inset";
16
+
window_border_width = 4;
17
+
window_border_radius = -1.0;
18
+
active_window_border_topmost = "off";
19
+
active_window_border_color = "0xff775759";
20
+
normal_window_border_color = "0xff505050";
21
+
insert_window_border_color = "0xffd75f5f";
22
+
active_window_opacity = 1.0;
23
+
normal_window_opacity = 0.9;
24
+
split_ratio = 0.73;
25
+
auto_balance = "on";
26
+
mouse_modifier = "fn";
27
+
mouse_action1 = "move";
28
+
mouse_action2 = "resize";
29
+
layout = "bsp";
30
+
top_padding = 5;
31
+
bottom_padding = 5;
32
+
left_padding = 5;
33
+
right_padding = 5;
34
+
window_gap = 5;
35
+
};
36
+
extraConfig = ''
37
+
# Do not manage windows with certain titles eg. Copying files or moving to bin
38
+
yabai -m rule --add title="(Copy|Bin|About This Mac|Info)" manage=off
39
+
# Do not manage some apps which are not resizable
40
+
yabai -m rule --add app="^(Calculator|System Preferences|[sS]tats|[Jj]et[Bb]rains [Tt]ool[Bb]ox|kftray)$" manage=off
41
+
'';
42
+
};
43
+
44
+
system.activationScripts.yabai = {
45
+
enable = true;
46
+
text = ''
47
+
yabai --install-service && yabai --start-service
48
+
'';
49
+
};
50
+
51
+
services.skhd = {
52
+
enable = true;
53
+
skhdConfig = ''
54
+
# Open iTerm2
55
+
cmd - enter : kitty --single-instance -d ~
56
+
57
+
##################
58
+
# Window Motions #
59
+
##################
60
+
# Rotate
61
+
lalt - r : yabai -m space --rotate 90
62
+
# Mirror verticaly
63
+
lalt - x : yabai -m space --mirror y-axis
64
+
# Mirror horizontaly
65
+
lalt - y : yabai -m space --mirror x-axis
66
+
# yes, i know i swapped x and y, but I mainly use y-axis and y is further...
67
+
# Fullscreen
68
+
cmd - f : yabai -m window --toggle zoom-fullscreen
69
+
# Swap
70
+
lalt - q : yabai -m window --swap west
71
+
lalt - s : yabai -m window --swap south
72
+
lalt - z : yabai -m window --swap north
73
+
lalt - d : yabai -m window --swap east
74
+
# Warp
75
+
shift + lalt - q : yabai -m window --warp west
76
+
shift + lalt - s : yabai -m window --warp south
77
+
shift + lalt - z : yabai -m window --warp north
78
+
shift + lalt - d : yabai -m window --warp east
79
+
80
+
#########
81
+
# Focus #
82
+
#########
83
+
# Clockwise
84
+
# alt - tab : yabai -m window --focus "$(yabai -m query --windows --space | jq -re "[sort_by(.id, .frame) | .[] | select(.role == \"AXWindow\" and .subrole == \"AXStandardWindow\") | .id] | nth(index($(yabai -m query --windows --window | jq -re ".id")) - 1)")"
85
+
# Counter-clockwise
86
+
# shift - tab : yabai -m window --focus "$(yabai -m query --windows --space | jq -re "[sort_by(.id, .frame) | reverse | .[] | select(.role == \"AXWindow\" and .subrole == \"AXStandardWindow\") | .id] | nth(index($(yabai -m query --windows --window | jq -re ".id")) - 1)")"
87
+
88
+
##########
89
+
# Spaces #
90
+
##########
91
+
ctrl - left : yabai -m space --focus prev
92
+
ctrl - right : yabai -m space --focus next
93
+
ctrl + shift - right : yabai -m window --space next; yabai -m space --focus next
94
+
ctrl + shift - left : yabai -m window --space prev; yabai -m space --focus prev
95
+
cmd - 1 : yabai -m window --space 1; yabai -m space --focus 1
96
+
cmd - 2 : yabai -m window --space 2; yabai -m space --focus 2
97
+
cmd - 3 : yabai -m window --space 3; yabai -m space --focus 3
98
+
cmd - 4 : yabai -m window --space 4; yabai -m space --focus 4
99
+
cmd - 5 : yabai -m window --space 5; yabai -m space --focus 5
100
+
'';
101
+
};
102
+
}
+120
hosts/deck/configuration.nix
+120
hosts/deck/configuration.nix
···
···
1
+
# Edit this configuration file to define what should be installed on
2
+
# your system. Help is available in the configuration.nix(5) man page
3
+
# and in the NixOS manual (accessible by running โnixos-helpโ).
4
+
5
+
{ config, pkgs, ... }:
6
+
7
+
{
8
+
imports =
9
+
[ # Include the results of the hardware scan.
10
+
./hardware-configuration.nix
11
+
];
12
+
13
+
# Bootloader.
14
+
boot.loader.systemd-boot.enable = true;
15
+
boot.loader.efi.canTouchEfiVariables = true;
16
+
17
+
networking.hostName = "deck"; # Define your hostname.
18
+
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
19
+
20
+
# Configure network proxy if necessary
21
+
# networking.proxy.default = "http://user:password@proxy:port/";
22
+
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
23
+
24
+
# Enable networking
25
+
networking.networkmanager.enable = true;
26
+
27
+
# Set your time zone.
28
+
# time.timeZone = "America/Los_Angeles";
29
+
30
+
# Select internationalisation properties.
31
+
i18n.defaultLocale = "en_US.UTF-8";
32
+
33
+
# i18n.extraLocaleSettings = {
34
+
# LC_ADDRESS = "en_US.UTF-8";
35
+
# LC_IDENTIFICATION = "en_US.UTF-8";
36
+
# LC_MEASUREMENT = "en_US.UTF-8";
37
+
# LC_MONETARY = "en_US.UTF-8";
38
+
# LC_NAME = "en_US.UTF-8";
39
+
# LC_NUMERIC = "en_US.UTF-8";
40
+
# LC_PAPER = "en_US.UTF-8";
41
+
# LC_TELEPHONE = "en_US.UTF-8";
42
+
# LC_TIME = "en_US.UTF-8";
43
+
# };
44
+
45
+
# Enable the X11 windowing system.
46
+
# services.xserver.enable = true;
47
+
48
+
# Enable the GNOME Desktop Environment.
49
+
# services.xserver.displayManager.gdm.enable = true;
50
+
# services.xserver.desktopManager.gnome.enable = true;
51
+
52
+
# Configure keymap in X11
53
+
# services.xserver.xkb = {
54
+
# layout = "us";
55
+
# variant = "";
56
+
# };
57
+
58
+
59
+
# use the example session manager (no others are packaged yet so this is enabled by default,
60
+
# no need to redefine it in your config for now)
61
+
#media-session.enable = true;
62
+
63
+
# Enable touchpad support (enabled default in most desktopManager).
64
+
# services.xserver.libinput.enable = true;
65
+
66
+
# Define a user account. Don't forget to set a password with โpasswdโ.
67
+
# users.users.anish = {
68
+
# isNormalUser = true;
69
+
# extraGroups = [ "networkmanager" "wheel" ];
70
+
# packages = with pkgs; [
71
+
# # thunderbird
72
+
# ];
73
+
# };
74
+
75
+
# Enable automatic login for the user.
76
+
services.xserver.displayManager.autoLogin.enable = true;
77
+
services.xserver.displayManager.autoLogin.user = "anish";
78
+
79
+
# Workaround for GNOME autologin: https://github.com/NixOS/nixpkgs/issues/103746#issuecomment-945091229
80
+
systemd.services."getty@tty1".enable = false;
81
+
systemd.services."autovt@tty1".enable = false;
82
+
83
+
# Install firefox.
84
+
# programs.firefox.enable = true;
85
+
86
+
# List packages installed in system profile. To search, run:
87
+
# $ nix search wget
88
+
environment.systemPackages = with pkgs; [
89
+
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
90
+
# wget
91
+
];
92
+
93
+
# Some programs need SUID wrappers, can be configured further or are
94
+
# started in user sessions.
95
+
# programs.mtr.enable = true;
96
+
# programs.gnupg.agent = {
97
+
# enable = true;
98
+
# enableSSHSupport = true;
99
+
# };
100
+
101
+
# List services that you want to enable:
102
+
103
+
# Enable the OpenSSH daemon.
104
+
# services.openssh.enable = true;
105
+
106
+
# Open ports in the firewall.
107
+
# networking.firewall.allowedTCPPorts = [ ... ];
108
+
# networking.firewall.allowedUDPPorts = [ ... ];
109
+
# Or disable the firewall altogether.
110
+
# networking.firewall.enable = false;
111
+
112
+
# This value determines the NixOS release from which the default
113
+
# settings for stateful data, like file locations and database versions
114
+
# on your system were taken. Itโs perfectly fine and recommended to leave
115
+
# this value at the release version of the first install of this system.
116
+
# Before changing this value read the documentation for this option
117
+
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
118
+
system.stateVersion = "24.11"; # Did you read the comment?
119
+
120
+
}
+54
hosts/deck/default.nix
+54
hosts/deck/default.nix
···
···
1
+
{ self, pkgs, config, ... }: {
2
+
imports = [
3
+
./configuration.nix
4
+
../users/anish
5
+
../profiles/core
6
+
# ../profiles/bluetooth
7
+
# ../profiles/music
8
+
../profiles/sync/cal
9
+
../profiles/wifi
10
+
../profiles/desktop
11
+
../profiles/mimetypes
12
+
../profiles/syncthing
13
+
../profiles/mossnet-hosts
14
+
# ../profiles/fly-wg
15
+
# ../profiles/mount-mossnet
16
+
];
17
+
18
+
# age.secrets.deck-wg.file = "${self}/secrets/deck-wg.age";
19
+
# age.secrets.deck-wg.owner = "deck";
20
+
# mossnet.wg = {
21
+
# enable = true;
22
+
# ips = [ "10.0.69.6/24" ];
23
+
# privateKeyFile = "/run/agenix/deck-wg";
24
+
# };
25
+
26
+
users.users.anish.extraGroups = [ "adbusers" "wheel" "plugdev" "libvertd" ];
27
+
# boot.plymouth = {
28
+
# enable = true;
29
+
# themePackages = [ pkgs.plymouth-themes ];
30
+
# theme = "motion";
31
+
# };
32
+
33
+
jovian.steam.enable = true;
34
+
jovian.devices.steamdeck.enable = true;
35
+
jovian.steam.user = "anish";
36
+
jovian.steam.autoStart = true;
37
+
jovian.steam.desktopSession = "gnome";
38
+
# jovian.steam.desktopSession = "none+bspwm";
39
+
40
+
# Install XR drivers
41
+
environment.systemPackages = with pkgs; [
42
+
xrlinuxdriver
43
+
stardust-xr-server
44
+
# breezy-gnome
45
+
];
46
+
47
+
services.udev.packages = with pkgs; [ xrlinuxdriver ];
48
+
49
+
services.monado = {
50
+
enable = true;
51
+
defaultRuntime = true;
52
+
};
53
+
54
+
}
+40
hosts/deck/hardware-configuration.nix
+40
hosts/deck/hardware-configuration.nix
···
···
1
+
# Do not modify this file! It was generated by โnixos-generate-configโ
2
+
# and may be overwritten by future invocations. Please make changes
3
+
# to /etc/nixos/configuration.nix instead.
4
+
{ config, lib, pkgs, modulesPath, ... }:
5
+
6
+
{
7
+
imports =
8
+
[ (modulesPath + "/installer/scan/not-detected.nix")
9
+
];
10
+
11
+
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usbhid" "sdhci_pci" ];
12
+
boot.initrd.kernelModules = [ ];
13
+
boot.kernelModules = [ "kvm-amd" ];
14
+
boot.extraModulePackages = [ ];
15
+
16
+
fileSystems."/" =
17
+
{ device = "/dev/disk/by-uuid/d432dae0-3512-4891-9582-56d7ecd8524c";
18
+
fsType = "ext4";
19
+
};
20
+
21
+
fileSystems."/boot" =
22
+
{ device = "/dev/disk/by-uuid/5B4C-7406";
23
+
fsType = "vfat";
24
+
options = [ "fmask=0077" "dmask=0077" ];
25
+
};
26
+
27
+
swapDevices =
28
+
[ { device = "/dev/disk/by-uuid/f75a730e-c849-4edd-a17f-52492d4260dc"; }
29
+
];
30
+
31
+
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
32
+
# (the default) this is the recommended approach. When using systemd-networkd it's
33
+
# still possible to use this option, but it's recommended to use it in conjunction
34
+
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
35
+
networking.useDHCP = lib.mkDefault true;
36
+
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
37
+
38
+
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
39
+
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
40
+
}
+1
hosts/helix/configuration.nix
+1
hosts/helix/configuration.nix
-16
hosts/helix/default.nix
-16
hosts/helix/default.nix
···
30
privateKeyFile = "/run/agenix/helix-wg";
31
};
32
33
-
# Reverse proxy for immich
34
-
# services.nginx.virtualHosts."photos.sealight.xyz" = {
35
-
# enableACME = true;
36
-
# forceSSL = true;
37
-
38
-
# locations."/" = {
39
-
# extraConfig = ''
40
-
# proxy_pass http://10.0.69.4:8567;
41
-
# proxy_set_header Host $host;
42
-
# proxy_set_header X-Real-IP $remote_addr;
43
-
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
44
-
# proxy_set_header X-Forwarded-Proto $scheme;
45
-
# '';
46
-
# };
47
-
# };
48
-
49
services.postgresql.package = pkgs.postgresql_15;
50
services.postgresqlBackup = {
51
# TODO needs working wireguard to box
+2
hosts/lituus/configuration.nix
+2
hosts/lituus/configuration.nix
···
19
# networking.proxy.default = "http://user:password@proxy:port/";
20
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
21
22
# Define a user account. Don't forget to set a password with โpasswdโ.
23
# This value determines the NixOS release with which your system is to be
24
# compatible, in order to avoid breaking some software such as database
···
19
# networking.proxy.default = "http://user:password@proxy:port/";
20
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
21
22
+
sound.enable = false;
23
+
24
# Define a user account. Don't forget to set a password with โpasswdโ.
25
# This value determines the NixOS release with which your system is to be
26
# compatible, in order to avoid breaking some software such as database
-2
hosts/profiles/core/default.nix
-2
hosts/profiles/core/default.nix
+36
-36
hosts/profiles/desktop/default.nix
+36
-36
hosts/profiles/desktop/default.nix
···
1
{ self, config, pkgs, lib, ... }:
2
let
3
tex = (pkgs.texlive.combine {
4
-
inherit (pkgs.texlive)
5
-
scheme-basic dvisvgm dvipng # for preview and export as html
6
wrapfig amsmath ulem hyperref capt-of;
7
#(setq org-latex-compiler "lualatex")
8
#(setq org-preview-latex-default-process 'dvisvgm)
···
13
rev = "502f212d83bc67e8f0499574546b99ec6c8e16f9";
14
sha256 = "1wx9nzq7cqyvpaq4j60bs8g7gh4jk8qg4016yi4c331l4iw1ymsa";
15
};
16
-
in {
17
# TODO modularize
18
-
imports = [ ./battery-low-timer.nix ./cal-alarms.nix ];
19
20
# Secrets used by home-manager modules
21
age.secrets.fastmail.file = "${self}/secrets/fastmail.age";
···
25
age.secrets.mossnet.owner = "anish";
26
27
# Taskwarrior private key
28
-
age.secrets.taskwarrior-private.file =
29
-
"${self}/secrets/taskwarrior-private.age";
30
age.secrets.taskwarrior-private.owner = "anish";
31
32
# We don't plug USBs into servers
···
38
39
dbus = {
40
enable = true;
41
-
packages = [ pkgs.dconf pkgs.gcr ];
42
};
43
};
44
programs.dconf.enable = true;
···
53
XDG_BIN_HOME = "\${HOME}/.local/bin";
54
XDG_DATA_HOME = "\${HOME}/.local/share";
55
56
-
PATH = [ "\${XDG_BIN_HOME}" ];
57
};
58
59
environment.systemPackages = with pkgs; [
60
-
#unstable.sublime-music
61
-
# olm-3.2.16 is now insecure
62
-
# some reason I can't set insecure packages that will be respected
63
-
nheko
64
-
unstable.signal-desktop
65
-
unstable.tuba
66
-
unstable.newsflash
67
-
unstable.liferea
68
-
unstable.gh
69
-
unstable.flyctl
70
-
unstable.sublime-music
71
72
kooha
73
light
···
100
yt-dlp
101
];
102
103
-
xdg.portal = {
104
# Breaks link clicking in nheko
105
# Portal doesn't seem to find Firefox as an acceptable app to open links?
106
-
enable = false;
107
-
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
108
-
xdgOpenUsePortal = false;
109
-
};
110
111
location.provider = "geoclue2";
112
services = {
···
119
};
120
displayManager.defaultSession = "none+bspwm";
121
xserver = {
122
-
enable = true;
123
-
# TODO should be xkb.layout
124
-
xkb.layout = "us";
125
-
# xkb.variant = "dvorak";
126
desktopManager.wallpaper.mode = "fill";
127
displayManager = {
128
-
# startx.enable = true;
129
sessionCommands = ''
130
${pkgs.xorg.xrdb}/bin/xrdb -merge <<EOF
131
#define blk #1F2430
···
146
#define bwht #CBCCC6
147
#define bg blk
148
#define fg wht
149
-
150
*.foreground: fg
151
*.background: bg
152
*.cursorColor: mag
153
-
154
*.color0: blk
155
*.color8: bblk
156
*.color1: red
···
167
*.color14: bcyn
168
*.color7: wht
169
*.color15: bwht
170
-
171
! greys
172
*.color234: #1E2029
173
*.color235: #282a36
···
192
EOF
193
'';
194
lightdm = {
195
-
enable = true;
196
background = "/etc/nixos/users/profiles/desktop/background.jpg";
197
greeters.mini = {
198
enable = true;
···
220
siji
221
font-awesome
222
proggyfonts
223
-
nerd-fonts.fira-code
224
-
nerd-fonts.droid-sans-mono
225
-
nerd-fonts.iosevka
226
];
227
}
···
1
{ self, config, pkgs, lib, ... }:
2
let
3
tex = (pkgs.texlive.combine {
4
+
inherit (pkgs.texlive) scheme-basic
5
+
dvisvgm dvipng# for preview and export as html
6
wrapfig amsmath ulem hyperref capt-of;
7
#(setq org-latex-compiler "lualatex")
8
#(setq org-preview-latex-default-process 'dvisvgm)
···
13
rev = "502f212d83bc67e8f0499574546b99ec6c8e16f9";
14
sha256 = "1wx9nzq7cqyvpaq4j60bs8g7gh4jk8qg4016yi4c331l4iw1ymsa";
15
};
16
+
in
17
+
{
18
# TODO modularize
19
+
imports = [
20
+
./battery-low-timer.nix
21
+
./cal-alarms.nix
22
+
];
23
24
# Secrets used by home-manager modules
25
age.secrets.fastmail.file = "${self}/secrets/fastmail.age";
···
29
age.secrets.mossnet.owner = "anish";
30
31
# Taskwarrior private key
32
+
age.secrets.taskwarrior-private.file = "${self}/secrets/taskwarrior-private.age";
33
age.secrets.taskwarrior-private.owner = "anish";
34
35
# We don't plug USBs into servers
···
41
42
dbus = {
43
enable = true;
44
+
packages = [ pkgs.dconf ];
45
};
46
};
47
programs.dconf.enable = true;
···
56
XDG_BIN_HOME = "\${HOME}/.local/bin";
57
XDG_DATA_HOME = "\${HOME}/.local/share";
58
59
+
PATH = [
60
+
"\${XDG_BIN_HOME}"
61
+
];
62
};
63
64
environment.systemPackages = with pkgs; [
65
+
sublime-music
66
+
# nheko
67
+
signal-desktop
68
+
tuba
69
+
newsflash
70
+
liferea
71
+
gh
72
+
flyctl
73
74
kooha
75
light
···
102
yt-dlp
103
];
104
105
+
# xdg.portal = {
106
# Breaks link clicking in nheko
107
# Portal doesn't seem to find Firefox as an acceptable app to open links?
108
+
# enable = false;
109
+
# extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
110
+
#xdgOpenUsePortal = false;
111
+
# };
112
113
location.provider = "geoclue2";
114
services = {
···
121
};
122
displayManager.defaultSession = "none+bspwm";
123
xserver = {
124
+
enable = false;
125
+
xkb.layout = "us,dvorak";
126
desktopManager.wallpaper.mode = "fill";
127
+
desktopManager.gnome.enable = true;
128
displayManager = {
129
+
# gdm.enable = true;
130
+
# defaultSession = "none+bspwm";
131
sessionCommands = ''
132
${pkgs.xorg.xrdb}/bin/xrdb -merge <<EOF
133
#define blk #1F2430
···
148
#define bwht #CBCCC6
149
#define bg blk
150
#define fg wht
151
+
152
*.foreground: fg
153
*.background: bg
154
*.cursorColor: mag
155
+
156
*.color0: blk
157
*.color8: bblk
158
*.color1: red
···
169
*.color14: bcyn
170
*.color7: wht
171
*.color15: bwht
172
+
173
! greys
174
*.color234: #1E2029
175
*.color235: #282a36
···
194
EOF
195
'';
196
lightdm = {
197
+
enable = false;
198
background = "/etc/nixos/users/profiles/desktop/background.jpg";
199
greeters.mini = {
200
enable = true;
···
222
siji
223
font-awesome
224
proggyfonts
225
+
# (nerdfonts.override { fonts = [ "FiraCode" "DroidSansMono" "Iosevka" ]; })
226
];
227
}
+13
-16
hosts/profiles/dns/default.nix
+13
-16
hosts/profiles/dns/default.nix
···
3
adblockLocalZones = pkgs.stdenv.mkDerivation {
4
name = "unbound-zones-adblock";
5
6
-
src = (pkgs.fetchFromGitHub {
7
-
owner = "StevenBlack";
8
-
repo = "hosts";
9
-
rev = "3.12.21";
10
-
sha256 = "Yzr6PY/zqQE+AHH0J6ioHTsgkikM+dz4aelbGpQJa1s=";
11
-
} + "/hosts");
12
13
phases = [ "installPhase" ];
14
···
18
};
19
20
mossnet = "192.168.1.240"; # The local lan-ip for box
21
-
wg-mossnet = "10.0.69.4"; # The wireguard ip for box
22
mossnet-hosts = [
23
"mossnet.lan"
24
"headphones.mossnet.lan"
···
39
"grasp.mossnet.lan"
40
"photos.mossnet.lan"
41
"pod.mossnet.lan"
42
-
"mast.mossnet.lan"
43
];
44
45
-
in {
46
services.unbound = {
47
enable = true;
48
settings = {
···
53
# private-address = "192.168.1.0/24";
54
cache-min-ttl = 0;
55
serve-expired = "yes";
56
-
interface = [ "0.0.0.0" "::" ];
57
-
access-control =
58
-
[ "127.0.0.0/8 allow" "192.168.1.0/24 allow" "10.0.69.0/24 allow" "::1 allow" "fd7d:587a:4300:1::/64 allow" ];
59
access-control-view = "10.0.69.0/24 wireguard";
60
# so-reuseport = "yes";
61
tls-upstream = "yes";
···
65
};
66
forward-zone = [{
67
name = ".";
68
-
forward-addr = [
69
-
"45.90.28.0#6939b9.dns.nextdns.io"
70
-
"1.1.1.1@853#cloudflare-dns.com"
71
-
];
72
# non-tls
73
# forward-addr = ["45.90.30.49" "45.90.28.49" "1.1.1.1" "8.8.8.8"]
74
}];
···
3
adblockLocalZones = pkgs.stdenv.mkDerivation {
4
name = "unbound-zones-adblock";
5
6
+
src = (pkgs.fetchFromGitHub
7
+
{
8
+
owner = "StevenBlack";
9
+
repo = "hosts";
10
+
rev = "3.12.21";
11
+
sha256 = "Yzr6PY/zqQE+AHH0J6ioHTsgkikM+dz4aelbGpQJa1s=";
12
+
} + "/hosts");
13
14
phases = [ "installPhase" ];
15
···
19
};
20
21
mossnet = "192.168.1.240"; # The local lan-ip for box
22
+
wg-mossnet = "10.0.69.4"; # The wireguard ip for box
23
mossnet-hosts = [
24
"mossnet.lan"
25
"headphones.mossnet.lan"
···
40
"grasp.mossnet.lan"
41
"photos.mossnet.lan"
42
"pod.mossnet.lan"
43
];
44
45
+
in
46
+
{
47
services.unbound = {
48
enable = true;
49
settings = {
···
54
# private-address = "192.168.1.0/24";
55
cache-min-ttl = 0;
56
serve-expired = "yes";
57
+
interface = [ "0.0.0.0" ];
58
+
access-control = [ "127.0.0.0/8 allow" "192.168.1.0/24 allow" "10.0.69.0/24 allow" ];
59
access-control-view = "10.0.69.0/24 wireguard";
60
# so-reuseport = "yes";
61
tls-upstream = "yes";
···
65
};
66
forward-zone = [{
67
name = ".";
68
+
forward-addr = [ "45.90.28.0#6939b9.dns.nextdns.io" "1.1.1.1@853#cloudflare-dns.com" ];
69
# non-tls
70
# forward-addr = ["45.90.30.49" "45.90.28.49" "1.1.1.1" "8.8.8.8"]
71
}];
-3
hosts/profiles/gonic/default.nix
-3
hosts/profiles/gonic/default.nix
···
1
{ config, lib, pkgs, ... }:
2
{
3
-
environment.systemPackages = [ pkgs.ffmpeg ];
4
mossnet.gonic.enable = true;
5
mossnet.gonic.settings = ''
6
music-path /mnt/two/music/
7
podcast-path /data/podcasts
8
cache-path /data/cache
9
playlists-path /data/playlists
10
-
transcode-cache-size 1000
11
-
transcode-eject-interval 1440
12
'';
13
mossnet.gonic.user = "gonic";
14
mossnet.gonic.group = "audio";
+1
hosts/profiles/headphones/default.nix
+1
hosts/profiles/headphones/default.nix
-30
hosts/profiles/immich/default.nix
-30
hosts/profiles/immich/default.nix
···
1
-
{ pkgs, config, ... }:
2
-
{
3
-
services.immich = {
4
-
enable = true;
5
-
database = {
6
-
enable = true;
7
-
};
8
-
host = "0.0.0.0";
9
-
port = 8567;
10
-
mediaLocation = "/mnt/two/photos";
11
-
openFirewall = true;
12
-
settings.server.externalDomain = "https://photos.sealight.xyz";
13
-
};
14
-
services.nginx.virtualHosts."photos.mossnet.lan" = {
15
-
enableACME = false;
16
-
forceSSL = false;
17
-
18
-
locations."/" = {
19
-
proxyPass = "http://127.0.0.1:${toString config.services.immich.port}";
20
-
proxyWebsockets = true;
21
-
recommendedProxySettings = true;
22
-
extraConfig = ''
23
-
client_max_body_size 50000M;
24
-
proxy_read_timeout 600s;
25
-
proxy_send_timeout 600s;
26
-
send_timeout 600s;
27
-
'';
28
-
};
29
-
};
30
-
}
···
-35
hosts/profiles/jacket/default.nix
-35
hosts/profiles/jacket/default.nix
···
1
-
{ config, lib, pkgs, ... }:
2
-
{
3
-
services.jackett = {
4
-
enable = true;
5
-
port = 8011;
6
-
user = "jackett";
7
-
group = "transmission";
8
-
package = pkgs.unstable.jackett;
9
-
};
10
-
services.nginx.virtualHosts."jackett.mossnet.lan" = {
11
-
enableACME = false;
12
-
forceSSL = false;
13
-
14
-
locations."/" = {
15
-
extraConfig = ''
16
-
proxy_pass http://127.0.0.1:8011/;
17
-
'';
18
-
};
19
-
};
20
-
services.lidarr = {
21
-
enable = true;
22
-
user = "headphones";
23
-
group = "audio";
24
-
};
25
-
services.nginx.virtualHosts."lidarr.mossnet.lan" = {
26
-
enableACME = false;
27
-
forceSSL = false;
28
-
29
-
locations."/" = {
30
-
extraConfig = ''
31
-
proxy_pass http://127.0.0.1:8686/;
32
-
'';
33
-
};
34
-
};
35
-
}
···
+2
-2
hosts/profiles/matrix/default.nix
+2
-2
hosts/profiles/matrix/default.nix
···
47
# The registration file is automatically generated after starting the appservice for the first time.
48
# cp /var/lib/matrix-appservice-discord/discord-registration.yaml /var/lib/matrix-synapse/
49
# chown matrix-synapse:matrix-synapse /var/lib/matrix-synapse/discord-registration.yaml
50
-
# "/var/lib/matrix-synapse/telegram-registration.yaml"
51
"/var/lib/matrix-synapse/signal-registration.yaml"
52
-
#"/var/lib/matrix-as-whatsapp/whatsapp-registration.yaml"
53
"/var/lib/matrix-as-discord/discord-registration.yaml"
54
# "/var/lib/matrix-synapse/slack-registration.yaml"
55
# "/var/lib/matrix-synapse/discord-registration.yaml"
···
47
# The registration file is automatically generated after starting the appservice for the first time.
48
# cp /var/lib/matrix-appservice-discord/discord-registration.yaml /var/lib/matrix-synapse/
49
# chown matrix-synapse:matrix-synapse /var/lib/matrix-synapse/discord-registration.yaml
50
+
"/var/lib/matrix-synapse/telegram-registration.yaml"
51
"/var/lib/matrix-synapse/signal-registration.yaml"
52
+
"/var/lib/matrix-as-whatsapp/whatsapp-registration.yaml"
53
"/var/lib/matrix-as-discord/discord-registration.yaml"
54
# "/var/lib/matrix-synapse/slack-registration.yaml"
55
# "/var/lib/matrix-synapse/discord-registration.yaml"
+33
-33
hosts/profiles/matrix/mautrix-services.nix
+33
-33
hosts/profiles/matrix/mautrix-services.nix
···
2
3
{
4
# Mautrix-signal settings
5
-
# services.signald.enable = true;
6
-
# systemd.services.matrix-as-signal = {
7
-
# requires = [ "signald.service" ];
8
-
# after = [ "signald.service" ];
9
-
# unitConfig = {
10
-
# JoinsNamespaceOf = "signald.service";
11
-
# };
12
-
# path = [
13
-
# pkgs.ffmpeg # voice messages need `ffmpeg`
14
-
# ];
15
-
# };
16
17
services.matrix-appservices = {
18
addRegistrationFiles = false;
19
homeserverURL = "https://sealight.xyz/";
20
homeserverDomain = "sealight.xyz";
21
services = {
22
-
# whatsapp = {
23
-
# port = 29183;
24
-
# format = "mautrix-go";
25
-
# package = pkgs.mautrix-whatsapp;
26
-
# };
27
28
discord = {
29
port = 29188;
30
format = "mautrix-go";
31
-
package = pkgs.mautrix-discord;
32
};
33
34
-
# signal = {
35
-
# port = 29184;
36
-
# format = "mautrix-python";
37
-
# package = pkgs.mautrix-signal;
38
-
# serviceConfig = {
39
-
# # StateDirectory = [ "matrix-as-signal" "signald" ];
40
-
# # SupplementaryGroups = [ "signald" ];
41
-
# TimeoutStopSec = 1; # work around the service ignoring SIGTERM, see https://gitlab.com/coffeetables/nix-matrix-appservices/-/issues/12
42
-
# # User = lib.mkForce config.services.signald.user;
43
-
# # Group = lib.mkForce config.services.signald.group;
44
-
# };
45
-
# # settings.signal = {
46
-
# # socket_path = config.services.signald.socketPath;
47
-
# # outgoing_attachment_dir = "/var/lib/signald/tmp";
48
-
# # };
49
-
# };
50
};
51
};
52
}
···
2
3
{
4
# Mautrix-signal settings
5
+
services.signald.enable = true;
6
+
systemd.services.matrix-as-signal = {
7
+
requires = [ "signald.service" ];
8
+
after = [ "signald.service" ];
9
+
unitConfig = {
10
+
JoinsNamespaceOf = "signald.service";
11
+
};
12
+
path = [
13
+
pkgs.ffmpeg # voice messages need `ffmpeg`
14
+
];
15
+
};
16
17
services.matrix-appservices = {
18
addRegistrationFiles = false;
19
homeserverURL = "https://sealight.xyz/";
20
homeserverDomain = "sealight.xyz";
21
services = {
22
+
whatsapp = {
23
+
port = 29183;
24
+
format = "mautrix-go";
25
+
package = pkgs.mautrix-whatsapp;
26
+
};
27
28
discord = {
29
port = 29188;
30
format = "mautrix-go";
31
+
package = pkgs.my-mautrix-discord;
32
};
33
34
+
signal = {
35
+
port = 29184;
36
+
format = "mautrix-python";
37
+
package = pkgs.unstable.mautrix-signal;
38
+
serviceConfig = {
39
+
StateDirectory = [ "matrix-as-signal" "signald" ];
40
+
SupplementaryGroups = [ "signald" ];
41
+
TimeoutStopSec = 1; # work around the service ignoring SIGTERM, see https://gitlab.com/coffeetables/nix-matrix-appservices/-/issues/12
42
+
User = lib.mkForce config.services.signald.user;
43
+
Group = lib.mkForce config.services.signald.group;
44
+
};
45
+
settings.signal = {
46
+
socket_path = config.services.signald.socketPath;
47
+
outgoing_attachment_dir = "/var/lib/signald/tmp";
48
+
};
49
+
};
50
};
51
};
52
}
+3
-4
hosts/profiles/music/default.nix
+3
-4
hosts/profiles/music/default.nix
···
12
# Plugins
13
helm
14
# surge
15
-
# distrho
16
orca-c
17
supercollider
18
dirt
···
22
bespokesynth
23
lsp-plugins
24
helio-workstation
25
-
# projectm # milkdrop visualizer
26
-
# i think it's projectm-sdl-cpp now
27
28
# DAWs
29
# ardour
···
31
# renoise
32
];
33
34
-
services.pulseaudio.enable = false;
35
security.rtkit.enable = false;
36
37
services.pipewire = {
···
12
# Plugins
13
helm
14
# surge
15
+
distrho
16
orca-c
17
supercollider
18
dirt
···
22
bespokesynth
23
lsp-plugins
24
helio-workstation
25
+
projectm # milkdrop visualizer
26
27
# DAWs
28
# ardour
···
30
# renoise
31
];
32
33
+
hardware.pulseaudio.enable = lib.mkForce false;
34
security.rtkit.enable = false;
35
36
services.pipewire = {
-1
hosts/profiles/radicale/default.nix
-1
hosts/profiles/radicale/default.nix
+2
-5
hosts/profiles/sync/music/default.nix
+2
-5
hosts/profiles/sync/music/default.nix
···
5
serviceConfig.Type = "oneshot";
6
path = [
7
pkgs.coreutils
8
-
pkgs.openssh
9
-
pkgs.gawk
10
pkgs.rsync
11
-
pkgs.beets
12
];
13
script = builtins.readFile ./get-music.sh;
14
serviceConfig = {
15
User = "anish";
16
};
17
};
18
-
systemd.timers.get-music-sync = {
19
wantedBy = [ "timers.target" ];
20
partOf = [ "get-music-sync.service" ];
21
-
timerConfig.OnCalendar = [ "hourly" ];
22
};
23
}
···
5
serviceConfig.Type = "oneshot";
6
path = [
7
pkgs.coreutils
8
pkgs.rsync
9
];
10
script = builtins.readFile ./get-music.sh;
11
serviceConfig = {
12
User = "anish";
13
};
14
};
15
+
systemd.timers.get-music-timer = {
16
wantedBy = [ "timers.target" ];
17
partOf = [ "get-music-sync.service" ];
18
+
timerConfig.OnCalendar = [ "daily" ];
19
};
20
}
+6
-58
hosts/profiles/sync/music/get-music.sh
+6
-58
hosts/profiles/sync/music/get-music.sh
···
1
#!/usr/bin/env bash
2
-
3
-
set -euo pipefail
4
-
5
-
REMOTE_HOST="aynish@talos.feralhosting.com"
6
-
REMOTE_PATH="private/transmission/data/"
7
-
LOCAL_PATH="/mnt/two/incoming"
8
-
TRACKING_FILE="/mnt/two/incoming/.downloaded_albums"
9
-
LOG_FILE="/mnt/two/incoming/download-log"
10
-
11
-
# Create tracking file if it doesn't exist
12
-
touch "$TRACKING_FILE"
13
-
14
-
# Get list of albums on remote server
15
-
echo "$(date): Checking for new albums on seedbox..." >>"$LOG_FILE"
16
-
REMOTE_ALBUMS=$(rsync --dry-run --list-only "$REMOTE_HOST:$REMOTE_PATH" | grep '^d' | awk '{$1=$2=$3=$4=""; sub(/^ +/, ""); print}' | grep -v '^\.') || true
17
-
18
-
if [ -z "$REMOTE_ALBUMS" ]; then
19
-
echo "$(date): No albums found on remote server" >>"$LOG_FILE"
20
-
exit 0
21
-
fi
22
-
23
-
# Check each album against tracking file
24
-
NEW_ALBUMS=""
25
-
while IFS= read -r album; do
26
-
if [ -n "$album" ] && ! grep -qF "$album" "$TRACKING_FILE"; then
27
-
NEW_ALBUMS="$NEW_ALBUMS$album\n"
28
-
echo "$(date): Found new album: $album" >>"$LOG_FILE"
29
-
fi
30
-
done <<<"$REMOTE_ALBUMS"
31
-
32
-
if [ -z "$NEW_ALBUMS" ]; then
33
-
echo "$(date): No new albums to download" >>"$LOG_FILE"
34
-
exit 0
35
-
fi
36
-
37
-
# Download new albums only
38
-
echo "$(date): Starting download of new albums..." >>"$LOG_FILE"
39
-
while IFS= read -r album; do
40
-
if [ -n "$album" ]; then
41
-
echo "$(date): Downloading $album" >>"$LOG_FILE"
42
-
if rsync -r --log-file="$LOG_FILE" "$REMOTE_HOST:$REMOTE_PATH$album/" "$LOCAL_PATH/$album/"; then
43
-
echo "$album" >>"$TRACKING_FILE"
44
-
echo "$(date): Successfully downloaded $album" >>"$LOG_FILE"
45
46
-
# Import to beets
47
-
echo "$(date): Importing $album to beets..." >>"$LOG_FILE"
48
-
# Set umask to allow group read/write access
49
-
umask 002
50
-
if beet -p fetchart import -m -l /home/anish/music.log -q -g "$LOCAL_PATH/$album"; then
51
-
echo "$(date): Successfully imported $album to beets" >>"$LOG_FILE"
52
-
else
53
-
echo "$(date): Failed to import $album to beets" >>"$LOG_FILE"
54
-
fi
55
-
else
56
-
echo "$(date): Failed to download $album" >>"$LOG_FILE"
57
-
fi
58
-
fi
59
-
done <<<"$(echo -e "$NEW_ALBUMS")"
60
61
-
echo "$(date): Music sync completed" >>"$LOG_FILE"
···
1
#!/usr/bin/env bash
2
+
rsync -r --ignore-existing --log-file=/data/incoming/download-log hypercube@talos.feralhosting.com:private/transmission/data/* /data/incoming
3
4
+
# you need to set defaults for beets
5
+
# if already imported -> Skip
6
+
# Auto accept changes
7
+
# also install it lmao
8
+
#beet import /data/incoming
9
-3
hosts/profiles/transmission/beet-import.sh
-3
hosts/profiles/transmission/beet-import.sh
-33
hosts/profiles/transmission/default.nix
-33
hosts/profiles/transmission/default.nix
···
1
-
{ pkgs, ... }:
2
-
{
3
-
environment.systemPackages = [ pkgs.beets ];
4
-
services.transmission = {
5
-
enable = true;
6
-
settings = {
7
-
rpc-enabled = true;
8
-
rpc-bind-address = "0.0.0.0";
9
-
rpc-whitelist-enabled = false;
10
-
script-torrent-done-enabled = true;
11
-
# Normally, I would write this into the homedir with home-manager
12
-
# And explictly set the dir to be the output of the home-manager location
13
-
script-torrent-done-filename = pkgs.writeShellScript "beet-import.sh" ''
14
-
#!/usr/bin/env bash
15
-
16
-
beet -p fetchart import -l /home/anish/music.log -q -g "$TR_TORRENT_DIR"
17
-
'';
18
-
rpc-url = "/transmission/rpc/";
19
-
download-dir = "/mnt/two/new-music";
20
-
};
21
-
};
22
-
services.nginx.virtualHosts."transmission.mossnet.lan" = {
23
-
enableACME = false;
24
-
forceSSL = false;
25
-
26
-
locations."/" = {
27
-
extraConfig = ''
28
-
proxy_pass http://localhost:9091/;
29
-
proxy_set_header X-Forwarded-Host $host;
30
-
'';
31
-
};
32
-
};
33
-
}
···
+12
modules/darwin/README.md
+12
modules/darwin/README.md
···
···
1
+
2
+
## Layout
3
+
```
4
+
.
5
+
โโโ dock # MacOS dock configuration
6
+
โโโ casks.nix # List of homebrew casks
7
+
โโโ default.nix # Defines module, system-level config
8
+
โโโ files.nix # Non-Nix, static configuration files (now immutable!)
9
+
โโโ home-manager.nix # Defines user programs
10
+
โโโ packages.nix # List of packages to install for MacOS
11
+
โโโ secrets.nix # Age-encrypted secrets with agenix
12
+
```
+67
modules/darwin/dock/default.nix
+67
modules/darwin/dock/default.nix
···
···
1
+
{ config, pkgs, lib, ... }:
2
+
with lib;
3
+
let
4
+
cfg = config.local.dock;
5
+
inherit (pkgs) stdenv dockutil;
6
+
in
7
+
{
8
+
options = {
9
+
local.dock.enable = mkOption {
10
+
description = "Enable dock";
11
+
default = stdenv.isDarwin;
12
+
example = false;
13
+
};
14
+
15
+
local.dock.entries = mkOption
16
+
{
17
+
description = "Entries on the Dock";
18
+
type = with types; listOf (submodule {
19
+
options = {
20
+
path = lib.mkOption { type = str; };
21
+
section = lib.mkOption {
22
+
type = str;
23
+
default = "apps";
24
+
};
25
+
options = lib.mkOption {
26
+
type = str;
27
+
default = "";
28
+
};
29
+
};
30
+
});
31
+
readOnly = true;
32
+
};
33
+
};
34
+
35
+
config =
36
+
mkIf cfg.enable
37
+
(
38
+
let
39
+
normalize = path: if hasSuffix ".app" path then path + "/" else path;
40
+
entryURI = path: "file://" + (builtins.replaceStrings
41
+
[" " "!" "\"" "#" "$" "%" "&" "'" "(" ")"]
42
+
["%20" "%21" "%22" "%23" "%24" "%25" "%26" "%27" "%28" "%29"]
43
+
(normalize path)
44
+
);
45
+
wantURIs = concatMapStrings
46
+
(entry: "${entryURI entry.path}\n")
47
+
cfg.entries;
48
+
createEntries = concatMapStrings
49
+
(entry: "${dockutil}/bin/dockutil --no-restart --add '${entry.path}' --section ${entry.section} ${entry.options}\n")
50
+
cfg.entries;
51
+
in
52
+
{
53
+
system.activationScripts.postUserActivation.text = ''
54
+
echo >&2 "Setting up the Dock..."
55
+
haveURIs="$(${dockutil}/bin/dockutil --list | ${pkgs.coreutils}/bin/cut -f2)"
56
+
if ! diff -wu <(echo -n "$haveURIs") <(echo -n '${wantURIs}') >&2 ; then
57
+
echo >&2 "Resetting Dock."
58
+
${dockutil}/bin/dockutil --no-restart --remove all
59
+
${createEntries}
60
+
killall Dock
61
+
else
62
+
echo >&2 "Dock setup complete."
63
+
fi
64
+
'';
65
+
}
66
+
);
67
+
}
+54
modules/darwin/files.nix
+54
modules/darwin/files.nix
···
···
1
+
{ user, config, pkgs, ... }:
2
+
3
+
let
4
+
xdg_configHome = "${config.users.users.${user}.home}/.config";
5
+
xdg_dataHome = "${config.users.users.${user}.home}/.local/share";
6
+
xdg_stateHome = "${config.users.users.${user}.home}/.local/state"; in
7
+
{
8
+
9
+
# Raycast script so that "Run Emacs" is available and uses Emacs daemon
10
+
"${xdg_dataHome}/bin/emacsclient" = {
11
+
executable = true;
12
+
text = ''
13
+
#!/bin/zsh
14
+
#
15
+
# Required parameters:
16
+
# @raycast.schemaVersion 1
17
+
# @raycast.title Run Emacs
18
+
# @raycast.mode silent
19
+
#
20
+
# Optional parameters:
21
+
# @raycast.packageName Emacs
22
+
# @raycast.icon ${xdg_dataHome}/img/icons/Emacs.icns
23
+
# @raycast.iconDark ${xdg_dataHome}/img/icons/Emacs.icns
24
+
25
+
if [[ $1 = "-t" ]]; then
26
+
# Terminal mode
27
+
${pkgs.emacs}/bin/emacsclient -t $@
28
+
else
29
+
# GUI mode
30
+
${pkgs.emacs}/bin/emacsclient -c -n $@
31
+
fi
32
+
'';
33
+
};
34
+
35
+
# Script to import Drafts into Emacs org-roam
36
+
"${xdg_dataHome}/bin/import-drafts" = {
37
+
executable = true;
38
+
text = ''
39
+
#!/bin/sh
40
+
41
+
for f in ${xdg_stateHome}/drafts/*
42
+
do
43
+
if [[ ! "$f" =~ "done" ]]; then
44
+
echo "Importing $f"
45
+
filename="$(head -c 10 $f)"
46
+
output="${xdg_dataHome}/org-roam/daily/$filename.org"
47
+
echo '\n' >> "$output"
48
+
tail -n +3 $f >> "$output"
49
+
mv $f done
50
+
fi
51
+
done
52
+
'';
53
+
};
54
+
}
+85
modules/darwin/home-manager.nix
+85
modules/darwin/home-manager.nix
···
···
1
+
{ config, pkgs, lib, home-manager, ... }:
2
+
3
+
let
4
+
user = "anishlakhwara";
5
+
# Define the content of your file as a derivation
6
+
myEmacsLauncher = pkgs.writeScript "emacs-launcher.command" ''
7
+
#!/bin/sh
8
+
emacsclient -c -n &
9
+
'';
10
+
sharedFiles = import ../shared/files.nix { inherit config pkgs; };
11
+
additionalFiles = import ./files.nix { inherit user config pkgs; };
12
+
in
13
+
{
14
+
imports = [
15
+
./dock
16
+
];
17
+
18
+
# It me
19
+
users.users.${user} = {
20
+
name = "${user}";
21
+
home = "/Users/${user}";
22
+
isHidden = false;
23
+
shell = pkgs.zsh;
24
+
};
25
+
26
+
# Enable home-manager
27
+
home-manager = {
28
+
useGlobalPkgs = true;
29
+
users.${user} = { pkgs, config, lib, ... }:{
30
+
home = {
31
+
enableNixpkgsReleaseCheck = false;
32
+
packages = pkgs.callPackage ./packages.nix {};
33
+
file = lib.mkMerge [
34
+
sharedFiles
35
+
additionalFiles
36
+
{ "emacs-launcher.command".source = myEmacsLauncher; }
37
+
];
38
+
39
+
stateVersion = "23.11";
40
+
};
41
+
42
+
programs = {} // import ../shared/home-manager.nix { inherit config pkgs lib; };
43
+
44
+
# Marked broken Oct 20, 2022 check later to remove this
45
+
# https://github.com/nix-community/home-manager/issues/3344
46
+
manual.manpages.enable = false;
47
+
};
48
+
};
49
+
50
+
# Fully declarative dock using the latest from Nix Store
51
+
local = {
52
+
dock.enable = true;
53
+
dock.entries = [
54
+
{ path = "/Applications/Slack.app/"; }
55
+
{ path = "/System/Applications/Messages.app/"; }
56
+
{ path = "/System/Applications/Facetime.app/"; }
57
+
{ path = "/Applications/Telegram.app/"; }
58
+
{ path = "${pkgs.alacritty}/Applications/Alacritty.app/"; }
59
+
{ path = "/System/Applications/Music.app/"; }
60
+
{ path = "/System/Applications/News.app/"; }
61
+
{ path = "/System/Applications/Photos.app/"; }
62
+
{ path = "/System/Applications/Photo Booth.app/"; }
63
+
{ path = "/System/Applications/TV.app/"; }
64
+
{ path = "${pkgs.jetbrains.phpstorm}/Applications/PhpStorm.app/"; }
65
+
{ path = "/Applications/TablePlus.app/"; }
66
+
{ path = "/Applications/Asana.app/"; }
67
+
{ path = "/Applications/Drafts.app/"; }
68
+
{ path = "/System/Applications/Home.app/"; }
69
+
{
70
+
path = toString myEmacsLauncher;
71
+
section = "others";
72
+
}
73
+
{
74
+
path = "${config.users.users.${user}.home}/.local/share/";
75
+
section = "others";
76
+
options = "--sort name --view grid --display folder";
77
+
}
78
+
{
79
+
path = "${config.users.users.${user}.home}/.local/share/downloads";
80
+
section = "others";
81
+
options = "--sort name --view grid --display stack";
82
+
}
83
+
];
84
+
};
85
+
}
+7
modules/darwin/packages.nix
+7
modules/darwin/packages.nix
+47
modules/darwin/secrets.nix
+47
modules/darwin/secrets.nix
···
···
1
+
{ config, pkgs, agenix, secrets, ... }:
2
+
3
+
let user = "dustin"; in
4
+
{
5
+
age = {
6
+
identityPaths = [
7
+
"/Users/${user}/.ssh/id_ed25519"
8
+
];
9
+
10
+
secrets = {
11
+
"syncthing-cert" = {
12
+
symlink = true;
13
+
path = "/Users/${user}/Library/Application Support/Syncthing/cert.pem";
14
+
file = "${secrets}/darwin-syncthing-cert.age";
15
+
mode = "644";
16
+
owner = "${user}";
17
+
group = "staff";
18
+
};
19
+
20
+
"syncthing-key" = {
21
+
symlink = true;
22
+
path = "/Users/${user}/Library/Application Support/Syncthing/key.pem";
23
+
file = "${secrets}/darwin-syncthing-key.age";
24
+
mode = "600";
25
+
owner = "${user}";
26
+
group = "staff";
27
+
};
28
+
29
+
"github-ssh-key" = {
30
+
symlink = true;
31
+
path = "/Users/${user}/.ssh/id_github";
32
+
file = "${secrets}/github-ssh-key.age";
33
+
mode = "600";
34
+
owner = "${user}";
35
+
group = "staff";
36
+
};
37
+
38
+
"github-signing-key" = {
39
+
symlink = false;
40
+
path = "/Users/${user}/.ssh/pgp_github.key";
41
+
file = "${secrets}/github-signing-key.age";
42
+
mode = "600";
43
+
owner = "${user}";
44
+
};
45
+
};
46
+
};
47
+
}
+1
-1
modules/nixos/gonic.nix
+1
-1
modules/nixos/gonic.nix
+1
-18
overlays/default.nix
+1
-18
overlays/default.nix
···
11
propagatedBuildInputs = prevAttrs.propagatedBuildInputs ++ [ final.python3.pkgs.jsonschema ]; # allow kobo sync stuff
12
});
13
mautrix-signal = prev.mautrix-signal.overrideAttrs (prevAttrs: rec {
14
-
buildInputs = prevAttrs.buildInputs ++ [ final.python3.pkgs.aiosqlite ]; # We're using sqlite and upstream doesn't package this dependency
15
-
withGoolm = true;
16
-
});
17
-
# headphones is not very stable...
18
-
# this is fixed in newer commits, but no release has gone out
19
-
# patching whitespace with sed is insane
20
-
headphones = prev.headphones.overrideAttrs (prevAttrs: rec {
21
-
patchPhase = ''
22
-
sed -i '1395s/^\([[:space:]]*\).*/\1"cat": "3000",/' headphones/searcher.py
23
-
'';
24
});
25
26
wallabag = prev.wallabag.overrideAttrs (attrs: {
···
30
# so that the project source can remain immutable.
31
../pkgs/wallabag-data.patch
32
];
33
-
});
34
-
35
-
olm = prev.olm.overrideAttrs (attrs: {
36
-
knownVulnerabilities = [];
37
-
});
38
-
39
-
mautrix-discord = prev.mautrix-discord.overrideAttrs (attrs: rec {
40
-
license = "";
41
});
42
43
# Need to do server and agent too, maybe
···
11
propagatedBuildInputs = prevAttrs.propagatedBuildInputs ++ [ final.python3.pkgs.jsonschema ]; # allow kobo sync stuff
12
});
13
mautrix-signal = prev.mautrix-signal.overrideAttrs (prevAttrs: rec {
14
+
buildInputs = prevAttrs.propagatedBuildInputs ++ [ final.python3.pkgs.aiosqlite ]; # We're using sqlite and upstream doesn't package this dependency
15
});
16
17
wallabag = prev.wallabag.overrideAttrs (attrs: {
···
21
# so that the project source can remain immutable.
22
../pkgs/wallabag-data.patch
23
];
24
});
25
26
# Need to do server and agent too, maybe
+2
-2
pkgs/default.nix
+2
-2
pkgs/default.nix
···
6
tic-80 = pkgs.callPackage ./tic-80.nix { };
7
fennel-ls = pkgs.callPackage ./fennel-ls.nix { };
8
# kobopatch = pkgs.callPackage ./kobopatch.nix { };
9
-
# my-mautrix-discord = pkgs.callPackage ./mautrix-discord.nix { }; # Handled by matrix-appservices input
10
ulogger-server = pkgs.callPackage ./ulogger.nix { };
11
# Wallabag is now an overlay
12
# TODO: we still use the patch from this folder though
13
my-wallabag = pkgs.callPackage ./wallabag.nix { };
14
-
# mautrix-slack = pkgs.callPackage ./mautrix-slack.nix { };
15
gpodder2go = pkgs.callPackage ./gpodder2go.nix { };
16
}
···
6
tic-80 = pkgs.callPackage ./tic-80.nix { };
7
fennel-ls = pkgs.callPackage ./fennel-ls.nix { };
8
# kobopatch = pkgs.callPackage ./kobopatch.nix { };
9
+
my-mautrix-discord = pkgs.callPackage ./mautrix-discord.nix { }; # Handled by matrix-appservices input
10
ulogger-server = pkgs.callPackage ./ulogger.nix { };
11
# Wallabag is now an overlay
12
# TODO: we still use the patch from this folder though
13
my-wallabag = pkgs.callPackage ./wallabag.nix { };
14
+
mautrix-slack = pkgs.callPackage ./mautrix-slack.nix { };
15
gpodder2go = pkgs.callPackage ./gpodder2go.nix { };
16
}
+29
pkgs/mautrix-discord.nix
+29
pkgs/mautrix-discord.nix
···
···
1
+
{ lib, buildGoModule, fetchFromGitHub, olm }:
2
+
3
+
buildGoModule rec {
4
+
pname = "mautrix-discord";
5
+
version = "unstable-2022-11-04";
6
+
7
+
src = fetchFromGitHub {
8
+
owner = "mautrix";
9
+
repo = "discord";
10
+
rev = "f53975cc91e3c643a722adf0d3e0dfb98d0127a2";
11
+
hash = "sha256-xUALcN5oQfwC6gmOeygCkOAXJrJzNitBxHRFAKKgFvE=";
12
+
};
13
+
14
+
buildInputs = [ olm ];
15
+
16
+
vendorHash = "sha256-yday2mSnPwuhXWkCG4XY7qoBl3DXHcSvzBoZbjgYz/c=";
17
+
18
+
ldflags = [ "-s" "-w" ]; # https://github.com/NixOS/nixpkgs/issues/177698
19
+
20
+
doCheck = false; # No tests available
21
+
22
+
meta = with lib; {
23
+
homepage = "https://go.mau.fi/mautrix-discord";
24
+
description = "Matrix to Discord hybrid puppeting/relaybot bridge";
25
+
license = licenses.agpl3Plus;
26
+
maintainers = with maintainers; [ robin ];
27
+
};
28
+
}
29
+
+1
-1
pkgs/tic-80.nix
+1
-1
pkgs/tic-80.nix
+3
secrets/secrets.nix
+3
secrets/secrets.nix
···
6
lituus = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH2lAb33LH3JNuOfBXt971u0tHe+NURFecQdfjwEj+C+ root@lituus";
7
helix = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAKrL6IDHNnHmxi0q9nzu87NOyidPm3HpE7klU368lEf root@helix";
8
helix2 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK2G81z1E51ioJQGLHnTJEjgSdBqLM6mb72Z+0atE6Bf root@helix";
9
curve = [ system user ];
10
allUserKeys = [ system user mossnet ];
11
systemOnly = [ system mossnet lituus helix ];
···
34
"box-wg.age".publicKeys = [ mossnet ];
35
"wallabag-password.age".publicKeys = [ mossnet ];
36
"wallabag-secret.age".publicKeys = [ mossnet ];
37
}
···
6
lituus = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH2lAb33LH3JNuOfBXt971u0tHe+NURFecQdfjwEj+C+ root@lituus";
7
helix = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAKrL6IDHNnHmxi0q9nzu87NOyidPm3HpE7klU368lEf root@helix";
8
helix2 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK2G81z1E51ioJQGLHnTJEjgSdBqLM6mb72Z+0atE6Bf root@helix";
9
+
work = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHOnfDvR2D2nGnC+DZYDUXiokzz+eLfZwkp+O8WjWutp anishlakhwara@Anishs-MacBook-Pro.local";
10
curve = [ system user ];
11
allUserKeys = [ system user mossnet ];
12
systemOnly = [ system mossnet lituus helix ];
···
35
"box-wg.age".publicKeys = [ mossnet ];
36
"wallabag-password.age".publicKeys = [ mossnet ];
37
"wallabag-secret.age".publicKeys = [ mossnet ];
38
+
39
+
"work-wg.age".publicKeys = [ work user system ];
40
}
secrets/work-wg.age
secrets/work-wg.age
This is a binary file and will not be displayed.
+9
-1
shell.nix
+9
-1
shell.nix
···
5
default = pkgs.mkShell {
6
# Enable experimental features without having to specify the argument
7
NIX_CONFIG = "experimental-features = nix-command flakes";
8
+
nativeBuildInputs = with pkgs; [
9
+
nix
10
+
home-manager
11
+
git
12
+
agenix
13
+
deploy-rs
14
+
dnscontrol
15
+
git-bug
16
+
];
17
};
18
}