Compare commits

..

12 Commits

Author SHA1 Message Date
Olaf
4fc3ecf3b8 error correction of wrongfull cut and paste 2025-05-20 20:40:40 +02:00
Olaf
e902d172d2 libre office and oracle jdk 2025-05-20 20:39:03 +02:00
Olaf
372e15742d ah well also emacs 2025-05-20 20:37:19 +02:00
Olaf
00db155874 also emacs 2025-05-20 20:36:51 +02:00
Olaf
a79999d465 emacs init teaking 2025-05-20 20:36:17 +02:00
61dc01881b Some additional casks 2025-05-18 13:13:27 +02:00
22c8e5bb76 Deleting flake.lock 2025-05-18 13:12:25 +02:00
9d8774d8c2 messign with flake.lock 2025-05-18 13:11:48 +02:00
f2d2b36356 Name coded in config.org (emacs) 2025-05-18 13:10:34 +02:00
Olaf
8467795708 Removed agenix secret management 2025-05-18 09:29:56 +02:00
Olaf
f8df758e3c Removing the flake.lock from the reprository 2025-05-18 08:46:04 +02:00
548b3ad02a Replaced substituteAll to replaceVars 2025-05-17 21:34:42 +02:00
18 changed files with 137 additions and 621 deletions

4
.gitignore vendored
View File

@ -2,4 +2,6 @@ README.md~
.DS_Store
result
dump.txt
*~
flake.lock
*~

View File

@ -5,9 +5,8 @@ Started with a configuration generated from [this nixos config template](https:/
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
```
```

View File

@ -1,5 +1,8 @@
#!/usr/bin/env bash
VERSION=1.0
# Color codes
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
@ -32,69 +35,6 @@ _prompt() {
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() {
_print "${YELLOW}Would you like to support my work by starring my GitHub repo? yes/no [yes]: ${NC}"
local response
@ -138,12 +78,6 @@ if [[ -z "$GIT_NAME" ]]; then
_prompt "${YELLOW}Please enter your name: ${NC}" GIT_NAME
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() {
local disks
local _boot_disk
@ -174,7 +108,6 @@ if [[ "$OS" != "Darwin" ]]; then
select_boot_disk
fi
# Confirmation step
confirm_details() {
_print "${GREEN}Username: $USERNAME"
_print "Email: $GIT_EMAIL"
@ -186,8 +119,6 @@ confirm_details() {
_print "Hostname: $HOST_NAME${NC}"
fi
_print "${GREEN}Secrets repository: $GITHUB_USER/$GITHUB_SECRETS_REPO${NC}"
_prompt "${YELLOW}Is this correct? yes/no: ${NC}" choice
case "$choice" in
@ -205,7 +136,6 @@ confirm_details() {
esac
}
# Call the confirmation function
confirm_details
# 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/%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/%GITHUB_USER%/$GITHUB_USER/g" "$file"
LC_ALL=C LANG=C sed -i '' -e "s/%GITHUB_SECRETS_REPO%/$GITHUB_SECRETS_REPO/g" "$file"
else
# Linux or other
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/%DISK%/$BOOT_DISK/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
}
# Insert secrets repo into flake
insert_secrets_input
insert_secrets_output
# Traverse directories and call replace_tokens on each Nix file
export -f replace_tokens
find . -type f -exec bash -c 'replace_tokens "$0"' {} \;

View File

@ -1,5 +1,8 @@
#!/usr/bin/env bash
VERSION=1.0
# Color codes
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
@ -32,69 +35,6 @@ _prompt() {
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() {
_print "${YELLOW}Would you like to support my work by starring my GitHub repo? yes/no [yes]: ${NC}"
local response
@ -138,12 +78,6 @@ if [[ -z "$GIT_NAME" ]]; then
_prompt "${YELLOW}Please enter your name: ${NC}" GIT_NAME
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() {
local disks
local _boot_disk
@ -174,7 +108,6 @@ if [[ "$OS" != "Darwin" ]]; then
select_boot_disk
fi
# Confirmation step
confirm_details() {
_print "${GREEN}Username: $USERNAME"
_print "Email: $GIT_EMAIL"
@ -186,8 +119,6 @@ confirm_details() {
_print "Hostname: $HOST_NAME${NC}"
fi
_print "${GREEN}Secrets repository: $GITHUB_USER/$GITHUB_SECRETS_REPO${NC}"
_prompt "${YELLOW}Is this correct? yes/no: ${NC}" choice
case "$choice" in
@ -205,7 +136,6 @@ confirm_details() {
esac
}
# Call the confirmation function
confirm_details
# 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/%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/%GITHUB_USER%/$GITHUB_USER/g" "$file"
LC_ALL=C LANG=C sed -i '' -e "s/%GITHUB_SECRETS_REPO%/$GITHUB_SECRETS_REPO/g" "$file"
else
# Linux or other
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/%DISK%/$BOOT_DISK/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
}
# Insert secrets repo into flake
insert_secrets_input
insert_secrets_output
# Traverse directories and call replace_tokens on each Nix file
export -f replace_tokens
find . -type f -exec bash -c 'replace_tokens "$0"' {} \;

View File

@ -1,5 +1,8 @@
#!/usr/bin/env bash
VERSION=1.0
# Color codes
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
@ -75,17 +78,6 @@ if [[ -z "$GIT_NAME" ]]; then
_prompt "${YELLOW}Please enter your name: ${NC}" GIT_NAME
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() {
local disks
local _boot_disk
@ -128,8 +120,6 @@ confirm_details() {
_print "Hostname: $HOST_NAME${NC}"
fi
_print "${GREEN}Secrets repository: $GITHUB_USER/$GITHUB_SECRETS_REPO${NC}"
_prompt "${YELLOW}Is this correct? yes/no: ${NC}" choice
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/%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/%GITHUB_USER%/$GITHUB_USER/g" "$file"
LC_ALL=C LANG=C sed -i '' -e "s/%GITHUB_SECRETS_REPO%/$GITHUB_SECRETS_REPO/g" "$file"
else
# Linux or other
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/%DISK%/$BOOT_DISK/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
}

1
auto_master Symbolic link
View File

@ -0,0 +1 @@
/etc/auto_master

79
brew-cask-list Normal file
View 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
View File

@ -0,0 +1 @@
mas

378
flake.lock generated
View File

@ -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
}

View File

@ -1,5 +1,5 @@
{
description = "Starter Configuration with secrets for MacOS and NixOS";
description = "Starter Configuration with secrets (removed) for MacOS and NixOS";
inputs = {
nixpkgs = {
url = "github:nixos/nixpkgs/nixos-unstable";
@ -33,10 +33,6 @@
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
secrets = {
url = "git@git.kolkman.org:olaf/nix-config-secrets.git";
flake = false;
};
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
@ -53,7 +49,6 @@
home-manager,
nixpkgs,
disko,
secrets,
nixd,
sops-nix,
}@inputs:
@ -108,7 +103,6 @@
"create-keys" = mkApp "create-keys" system;
"check-keys" = mkApp "check-keys" system;
"install" = mkApp "install" system;
"install-with-secrets" = mkApp "install-with-secrets" system;
};
mkDarwinApps = system: {
"apply" = mkApp "apply" system;

View File

@ -5,6 +5,7 @@ _:
"homebrew/cask/docker"
"visual-studio-code"
"iterm2"
"oracle-jdk"
# Creatative tools
"spotify"
@ -18,7 +19,6 @@ _:
# Communication Tools
"discord"
"notion"
"slack"
"signal"
"whatsapp"
@ -41,9 +41,10 @@ _:
"jellyfin-media-player"
"vimediamanager"
"mediaelch"
"handbrake"
"obs"
# Productivity Tools
"raycast"
"1Password"
"zotero"
"gpg-suite"
@ -56,6 +57,13 @@ _:
"macdown"
"calibre"
"superslicer"
"element"
"mqtt-explorer"
"virtualbox"
"autodesk-fusion"
"qmk-toolbox"
"dbeaver-community"
"sqlitestudio"
# Browsers
"google-chrome"

View File

@ -11,7 +11,7 @@ let
# Define the content of your file as a derivation
myEmacsLauncher = pkgs.writeScript "emacs-launcher.command" ''
#!/bin/sh
emacsclient -c -n &
emacs &
'';
sharedFiles = import ../shared/files.nix { inherit config pkgs; };
additionalFiles = import ./files.nix { inherit user config pkgs; };
@ -85,6 +85,7 @@ in
dock = {
enable = true;
entries = [
{ path = "/System/Applications/Launchpad.app/"; }
{ path = "/System/Applications/Mail.app/"; }
{ path = "/Applications/MailMate.app/"; }
{ path = "/Applications/1Password.app/"; }

View File

@ -7,5 +7,4 @@
├── files.nix # Non-Nix, static configuration files (now immutable!)
├── home-manager.nix # Defines user programs
├── packages.nix # List of packages to install for NixOS
├── secrets.nix # Age-encrypted secrets with agenix
```

View File

@ -1,21 +1,28 @@
{ config, pkgs, lib, ... }:
{
config,
pkgs,
lib,
...
}:
let
user = "olaf";
xdg_configHome = "/home/${user}/.config";
xdg_configHome = "/home/${user}/.config";
shared-programs = import ../shared/home-manager.nix { inherit config pkgs lib; };
shared-files = import ../shared/files.nix { inherit config pkgs; };
polybar-user_modules = builtins.readFile (pkgs.substituteAll {
src = ./config/polybar/user_modules.ini;
packages = "${xdg_configHome}/polybar/bin/check-nixos-updates.sh";
searchpkgs = "${xdg_configHome}/polybar/bin/search-nixos-updates.sh";
launcher = "${xdg_configHome}/polybar/bin/launcher.sh";
powermenu = "${xdg_configHome}/rofi/bin/powermenu.sh";
calendar = "${xdg_configHome}/polybar/bin/popup-calendar.sh";
});
polybar-user_modules = builtins.readFile (
pkgs.replaceVars {
src = ./config/polybar/user_modules.ini;
packages = "${xdg_configHome}/polybar/bin/check-nixos-updates.sh";
searchpkgs = "${xdg_configHome}/polybar/bin/search-nixos-updates.sh";
launcher = "${xdg_configHome}/polybar/bin/launcher.sh";
powermenu = "${xdg_configHome}/rofi/bin/powermenu.sh";
calendar = "${xdg_configHome}/polybar/bin/popup-calendar.sh";
}
);
polybar-config = pkgs.substituteAll {
polybar-config = pkgs.replaceVars {
src = ./config/polybar/config.ini;
font0 = "DejaVu Sans:size=12;3";
font1 = "feather:size=12;3"; # from overlay
@ -31,7 +38,7 @@ in
enableNixpkgsReleaseCheck = false;
username = "${user}";
homeDirectory = "/home/${user}";
packages = pkgs.callPackage ./packages.nix {};
packages = pkgs.callPackage ./packages.nix { };
file = shared-files // import ./files.nix { inherit user; };
stateVersion = "21.05";
};
@ -114,6 +121,8 @@ in
};
};
programs = shared-programs // { gpg.enable = true; };
programs = shared-programs // {
gpg.enable = true;
};
}

View File

@ -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";
# };
}

View File

@ -16,8 +16,8 @@ Just me!
#+NAME: personal-info
#+BEGIN_SRC emacs-lisp
(setq user-full-name "%NAME%"
user-mail-address "%EMAIL%")
(setq user-full-name "Olaf Kolkman"
user-mail-address "olaf@xolx.nl")
#+END_SRC
** Initialization
@ -177,7 +177,7 @@ Helpful keybindings to help keep Emacs sane.
(global-set-key (kbd "C-x -") 'kill-buffer-and-window)
#+END_SRC
**** Treemacs
**** <Treemacs>
#+NAME: treemacs
#+BEGIN_SRC emacs-lisp
(dl/leader-keys

View File

@ -3,7 +3,7 @@
;; -------------------------
(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-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

View File

@ -46,11 +46,11 @@ in
# Emacs is my editor
export ALTERNATE_EDITOR=""
export EDITOR="emacsclient -t"
export VISUAL="emacsclient -c -a emacs"
export EDITOR="emacs -nw
export VISUAL="emacs"
e() {
emacsclient -t "$@"
emacs -nw "$@"
}
# nix shortcuts