Compare commits
12 Commits
CIFS-and-S
...
main
Author | SHA1 | Date | |
---|---|---|---|
|
4fc3ecf3b8 | ||
|
e902d172d2 | ||
|
372e15742d | ||
|
00db155874 | ||
|
a79999d465 | ||
61dc01881b | |||
22c8e5bb76 | |||
9d8774d8c2 | |||
f2d2b36356 | |||
|
8467795708 | ||
|
f8df758e3c | ||
548b3ad02a |
2
.gitignore
vendored
2
.gitignore
vendored
@ -2,4 +2,6 @@ README.md~
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
result
|
result
|
||||||
dump.txt
|
dump.txt
|
||||||
|
flake.lock
|
||||||
*~
|
*~
|
||||||
|
|
||||||
|
@ -5,9 +5,8 @@ Started with a configuration generated from [this nixos config template](https:/
|
|||||||
|
|
||||||
Installed nix with `--nix-build-group-id 30000`
|
Installed nix with `--nix-build-group-id 30000`
|
||||||
|
|
||||||
Created the full verion with secret-management:
|
Initialy created 'with secrets' but stripped out the git/agenix in favor of sops
|
||||||
|
|
||||||
```
|
```
|
||||||
mkdir -p nixos-config && cd nixos-config && nix flake --extra-experimental-features 'nix-command flakes' init -t github:dustinlyons/nixos-config#starter-with-secrets
|
mkdir -p nixos-config && cd nixos-config && nix flake --extra-experimental-features 'nix-command flakes' init -t github:dustinlyons/nixos-config#starter-with-secrets
|
||||||
|
|
||||||
```
|
```
|
@ -1,5 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
VERSION=1.0
|
||||||
|
|
||||||
|
# Color codes
|
||||||
RED='\033[0;31m'
|
RED='\033[0;31m'
|
||||||
GREEN='\033[0;32m'
|
GREEN='\033[0;32m'
|
||||||
YELLOW='\033[1;33m'
|
YELLOW='\033[1;33m'
|
||||||
@ -32,69 +35,6 @@ _prompt() {
|
|||||||
read -r $variable
|
read -r $variable
|
||||||
}
|
}
|
||||||
|
|
||||||
insert_secrets_output() {
|
|
||||||
local pattern="outputs = { self, darwin, nix-homebrew, homebrew-bundle, homebrew-core, homebrew-cask, home-manager, nixpkgs, disko, agenix } @inputs:"
|
|
||||||
local insert_text="secrets "
|
|
||||||
|
|
||||||
awk -v pat="$pattern" -v insert="$insert_text" '
|
|
||||||
$0 ~ pat {
|
|
||||||
sub(/} @inputs:/, ", " insert "} @inputs:"); # Replace the closing brace with the insert text followed by the brace
|
|
||||||
gsub(/ ,/, ","); # Correct any spaces before commas
|
|
||||||
print
|
|
||||||
next
|
|
||||||
}
|
|
||||||
{ print }
|
|
||||||
' flake.nix > flake.nix.tmp
|
|
||||||
|
|
||||||
mv flake.nix.tmp flake.nix
|
|
||||||
}
|
|
||||||
|
|
||||||
insert_secrets_input() {
|
|
||||||
# Define file path
|
|
||||||
FILE_PATH="flake.nix"
|
|
||||||
|
|
||||||
# Backup the original file
|
|
||||||
cp "$FILE_PATH" "${FILE_PATH}.bak"
|
|
||||||
|
|
||||||
# Temporary file for the text to insert
|
|
||||||
TEMP_FILE="temp_insert.txt"
|
|
||||||
|
|
||||||
# Write the formatted text to the temporary file
|
|
||||||
cat > "$TEMP_FILE" << 'EOF'
|
|
||||||
secrets = {
|
|
||||||
url = "git+ssh://git@github.com/%GITHUB_USER%/%GITHUB_SECRETS_REPO%.git";
|
|
||||||
flake = false;
|
|
||||||
};
|
|
||||||
EOF
|
|
||||||
|
|
||||||
# Check if the 'secrets' block already exists
|
|
||||||
if grep -q 'url = "git+ssh://git@github.com/%GITHUB_USER%/%GITHUB_SECRETS_REPO%.git"' "$FILE_PATH"; then
|
|
||||||
echo "The 'secrets' block already exists in the file."
|
|
||||||
rm "$TEMP_FILE"
|
|
||||||
rm "${FILE_PATH}.bak"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Find the start and end line numbers of the 'disko' block
|
|
||||||
START_LINE=$(grep -n 'disko = {' "$FILE_PATH" | head -n 1 | cut -d: -f1)
|
|
||||||
END_LINE=$(tail -n +$START_LINE "$FILE_PATH" | grep -n '};' | head -n 1 | cut -d: -f1)
|
|
||||||
END_LINE=$((START_LINE + END_LINE - 1))
|
|
||||||
|
|
||||||
# Create a new file with the insertion
|
|
||||||
{
|
|
||||||
sed -n "1,${END_LINE}p" "$FILE_PATH"
|
|
||||||
cat "$TEMP_FILE"
|
|
||||||
sed -n "$((END_LINE + 1)),\$p" "$FILE_PATH"
|
|
||||||
} > "${FILE_PATH}.new"
|
|
||||||
|
|
||||||
# Replace the original file with the new file
|
|
||||||
mv "${FILE_PATH}.new" "$FILE_PATH"
|
|
||||||
|
|
||||||
# Clean up the temporary files
|
|
||||||
rm "$TEMP_FILE"
|
|
||||||
rm "${FILE_PATH}.bak"
|
|
||||||
}
|
|
||||||
|
|
||||||
ask_for_star() {
|
ask_for_star() {
|
||||||
_print "${YELLOW}Would you like to support my work by starring my GitHub repo? yes/no [yes]: ${NC}"
|
_print "${YELLOW}Would you like to support my work by starring my GitHub repo? yes/no [yes]: ${NC}"
|
||||||
local response
|
local response
|
||||||
@ -138,12 +78,6 @@ if [[ -z "$GIT_NAME" ]]; then
|
|||||||
_prompt "${YELLOW}Please enter your name: ${NC}" GIT_NAME
|
_prompt "${YELLOW}Please enter your name: ${NC}" GIT_NAME
|
||||||
fi
|
fi
|
||||||
|
|
||||||
_prompt "${YELLOW}Please enter your Github username: ${NC}" GITHUB_USER
|
|
||||||
_prompt "${YELLOW}Please enter your Github secrets repository name: ${NC}" GITHUB_SECRETS_REPO
|
|
||||||
|
|
||||||
export GITHUB_USER
|
|
||||||
export GITHUB_SECRETS_REPO
|
|
||||||
|
|
||||||
select_boot_disk() {
|
select_boot_disk() {
|
||||||
local disks
|
local disks
|
||||||
local _boot_disk
|
local _boot_disk
|
||||||
@ -174,7 +108,6 @@ if [[ "$OS" != "Darwin" ]]; then
|
|||||||
select_boot_disk
|
select_boot_disk
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Confirmation step
|
|
||||||
confirm_details() {
|
confirm_details() {
|
||||||
_print "${GREEN}Username: $USERNAME"
|
_print "${GREEN}Username: $USERNAME"
|
||||||
_print "Email: $GIT_EMAIL"
|
_print "Email: $GIT_EMAIL"
|
||||||
@ -186,8 +119,6 @@ confirm_details() {
|
|||||||
_print "Hostname: $HOST_NAME${NC}"
|
_print "Hostname: $HOST_NAME${NC}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
_print "${GREEN}Secrets repository: $GITHUB_USER/$GITHUB_SECRETS_REPO${NC}"
|
|
||||||
|
|
||||||
_prompt "${YELLOW}Is this correct? yes/no: ${NC}" choice
|
_prompt "${YELLOW}Is this correct? yes/no: ${NC}" choice
|
||||||
|
|
||||||
case "$choice" in
|
case "$choice" in
|
||||||
@ -205,7 +136,6 @@ confirm_details() {
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
# Call the confirmation function
|
|
||||||
confirm_details
|
confirm_details
|
||||||
|
|
||||||
# Function to replace tokens in each file
|
# Function to replace tokens in each file
|
||||||
@ -217,8 +147,6 @@ replace_tokens() {
|
|||||||
LC_ALL=C LANG=C sed -i '' -e "s/%USER%/$USERNAME/g" "$file"
|
LC_ALL=C LANG=C sed -i '' -e "s/%USER%/$USERNAME/g" "$file"
|
||||||
LC_ALL=C LANG=C sed -i '' -e "s/%EMAIL%/$GIT_EMAIL/g" "$file"
|
LC_ALL=C LANG=C sed -i '' -e "s/%EMAIL%/$GIT_EMAIL/g" "$file"
|
||||||
LC_ALL=C LANG=C sed -i '' -e "s/%NAME%/$GIT_NAME/g" "$file"
|
LC_ALL=C LANG=C sed -i '' -e "s/%NAME%/$GIT_NAME/g" "$file"
|
||||||
LC_ALL=C LANG=C sed -i '' -e "s/%GITHUB_USER%/$GITHUB_USER/g" "$file"
|
|
||||||
LC_ALL=C LANG=C sed -i '' -e "s/%GITHUB_SECRETS_REPO%/$GITHUB_SECRETS_REPO/g" "$file"
|
|
||||||
else
|
else
|
||||||
# Linux or other
|
# Linux or other
|
||||||
sed -i -e "s/%USER%/$USERNAME/g" "$file"
|
sed -i -e "s/%USER%/$USERNAME/g" "$file"
|
||||||
@ -227,16 +155,10 @@ replace_tokens() {
|
|||||||
sed -i -e "s/%INTERFACE%/$PRIMARY_IFACE/g" "$file"
|
sed -i -e "s/%INTERFACE%/$PRIMARY_IFACE/g" "$file"
|
||||||
sed -i -e "s/%DISK%/$BOOT_DISK/g" "$file"
|
sed -i -e "s/%DISK%/$BOOT_DISK/g" "$file"
|
||||||
sed -i -e "s/%HOST%/$HOST_NAME/g" "$file"
|
sed -i -e "s/%HOST%/$HOST_NAME/g" "$file"
|
||||||
sed -i -e "s/%GITHUB_USER%/$GITHUB_USER/g" "$file"
|
|
||||||
sed -i -e "s/%GITHUB_SECRETS_REPO%/$GITHUB_SECRETS_REPO/g" "$file"
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Insert secrets repo into flake
|
|
||||||
insert_secrets_input
|
|
||||||
insert_secrets_output
|
|
||||||
|
|
||||||
# Traverse directories and call replace_tokens on each Nix file
|
# Traverse directories and call replace_tokens on each Nix file
|
||||||
export -f replace_tokens
|
export -f replace_tokens
|
||||||
find . -type f -exec bash -c 'replace_tokens "$0"' {} \;
|
find . -type f -exec bash -c 'replace_tokens "$0"' {} \;
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
VERSION=1.0
|
||||||
|
|
||||||
|
# Color codes
|
||||||
RED='\033[0;31m'
|
RED='\033[0;31m'
|
||||||
GREEN='\033[0;32m'
|
GREEN='\033[0;32m'
|
||||||
YELLOW='\033[1;33m'
|
YELLOW='\033[1;33m'
|
||||||
@ -32,69 +35,6 @@ _prompt() {
|
|||||||
read -r $variable
|
read -r $variable
|
||||||
}
|
}
|
||||||
|
|
||||||
insert_secrets_output() {
|
|
||||||
local pattern="outputs = { self, darwin, nix-homebrew, homebrew-bundle, homebrew-core, homebrew-cask, home-manager, nixpkgs, disko, agenix } @inputs:"
|
|
||||||
local insert_text="secrets "
|
|
||||||
|
|
||||||
awk -v pat="$pattern" -v insert="$insert_text" '
|
|
||||||
$0 ~ pat {
|
|
||||||
sub(/} @inputs:/, ", " insert "} @inputs:"); # Replace the closing brace with the insert text followed by the brace
|
|
||||||
gsub(/ ,/, ","); # Correct any spaces before commas
|
|
||||||
print
|
|
||||||
next
|
|
||||||
}
|
|
||||||
{ print }
|
|
||||||
' flake.nix > flake.nix.tmp
|
|
||||||
|
|
||||||
mv flake.nix.tmp flake.nix
|
|
||||||
}
|
|
||||||
|
|
||||||
insert_secrets_input() {
|
|
||||||
# Define file path
|
|
||||||
FILE_PATH="flake.nix"
|
|
||||||
|
|
||||||
# Backup the original file
|
|
||||||
cp "$FILE_PATH" "${FILE_PATH}.bak"
|
|
||||||
|
|
||||||
# Temporary file for the text to insert
|
|
||||||
TEMP_FILE="temp_insert.txt"
|
|
||||||
|
|
||||||
# Write the formatted text to the temporary file
|
|
||||||
cat > "$TEMP_FILE" << 'EOF'
|
|
||||||
secrets = {
|
|
||||||
url = "git+ssh://git@github.com/%GITHUB_USER%/%GITHUB_SECRETS_REPO%.git";
|
|
||||||
flake = false;
|
|
||||||
};
|
|
||||||
EOF
|
|
||||||
|
|
||||||
# Check if the 'secrets' block already exists
|
|
||||||
if grep -q 'url = "git+ssh://git@github.com/%GITHUB_USER%/%GITHUB_SECRETS_REPO%.git"' "$FILE_PATH"; then
|
|
||||||
echo "The 'secrets' block already exists in the file."
|
|
||||||
rm "$TEMP_FILE"
|
|
||||||
rm "${FILE_PATH}.bak"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Find the start and end line numbers of the 'disko' block
|
|
||||||
START_LINE=$(grep -n 'disko = {' "$FILE_PATH" | head -n 1 | cut -d: -f1)
|
|
||||||
END_LINE=$(tail -n +$START_LINE "$FILE_PATH" | grep -n '};' | head -n 1 | cut -d: -f1)
|
|
||||||
END_LINE=$((START_LINE + END_LINE - 1))
|
|
||||||
|
|
||||||
# Create a new file with the insertion
|
|
||||||
{
|
|
||||||
sed -n "1,${END_LINE}p" "$FILE_PATH"
|
|
||||||
cat "$TEMP_FILE"
|
|
||||||
sed -n "$((END_LINE + 1)),\$p" "$FILE_PATH"
|
|
||||||
} > "${FILE_PATH}.new"
|
|
||||||
|
|
||||||
# Replace the original file with the new file
|
|
||||||
mv "${FILE_PATH}.new" "$FILE_PATH"
|
|
||||||
|
|
||||||
# Clean up the temporary files
|
|
||||||
rm "$TEMP_FILE"
|
|
||||||
rm "${FILE_PATH}.bak"
|
|
||||||
}
|
|
||||||
|
|
||||||
ask_for_star() {
|
ask_for_star() {
|
||||||
_print "${YELLOW}Would you like to support my work by starring my GitHub repo? yes/no [yes]: ${NC}"
|
_print "${YELLOW}Would you like to support my work by starring my GitHub repo? yes/no [yes]: ${NC}"
|
||||||
local response
|
local response
|
||||||
@ -138,12 +78,6 @@ if [[ -z "$GIT_NAME" ]]; then
|
|||||||
_prompt "${YELLOW}Please enter your name: ${NC}" GIT_NAME
|
_prompt "${YELLOW}Please enter your name: ${NC}" GIT_NAME
|
||||||
fi
|
fi
|
||||||
|
|
||||||
_prompt "${YELLOW}Please enter your Github username: ${NC}" GITHUB_USER
|
|
||||||
_prompt "${YELLOW}Please enter your Github secrets repository name: ${NC}" GITHUB_SECRETS_REPO
|
|
||||||
|
|
||||||
export GITHUB_USER
|
|
||||||
export GITHUB_SECRETS_REPO
|
|
||||||
|
|
||||||
select_boot_disk() {
|
select_boot_disk() {
|
||||||
local disks
|
local disks
|
||||||
local _boot_disk
|
local _boot_disk
|
||||||
@ -174,7 +108,6 @@ if [[ "$OS" != "Darwin" ]]; then
|
|||||||
select_boot_disk
|
select_boot_disk
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Confirmation step
|
|
||||||
confirm_details() {
|
confirm_details() {
|
||||||
_print "${GREEN}Username: $USERNAME"
|
_print "${GREEN}Username: $USERNAME"
|
||||||
_print "Email: $GIT_EMAIL"
|
_print "Email: $GIT_EMAIL"
|
||||||
@ -186,8 +119,6 @@ confirm_details() {
|
|||||||
_print "Hostname: $HOST_NAME${NC}"
|
_print "Hostname: $HOST_NAME${NC}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
_print "${GREEN}Secrets repository: $GITHUB_USER/$GITHUB_SECRETS_REPO${NC}"
|
|
||||||
|
|
||||||
_prompt "${YELLOW}Is this correct? yes/no: ${NC}" choice
|
_prompt "${YELLOW}Is this correct? yes/no: ${NC}" choice
|
||||||
|
|
||||||
case "$choice" in
|
case "$choice" in
|
||||||
@ -205,7 +136,6 @@ confirm_details() {
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
# Call the confirmation function
|
|
||||||
confirm_details
|
confirm_details
|
||||||
|
|
||||||
# Function to replace tokens in each file
|
# Function to replace tokens in each file
|
||||||
@ -217,8 +147,6 @@ replace_tokens() {
|
|||||||
LC_ALL=C LANG=C sed -i '' -e "s/%USER%/$USERNAME/g" "$file"
|
LC_ALL=C LANG=C sed -i '' -e "s/%USER%/$USERNAME/g" "$file"
|
||||||
LC_ALL=C LANG=C sed -i '' -e "s/%EMAIL%/$GIT_EMAIL/g" "$file"
|
LC_ALL=C LANG=C sed -i '' -e "s/%EMAIL%/$GIT_EMAIL/g" "$file"
|
||||||
LC_ALL=C LANG=C sed -i '' -e "s/%NAME%/$GIT_NAME/g" "$file"
|
LC_ALL=C LANG=C sed -i '' -e "s/%NAME%/$GIT_NAME/g" "$file"
|
||||||
LC_ALL=C LANG=C sed -i '' -e "s/%GITHUB_USER%/$GITHUB_USER/g" "$file"
|
|
||||||
LC_ALL=C LANG=C sed -i '' -e "s/%GITHUB_SECRETS_REPO%/$GITHUB_SECRETS_REPO/g" "$file"
|
|
||||||
else
|
else
|
||||||
# Linux or other
|
# Linux or other
|
||||||
sed -i -e "s/%USER%/$USERNAME/g" "$file"
|
sed -i -e "s/%USER%/$USERNAME/g" "$file"
|
||||||
@ -227,16 +155,10 @@ replace_tokens() {
|
|||||||
sed -i -e "s/%INTERFACE%/$PRIMARY_IFACE/g" "$file"
|
sed -i -e "s/%INTERFACE%/$PRIMARY_IFACE/g" "$file"
|
||||||
sed -i -e "s/%DISK%/$BOOT_DISK/g" "$file"
|
sed -i -e "s/%DISK%/$BOOT_DISK/g" "$file"
|
||||||
sed -i -e "s/%HOST%/$HOST_NAME/g" "$file"
|
sed -i -e "s/%HOST%/$HOST_NAME/g" "$file"
|
||||||
sed -i -e "s/%GITHUB_USER%/$GITHUB_USER/g" "$file"
|
|
||||||
sed -i -e "s/%GITHUB_SECRETS_REPO%/$GITHUB_SECRETS_REPO/g" "$file"
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Insert secrets repo into flake
|
|
||||||
insert_secrets_input
|
|
||||||
insert_secrets_output
|
|
||||||
|
|
||||||
# Traverse directories and call replace_tokens on each Nix file
|
# Traverse directories and call replace_tokens on each Nix file
|
||||||
export -f replace_tokens
|
export -f replace_tokens
|
||||||
find . -type f -exec bash -c 'replace_tokens "$0"' {} \;
|
find . -type f -exec bash -c 'replace_tokens "$0"' {} \;
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
VERSION=1.0
|
||||||
|
|
||||||
|
# Color codes
|
||||||
RED='\033[0;31m'
|
RED='\033[0;31m'
|
||||||
GREEN='\033[0;32m'
|
GREEN='\033[0;32m'
|
||||||
YELLOW='\033[1;33m'
|
YELLOW='\033[1;33m'
|
||||||
@ -75,17 +78,6 @@ if [[ -z "$GIT_NAME" ]]; then
|
|||||||
_prompt "${YELLOW}Please enter your name: ${NC}" GIT_NAME
|
_prompt "${YELLOW}Please enter your name: ${NC}" GIT_NAME
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z "$GITHUB_USER" ]]; then
|
|
||||||
_prompt "${YELLOW}Please enter your Github username: ${NC}" GITHUB_USER
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -z "$GITHUB_SECRETS_REPO" ]]; then
|
|
||||||
_prompt "${YELLOW}Please enter your Github secrets repository name: ${NC}" GITHUB_SECRETS_REPO
|
|
||||||
fi
|
|
||||||
|
|
||||||
export GITHUB_USER
|
|
||||||
export GITHUB_SECRETS_REPO
|
|
||||||
|
|
||||||
select_boot_disk() {
|
select_boot_disk() {
|
||||||
local disks
|
local disks
|
||||||
local _boot_disk
|
local _boot_disk
|
||||||
@ -128,8 +120,6 @@ confirm_details() {
|
|||||||
_print "Hostname: $HOST_NAME${NC}"
|
_print "Hostname: $HOST_NAME${NC}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
_print "${GREEN}Secrets repository: $GITHUB_USER/$GITHUB_SECRETS_REPO${NC}"
|
|
||||||
|
|
||||||
_prompt "${YELLOW}Is this correct? yes/no: ${NC}" choice
|
_prompt "${YELLOW}Is this correct? yes/no: ${NC}" choice
|
||||||
|
|
||||||
case "$choice" in
|
case "$choice" in
|
||||||
@ -159,8 +149,6 @@ replace_tokens() {
|
|||||||
LC_ALL=C LANG=C sed -i '' -e "s/%USER%/$USERNAME/g" "$file"
|
LC_ALL=C LANG=C sed -i '' -e "s/%USER%/$USERNAME/g" "$file"
|
||||||
LC_ALL=C LANG=C sed -i '' -e "s/%EMAIL%/$GIT_EMAIL/g" "$file"
|
LC_ALL=C LANG=C sed -i '' -e "s/%EMAIL%/$GIT_EMAIL/g" "$file"
|
||||||
LC_ALL=C LANG=C sed -i '' -e "s/%NAME%/$GIT_NAME/g" "$file"
|
LC_ALL=C LANG=C sed -i '' -e "s/%NAME%/$GIT_NAME/g" "$file"
|
||||||
LC_ALL=C LANG=C sed -i '' -e "s/%GITHUB_USER%/$GITHUB_USER/g" "$file"
|
|
||||||
LC_ALL=C LANG=C sed -i '' -e "s/%GITHUB_SECRETS_REPO%/$GITHUB_SECRETS_REPO/g" "$file"
|
|
||||||
else
|
else
|
||||||
# Linux or other
|
# Linux or other
|
||||||
sed -i -e "s/%USER%/$USERNAME/g" "$file"
|
sed -i -e "s/%USER%/$USERNAME/g" "$file"
|
||||||
@ -169,8 +157,6 @@ replace_tokens() {
|
|||||||
sed -i -e "s/%INTERFACE%/$PRIMARY_IFACE/g" "$file"
|
sed -i -e "s/%INTERFACE%/$PRIMARY_IFACE/g" "$file"
|
||||||
sed -i -e "s/%DISK%/$BOOT_DISK/g" "$file"
|
sed -i -e "s/%DISK%/$BOOT_DISK/g" "$file"
|
||||||
sed -i -e "s/%HOST%/$HOST_NAME/g" "$file"
|
sed -i -e "s/%HOST%/$HOST_NAME/g" "$file"
|
||||||
sed -i -e "s/%GITHUB_USER%/$GITHUB_USER/g" "$file"
|
|
||||||
sed -i -e "s/%GITHUB_SECRETS_REPO%/$GITHUB_SECRETS_REPO/g" "$file"
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
1
auto_master
Symbolic link
1
auto_master
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
/etc/auto_master
|
79
brew-cask-list
Normal file
79
brew-cask-list
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
1password
|
||||||
|
appcleaner
|
||||||
|
aquamacs
|
||||||
|
autodesk-fusion
|
||||||
|
blackhole-16ch
|
||||||
|
blackhole-2ch
|
||||||
|
blender
|
||||||
|
box-drive
|
||||||
|
brave-browser
|
||||||
|
cabal
|
||||||
|
calibre
|
||||||
|
cameracontroller
|
||||||
|
cork
|
||||||
|
dbeaver-community
|
||||||
|
dcp-o-matic
|
||||||
|
diffmerge
|
||||||
|
discord
|
||||||
|
distroav
|
||||||
|
docker
|
||||||
|
drawio
|
||||||
|
element
|
||||||
|
emby
|
||||||
|
fantastical
|
||||||
|
firefox
|
||||||
|
freecad
|
||||||
|
gimp
|
||||||
|
git-credential-manager
|
||||||
|
github
|
||||||
|
gitkraken
|
||||||
|
gpg-suite
|
||||||
|
home-assistant
|
||||||
|
inkscape
|
||||||
|
iterm2
|
||||||
|
jellyfin-media-player
|
||||||
|
jitsi
|
||||||
|
joplin
|
||||||
|
karabiner-elements
|
||||||
|
keybase
|
||||||
|
libndi
|
||||||
|
libreoffice
|
||||||
|
little-snitch
|
||||||
|
macdown
|
||||||
|
maciasl
|
||||||
|
mactex
|
||||||
|
mattermost
|
||||||
|
mediaelch
|
||||||
|
minecraft
|
||||||
|
mono-mdk-for-visual-studio
|
||||||
|
mqtt-explorer
|
||||||
|
mysqlworkbench
|
||||||
|
native-access
|
||||||
|
nheko
|
||||||
|
obs
|
||||||
|
opencore-configurator
|
||||||
|
openscad
|
||||||
|
oracle-jdk
|
||||||
|
qmk-toolbox
|
||||||
|
rar
|
||||||
|
raspberry-pi-imager
|
||||||
|
signal
|
||||||
|
spamsieve
|
||||||
|
spotify
|
||||||
|
sqlitestudio
|
||||||
|
steam
|
||||||
|
superslicer
|
||||||
|
synology-drive
|
||||||
|
tinymediamanager
|
||||||
|
unicodechecker
|
||||||
|
vcv-rack
|
||||||
|
virtualbox
|
||||||
|
visual-studio-code
|
||||||
|
vlc
|
||||||
|
vnc-viewer
|
||||||
|
webex
|
||||||
|
whalebird
|
||||||
|
whatsapp
|
||||||
|
wireshark
|
||||||
|
xquartz
|
||||||
|
zotero
|
1
brew-formula-list
Normal file
1
brew-formula-list
Normal file
@ -0,0 +1 @@
|
|||||||
|
mas
|
378
flake.lock
generated
378
flake.lock
generated
@ -1,378 +0,0 @@
|
|||||||
{
|
|
||||||
"nodes": {
|
|
||||||
"brew-src": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1746795192,
|
|
||||||
"narHash": "sha256-Cv+RXuzmn2iGBY2Ny/nXBTH+LFKDWIvMxf9a+btKI6M=",
|
|
||||||
"owner": "Homebrew",
|
|
||||||
"repo": "brew",
|
|
||||||
"rev": "6f39076b3c2251994419215279d0525ef667fc31",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "Homebrew",
|
|
||||||
"ref": "4.5.2",
|
|
||||||
"repo": "brew",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"darwin": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1747494142,
|
|
||||||
"narHash": "sha256-7TAUwDVZWq82t/x3+zZ5y+Tjl2hLL2c8+8pv9zCUbTo=",
|
|
||||||
"owner": "LnL7",
|
|
||||||
"repo": "nix-darwin",
|
|
||||||
"rev": "8e251e45346e9d58e0eece2512e40c183f967e8f",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "LnL7",
|
|
||||||
"ref": "master",
|
|
||||||
"repo": "nix-darwin",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"disko": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1747274630,
|
|
||||||
"narHash": "sha256-87RJwXbfOHyzTB9LYagAQ6vOZhszCvd8Gvudu+gf3qo=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "disko",
|
|
||||||
"rev": "ec7c109a4f794fce09aad87239eab7f66540b888",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "disko",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-parts": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs-lib": "nixpkgs-lib"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1733312601,
|
|
||||||
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
|
|
||||||
"owner": "hercules-ci",
|
|
||||||
"repo": "flake-parts",
|
|
||||||
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "hercules-ci",
|
|
||||||
"repo": "flake-parts",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-root": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1723604017,
|
|
||||||
"narHash": "sha256-rBtQ8gg+Dn4Sx/s+pvjdq3CB2wQNzx9XGFq/JVGCB6k=",
|
|
||||||
"owner": "srid",
|
|
||||||
"repo": "flake-root",
|
|
||||||
"rev": "b759a56851e10cb13f6b8e5698af7b59c44be26e",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "srid",
|
|
||||||
"repo": "flake-root",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"home-manager": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": "nixpkgs"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1747439237,
|
|
||||||
"narHash": "sha256-5rCGrnkglKKj4cav1U3HC+SIUNJh08pqOK4spQv9RjA=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "home-manager",
|
|
||||||
"rev": "ae755329092c87369b9e9a1510a8cf1ce2b1c708",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "home-manager",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"homebrew-bundle": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1745335228,
|
|
||||||
"narHash": "sha256-TIKR2UgtyUmHLNZp255/vLs+1I10hXe+sciMEbAGFwE=",
|
|
||||||
"owner": "homebrew",
|
|
||||||
"repo": "homebrew-bundle",
|
|
||||||
"rev": "a3265c84b232e13048ecbf6fc18a2eedfadbeb08",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "homebrew",
|
|
||||||
"repo": "homebrew-bundle",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"homebrew-cask": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1747489558,
|
|
||||||
"narHash": "sha256-jTEWsQwwHBmBbEWfc5shlzcf0++rJyBNs+wQ9xzWBz4=",
|
|
||||||
"owner": "homebrew",
|
|
||||||
"repo": "homebrew-cask",
|
|
||||||
"rev": "32ffcd12f2e8a60c729c2410c2f7e2a162bf0e86",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "homebrew",
|
|
||||||
"repo": "homebrew-cask",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"homebrew-core": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1747495694,
|
|
||||||
"narHash": "sha256-l610VWWAngdS1nzTOw1GHeC2mXsy1F7vt2Bw5AmK45o=",
|
|
||||||
"owner": "homebrew",
|
|
||||||
"repo": "homebrew-core",
|
|
||||||
"rev": "e87f391c38c8becfa313edbece5c2cfc8eceb806",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "homebrew",
|
|
||||||
"repo": "homebrew-core",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nix-darwin": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": "nixpkgs_2"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1716329735,
|
|
||||||
"narHash": "sha256-ap51w+VqG21vuzyQ04WrhI2YbWHd3UGz0e7dc/QQmoA=",
|
|
||||||
"owner": "LnL7",
|
|
||||||
"repo": "nix-darwin",
|
|
||||||
"rev": "eac4f25028c1975a939c8f8fba95c12f8a25e01c",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "LnL7",
|
|
||||||
"repo": "nix-darwin",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nix-homebrew": {
|
|
||||||
"inputs": {
|
|
||||||
"brew-src": "brew-src",
|
|
||||||
"nix-darwin": "nix-darwin",
|
|
||||||
"nixpkgs": "nixpkgs_3"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1747444109,
|
|
||||||
"narHash": "sha256-fSufrKr8NdhLMuGZGwjGUfH+TIWrjFTRIBhgCRIyxno=",
|
|
||||||
"owner": "zhaofengli-wip",
|
|
||||||
"repo": "nix-homebrew",
|
|
||||||
"rev": "159f21ae77da757bbaeb98c0b16ff2e7b2738350",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "zhaofengli-wip",
|
|
||||||
"repo": "nix-homebrew",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixd": {
|
|
||||||
"inputs": {
|
|
||||||
"flake-parts": "flake-parts",
|
|
||||||
"flake-root": "flake-root",
|
|
||||||
"nixpkgs": "nixpkgs_4",
|
|
||||||
"treefmt-nix": "treefmt-nix"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1746955667,
|
|
||||||
"narHash": "sha256-VgVbPqZl8S09EGWFmgX++aFsz0Z7VmskSJGBXFE4eEs=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "nixd",
|
|
||||||
"rev": "7d19dfe5b65035aa255b83147375fdd8257459b9",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "nixd",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1746904237,
|
|
||||||
"narHash": "sha256-3e+AVBczosP5dCLQmMoMEogM57gmZ2qrVSrmq9aResQ=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "d89fc19e405cb2d55ce7cc114356846a0ee5e956",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "nixos-unstable",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs-lib": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1733096140,
|
|
||||||
"narHash": "sha256-1qRH7uAUsyQI7R1Uwl4T+XvdNv778H0Nb5njNrqvylY=",
|
|
||||||
"type": "tarball",
|
|
||||||
"url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"type": "tarball",
|
|
||||||
"url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs_2": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1687274257,
|
|
||||||
"narHash": "sha256-TutzPriQcZ8FghDhEolnHcYU2oHIG5XWF+/SUBNnAOE=",
|
|
||||||
"path": "/nix/store/22qgs3skscd9bmrxv9xv4q5d4wwm5ppx-source",
|
|
||||||
"rev": "2c9ecd1f0400076a4d6b2193ad468ff0a7e7fdc5",
|
|
||||||
"type": "path"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"id": "nixpkgs",
|
|
||||||
"type": "indirect"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs_3": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1746328495,
|
|
||||||
"narHash": "sha256-uKCfuDs7ZM3QpCE/jnfubTg459CnKnJG/LwqEVEdEiw=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "979daf34c8cacebcd917d540070b52a3c2b9b16e",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "nixos-unstable",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs_4": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1744174375,
|
|
||||||
"narHash": "sha256-oxI9TLgnQbQ/WL0tIwVSIooLbXq4PW1QUhf5aQmXFgk=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "ef3a956f697525883b77192cbe208233ea0f8f79",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs_5": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1747327360,
|
|
||||||
"narHash": "sha256-LSmTbiq/nqZR9B2t4MRnWG7cb0KVNU70dB7RT4+wYK4=",
|
|
||||||
"owner": "nixos",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "e06158e58f3adee28b139e9c2bcfcc41f8625b46",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nixos",
|
|
||||||
"ref": "nixos-unstable",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": {
|
|
||||||
"inputs": {
|
|
||||||
"darwin": "darwin",
|
|
||||||
"disko": "disko",
|
|
||||||
"home-manager": "home-manager",
|
|
||||||
"homebrew-bundle": "homebrew-bundle",
|
|
||||||
"homebrew-cask": "homebrew-cask",
|
|
||||||
"homebrew-core": "homebrew-core",
|
|
||||||
"nix-homebrew": "nix-homebrew",
|
|
||||||
"nixd": "nixd",
|
|
||||||
"nixpkgs": "nixpkgs_5",
|
|
||||||
"secrets": "secrets",
|
|
||||||
"sops-nix": "sops-nix"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"secrets": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"path": "git@git.kolkman.org:olaf/nix-config-secrets.git",
|
|
||||||
"type": "path"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"path": "git@git.kolkman.org:olaf/nix-config-secrets.git",
|
|
||||||
"type": "path"
|
|
||||||
},
|
|
||||||
"parent": []
|
|
||||||
},
|
|
||||||
"sops-nix": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1746485181,
|
|
||||||
"narHash": "sha256-PxrrSFLaC7YuItShxmYbMgSuFFuwxBB+qsl9BZUnRvg=",
|
|
||||||
"owner": "Mic92",
|
|
||||||
"repo": "sops-nix",
|
|
||||||
"rev": "e93ee1d900ad264d65e9701a5c6f895683433386",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "Mic92",
|
|
||||||
"repo": "sops-nix",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"treefmt-nix": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixd",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1734704479,
|
|
||||||
"narHash": "sha256-MMi74+WckoyEWBRcg/oaGRvXC9BVVxDZNRMpL+72wBI=",
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "treefmt-nix",
|
|
||||||
"rev": "65712f5af67234dad91a5a4baee986a8b62dbf8f",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "treefmt-nix",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": "root",
|
|
||||||
"version": 7
|
|
||||||
}
|
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
description = "Starter Configuration with secrets for MacOS and NixOS";
|
description = "Starter Configuration with secrets (removed) for MacOS and NixOS";
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
url = "github:nixos/nixpkgs/nixos-unstable";
|
url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
@ -33,10 +33,6 @@
|
|||||||
url = "github:nix-community/disko";
|
url = "github:nix-community/disko";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
secrets = {
|
|
||||||
url = "git@git.kolkman.org:olaf/nix-config-secrets.git";
|
|
||||||
flake = false;
|
|
||||||
};
|
|
||||||
sops-nix = {
|
sops-nix = {
|
||||||
url = "github:Mic92/sops-nix";
|
url = "github:Mic92/sops-nix";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
@ -53,7 +49,6 @@
|
|||||||
home-manager,
|
home-manager,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
disko,
|
disko,
|
||||||
secrets,
|
|
||||||
nixd,
|
nixd,
|
||||||
sops-nix,
|
sops-nix,
|
||||||
}@inputs:
|
}@inputs:
|
||||||
@ -108,7 +103,6 @@
|
|||||||
"create-keys" = mkApp "create-keys" system;
|
"create-keys" = mkApp "create-keys" system;
|
||||||
"check-keys" = mkApp "check-keys" system;
|
"check-keys" = mkApp "check-keys" system;
|
||||||
"install" = mkApp "install" system;
|
"install" = mkApp "install" system;
|
||||||
"install-with-secrets" = mkApp "install-with-secrets" system;
|
|
||||||
};
|
};
|
||||||
mkDarwinApps = system: {
|
mkDarwinApps = system: {
|
||||||
"apply" = mkApp "apply" system;
|
"apply" = mkApp "apply" system;
|
||||||
|
@ -5,6 +5,7 @@ _:
|
|||||||
"homebrew/cask/docker"
|
"homebrew/cask/docker"
|
||||||
"visual-studio-code"
|
"visual-studio-code"
|
||||||
"iterm2"
|
"iterm2"
|
||||||
|
"oracle-jdk"
|
||||||
|
|
||||||
# Creatative tools
|
# Creatative tools
|
||||||
"spotify"
|
"spotify"
|
||||||
@ -18,7 +19,6 @@ _:
|
|||||||
|
|
||||||
# Communication Tools
|
# Communication Tools
|
||||||
"discord"
|
"discord"
|
||||||
"notion"
|
|
||||||
"slack"
|
"slack"
|
||||||
"signal"
|
"signal"
|
||||||
"whatsapp"
|
"whatsapp"
|
||||||
@ -41,9 +41,10 @@ _:
|
|||||||
"jellyfin-media-player"
|
"jellyfin-media-player"
|
||||||
"vimediamanager"
|
"vimediamanager"
|
||||||
"mediaelch"
|
"mediaelch"
|
||||||
|
"handbrake"
|
||||||
|
"obs"
|
||||||
|
|
||||||
# Productivity Tools
|
# Productivity Tools
|
||||||
"raycast"
|
|
||||||
"1Password"
|
"1Password"
|
||||||
"zotero"
|
"zotero"
|
||||||
"gpg-suite"
|
"gpg-suite"
|
||||||
@ -56,6 +57,13 @@ _:
|
|||||||
"macdown"
|
"macdown"
|
||||||
"calibre"
|
"calibre"
|
||||||
"superslicer"
|
"superslicer"
|
||||||
|
"element"
|
||||||
|
"mqtt-explorer"
|
||||||
|
"virtualbox"
|
||||||
|
"autodesk-fusion"
|
||||||
|
"qmk-toolbox"
|
||||||
|
"dbeaver-community"
|
||||||
|
"sqlitestudio"
|
||||||
|
|
||||||
# Browsers
|
# Browsers
|
||||||
"google-chrome"
|
"google-chrome"
|
||||||
|
@ -11,7 +11,7 @@ let
|
|||||||
# Define the content of your file as a derivation
|
# Define the content of your file as a derivation
|
||||||
myEmacsLauncher = pkgs.writeScript "emacs-launcher.command" ''
|
myEmacsLauncher = pkgs.writeScript "emacs-launcher.command" ''
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
emacsclient -c -n &
|
emacs &
|
||||||
'';
|
'';
|
||||||
sharedFiles = import ../shared/files.nix { inherit config pkgs; };
|
sharedFiles = import ../shared/files.nix { inherit config pkgs; };
|
||||||
additionalFiles = import ./files.nix { inherit user config pkgs; };
|
additionalFiles = import ./files.nix { inherit user config pkgs; };
|
||||||
@ -85,6 +85,7 @@ in
|
|||||||
dock = {
|
dock = {
|
||||||
enable = true;
|
enable = true;
|
||||||
entries = [
|
entries = [
|
||||||
|
{ path = "/System/Applications/Launchpad.app/"; }
|
||||||
{ path = "/System/Applications/Mail.app/"; }
|
{ path = "/System/Applications/Mail.app/"; }
|
||||||
{ path = "/Applications/MailMate.app/"; }
|
{ path = "/Applications/MailMate.app/"; }
|
||||||
{ path = "/Applications/1Password.app/"; }
|
{ path = "/Applications/1Password.app/"; }
|
||||||
|
@ -7,5 +7,4 @@
|
|||||||
├── files.nix # Non-Nix, static configuration files (now immutable!)
|
├── files.nix # Non-Nix, static configuration files (now immutable!)
|
||||||
├── home-manager.nix # Defines user programs
|
├── home-manager.nix # Defines user programs
|
||||||
├── packages.nix # List of packages to install for NixOS
|
├── packages.nix # List of packages to install for NixOS
|
||||||
├── secrets.nix # Age-encrypted secrets with agenix
|
|
||||||
```
|
```
|
||||||
|
@ -1,4 +1,9 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
user = "olaf";
|
user = "olaf";
|
||||||
@ -6,16 +11,18 @@ let
|
|||||||
shared-programs = import ../shared/home-manager.nix { inherit config pkgs lib; };
|
shared-programs = import ../shared/home-manager.nix { inherit config pkgs lib; };
|
||||||
shared-files = import ../shared/files.nix { inherit config pkgs; };
|
shared-files = import ../shared/files.nix { inherit config pkgs; };
|
||||||
|
|
||||||
polybar-user_modules = builtins.readFile (pkgs.substituteAll {
|
polybar-user_modules = builtins.readFile (
|
||||||
|
pkgs.replaceVars {
|
||||||
src = ./config/polybar/user_modules.ini;
|
src = ./config/polybar/user_modules.ini;
|
||||||
packages = "${xdg_configHome}/polybar/bin/check-nixos-updates.sh";
|
packages = "${xdg_configHome}/polybar/bin/check-nixos-updates.sh";
|
||||||
searchpkgs = "${xdg_configHome}/polybar/bin/search-nixos-updates.sh";
|
searchpkgs = "${xdg_configHome}/polybar/bin/search-nixos-updates.sh";
|
||||||
launcher = "${xdg_configHome}/polybar/bin/launcher.sh";
|
launcher = "${xdg_configHome}/polybar/bin/launcher.sh";
|
||||||
powermenu = "${xdg_configHome}/rofi/bin/powermenu.sh";
|
powermenu = "${xdg_configHome}/rofi/bin/powermenu.sh";
|
||||||
calendar = "${xdg_configHome}/polybar/bin/popup-calendar.sh";
|
calendar = "${xdg_configHome}/polybar/bin/popup-calendar.sh";
|
||||||
});
|
}
|
||||||
|
);
|
||||||
|
|
||||||
polybar-config = pkgs.substituteAll {
|
polybar-config = pkgs.replaceVars {
|
||||||
src = ./config/polybar/config.ini;
|
src = ./config/polybar/config.ini;
|
||||||
font0 = "DejaVu Sans:size=12;3";
|
font0 = "DejaVu Sans:size=12;3";
|
||||||
font1 = "feather:size=12;3"; # from overlay
|
font1 = "feather:size=12;3"; # from overlay
|
||||||
@ -31,7 +38,7 @@ in
|
|||||||
enableNixpkgsReleaseCheck = false;
|
enableNixpkgsReleaseCheck = false;
|
||||||
username = "${user}";
|
username = "${user}";
|
||||||
homeDirectory = "/home/${user}";
|
homeDirectory = "/home/${user}";
|
||||||
packages = pkgs.callPackage ./packages.nix {};
|
packages = pkgs.callPackage ./packages.nix { };
|
||||||
file = shared-files // import ./files.nix { inherit user; };
|
file = shared-files // import ./files.nix { inherit user; };
|
||||||
stateVersion = "21.05";
|
stateVersion = "21.05";
|
||||||
};
|
};
|
||||||
@ -114,6 +121,8 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
programs = shared-programs // { gpg.enable = true; };
|
programs = shared-programs // {
|
||||||
|
gpg.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,29 +0,0 @@
|
|||||||
{ config, pkgs, agenix, secrets, ... }:
|
|
||||||
|
|
||||||
let user = "olaf"; in
|
|
||||||
{
|
|
||||||
age.identityPaths = [
|
|
||||||
"/home/${user}/.ssh/id_ed25519"
|
|
||||||
];
|
|
||||||
|
|
||||||
# Your secrets go here
|
|
||||||
#
|
|
||||||
# Note: the installWithSecrets command you ran to boostrap the machine actually copies over
|
|
||||||
# a Github key pair. However, if you want to store the keypair in your nix-secrets repo
|
|
||||||
# instead, you can reference the age files and specify the symlink path here. Then add your
|
|
||||||
# public key in shared/files.nix.
|
|
||||||
#
|
|
||||||
# If you change the key name, you'll need to update the SSH configuration in shared/home-manager.nix
|
|
||||||
# so Github reads it correctly.
|
|
||||||
|
|
||||||
#
|
|
||||||
# age.secrets."github-ssh-key" = {
|
|
||||||
# symlink = false;
|
|
||||||
# path = "/home/${user}/.ssh/id_github";
|
|
||||||
# file = "${secrets}/github-ssh-key.age";
|
|
||||||
# mode = "600";
|
|
||||||
# owner = "${user}";
|
|
||||||
# group = "wheel";
|
|
||||||
# };
|
|
||||||
|
|
||||||
}
|
|
@ -16,8 +16,8 @@ Just me!
|
|||||||
|
|
||||||
#+NAME: personal-info
|
#+NAME: personal-info
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(setq user-full-name "%NAME%"
|
(setq user-full-name "Olaf Kolkman"
|
||||||
user-mail-address "%EMAIL%")
|
user-mail-address "olaf@xolx.nl")
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** Initialization
|
** Initialization
|
||||||
@ -177,7 +177,7 @@ Helpful keybindings to help keep Emacs sane.
|
|||||||
(global-set-key (kbd "C-x -") 'kill-buffer-and-window)
|
(global-set-key (kbd "C-x -") 'kill-buffer-and-window)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
**** Treemacs
|
**** <Treemacs>
|
||||||
#+NAME: treemacs
|
#+NAME: treemacs
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(dl/leader-keys
|
(dl/leader-keys
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
;; -------------------------
|
;; -------------------------
|
||||||
(defvar org-config-file "~/.local/share/src/nixos-config/modules/shared/config/emacs/config.org")
|
(defvar org-config-file "~/.local/share/src/nixos-config/modules/shared/config/emacs/config.org")
|
||||||
(defvar default-config-file "~/.emacs.d/default-config.org")
|
(defvar default-config-file "~/.emacs.d/default-config.org")
|
||||||
(defvar default-config-url "https://raw.githubusercontent.com/dustinlyons/nixos-config/9ad810c818b895c1f67f4daf21bbef31d8b5e8cd/shared/config/emacs/config.org")
|
(defvar default-config-url "https://git.kolkman.org/olaf/nixos-config_to_rule_them_all/raw/branch/main/modules/shared/config/emacs/config.org")
|
||||||
|
|
||||||
;; -------------------------
|
;; -------------------------
|
||||||
;; Package Manager Setup
|
;; Package Manager Setup
|
||||||
|
@ -46,11 +46,11 @@ in
|
|||||||
|
|
||||||
# Emacs is my editor
|
# Emacs is my editor
|
||||||
export ALTERNATE_EDITOR=""
|
export ALTERNATE_EDITOR=""
|
||||||
export EDITOR="emacsclient -t"
|
export EDITOR="emacs -nw
|
||||||
export VISUAL="emacsclient -c -a emacs"
|
export VISUAL="emacs"
|
||||||
|
|
||||||
e() {
|
e() {
|
||||||
emacsclient -t "$@"
|
emacs -nw "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
# nix shortcuts
|
# nix shortcuts
|
||||||
|
Loading…
x
Reference in New Issue
Block a user