refactor: reorganize program configuration structure

Major structural changes:
- Create modular program organization by category (development, gaming, shell, etc.)
- Consolidate Python environment configurations using python311
- Introduce comprehensive shell configuration hierarchy
- Move utility programs into appropriate categories

Details:
- Migrate to consistent Python 3.11 usage across all Python tools
- Add structured environment management for multiple languages (Python, Rust, Go, JavaScript)
- Organize shell utilities into logical categories (security, network, files, etc.)
- Consolidate development tools and editor configurations
- Move VR configuration to gaming category
- Group productivity apps (Bitwarden, Obsidian, Todoist)

This restructuring aims to make the configuration more maintainable
and easier to extend in preparation for future flake migration.
This commit is contained in:
jeirmeister 2024-10-30 21:31:46 -07:00
parent 983a08600d
commit e4b85e086f
60 changed files with 1256 additions and 92 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
repo-to-text_*.txt

View File

@ -0,0 +1,18 @@
# Details: https://github.com/kirill-markin/repo-to-text
# Syntax: gitignore rules
# Ignore files and directories for all sections from gitignore file
# Default: True
gitignore-import-and-ignore: True
# Ignore files and directories for tree
# and "Contents of ..." sections
ignore-tree-and-content:
- ".repo-to-text-settings.yaml"
# Ignore files and directories for "Contents of ..." section
ignore-content:
- "README.md"
- "LICENSE"
- "documentation"

543
changes.diff Normal file
View File

@ -0,0 +1,543 @@
diff --git a/home.nix b/home.nix
index 3af0864..e6187b6 100644
--- a/home.nix
+++ b/home.nix
@@ -1,4 +1,3 @@
-# home.nix
{ config, pkgs, ... }:
let
@@ -13,55 +12,15 @@ in
username = "jeirmeister";
homeDirectory = "/home/jeirmeister";
stateVersion = "24.05";
-
+
packages = with pkgs; [
- htop
fortune
- ripgrep
- fd
- jq
- tree
- xclip
- bitwarden-desktop
- floorp
- bitwarden-cli
- nix-prefetch-git
- (customPackages.repo-to-text) # Try wrapping in parentheses
-
- # Development tools
- nodejs
- yarn
- python3
- gcc
- rustup
-
- # System tools
- btop
- neofetch
- bat
- fzf
-
- # Network tools
- mtr
- iperf3
- nmap
-
- # File management
- unzip
- p7zip
- file
-
- # Documentation & reference
- tldr
-
- # Productivity
- todoist
- todoist-electron
+ (customPackages.repo-to-text)
];
};
programs.home-manager.enable = true;
-
+
nixpkgs = {
config = {
allowUnfree = true;
@@ -70,4 +29,4 @@ in
];
};
};
-}
\ No newline at end of file
+}
diff --git a/users/jeirmeister/packages/repo-to-text.nix b/users/jeirmeister/packages/repo-to-text.nix
index 686f35d..88826a2 100644
--- a/users/jeirmeister/packages/repo-to-text.nix
+++ b/users/jeirmeister/packages/repo-to-text.nix
@@ -1,31 +1,31 @@
-# users/jeirmeister/packages/repo2text.nix
{ lib
-, python3Packages
+, python311Packages
, fetchPypi
, tree
}:
-python3Packages.buildPythonPackage rec {
- pname = "repo_to_text"; # Changed to underscore for PyPI
+python311Packages.buildPythonPackage rec {
+ pname = "repo_to_text";
version = "0.4.2";
format = "setuptools";
src = fetchPypi {
- pname = "repo_to_text"; # Using underscore here too
+ pname = "repo_to_text";
inherit version;
sha256 = "d2oydJFP6PNUyPVZlrOtCkyMrFZyc1fkGRa/ZnqsCkQ=";
};
- propagatedBuildInputs = with python3Packages; [
+ propagatedBuildInputs = with python311Packages; [
pyyaml
pyperclip
+ pathspec
];
buildInputs = [
tree
];
- pythonImportsCheck = [ "repo_to_text" ]; # Underscore here too
+ pythonImportsCheck = [ "repo_to_text" ];
meta = with lib; {
description = "Convert directory/repository structure and contents into a single text file";
@@ -34,8 +34,7 @@ python3Packages.buildPythonPackage rec {
maintainers = [];
};
- # This ensures the command is available as repo-to-text
postInstall = ''
mv $out/bin/repo_to_text $out/bin/repo-to-text || true
'';
-}
\ No newline at end of file
+}
diff --git a/users/jeirmeister/programs/appimage.nix b/users/jeirmeister/programs/appimage.nix
deleted file mode 100644
index ae729bf..0000000
--- a/users/jeirmeister/programs/appimage.nix
+++ /dev/null
@@ -1,14 +0,0 @@
-# users/jeirmeister/programs/appimage.nix
-{ config, pkgs, ... }:
-
-{
- home.packages = with pkgs; [
- # Required for AppImage support
- appimage-run
-
- # Optional but useful tools for AppImage management
- zlib
- fuse
- fuse3
- ];
-}
\ No newline at end of file
diff --git a/users/jeirmeister/programs/default.nix b/users/jeirmeister/programs/default.nix
index 6e92c81..41da992 100644
--- a/users/jeirmeister/programs/default.nix
+++ b/users/jeirmeister/programs/default.nix
@@ -1,19 +1,11 @@
-# users/jeirmeister/programs/default.nix
{ config, pkgs, ... }:
{
imports = [
- ./appimage.nix
- ./direnv.nix
- ./git.nix
- ./gpg.nix
- ./obsidian.nix
- ./ssh.nix
- ./sublime.nix
- ./tailscale.nix
- ./tmux.nix
- ./vscode.nix
- ./vr.nix
- ./zsh.nix
+ ./development
+ ./gaming
+ ./productivity
+ ./shell
+ ./system
];
}
diff --git a/users/jeirmeister/programs/direnv.nix b/users/jeirmeister/programs/direnv.nix
deleted file mode 100644
index b5b324a..0000000
--- a/users/jeirmeister/programs/direnv.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ config, pkgs, ... }:
-
-{
- programs.direnv = {
- enable = true;
- nix-direnv.enable = true;
- enableZshIntegration = true;
- };
-}
\ No newline at end of file
diff --git a/users/jeirmeister/programs/git.nix b/users/jeirmeister/programs/git.nix
deleted file mode 100644
index 7e6ad4b..0000000
--- a/users/jeirmeister/programs/git.nix
+++ /dev/null
@@ -1,32 +0,0 @@
-{ config, pkgs, lib, ... }:
-
-{
- programs.git = {
- enable = true;
- package = pkgs.git; # Explicitly specify git package
- lfs.enable = true;
- userName = "jeirmeister";
- userEmail = "jeir@jeirslab.xyz";
-
- extraConfig = {
- init.defaultBranch = "main";
- pull.rebase = false;
-
- # More explicit credential configuration
- credential = {
- helper = lib.mkForce "${pkgs.git-credential-manager}/bin/git-credential-manager";
- credentialStore = "plaintext";
- interactive = false;
- };
-
- safe.directory = "*";
- };
- };
-
- # Ensure required packages are installed
- home.packages = with pkgs; [
- git-credential-manager
- ];
-
- xdg.enable = true;
-}
\ No newline at end of file
diff --git a/users/jeirmeister/programs/gpg.nix b/users/jeirmeister/programs/gpg.nix
deleted file mode 100644
index cd1f4d1..0000000
--- a/users/jeirmeister/programs/gpg.nix
+++ /dev/null
@@ -1,51 +0,0 @@
-# users/jeirmeister/programs/gpg.nix
-{ config, pkgs, ... }:
-
-{
- programs.gpg = {
- enable = true;
- settings = {
- keyserver = "hkps://keys.openpgp.org";
- # Trust model settings
- trust-model = "tofu+pgp";
- tofu-default-policy = "auto";
- # Better key discovery
- keyserver-options = "auto-key-retrieve";
- # Modern cipher preferences
- personal-cipher-preferences = "AES256 AES192 AES";
- personal-digest-preferences = "SHA512 SHA384 SHA256";
- personal-compress-preferences = "ZLIB BZIP2 ZIP Uncompressed";
- # Default key preferences
- default-preference-list = "SHA512 SHA384 SHA256 AES256 AES192 AES ZLIB BZIP2 ZIP Uncompressed";
- };
- # If you have specific public keys to trust, add them here
- publicKeys = [
- # Example:
- # {
- # source = ./path/to/key.pub;
- # trust = "ultimate";
- # }
- ];
- };
-
- services.gpg-agent = {
- enable = true;
- enableSshSupport = true;
- defaultCacheTtl = 1800;
- maxCacheTtl = 7200;
- # For KDE/Plasma, use pinentry-qt
- pinentryPackage = pkgs.pinentry-qt;
- extraConfig = ''
- allow-preset-passphrase
- allow-loopback-pinentry
- '';
- };
-
- # Make sure we have the right packages
- home.packages = with pkgs; [
- gnupg
- pinentry-qt
- paperkey # Backup GPG keys on paper
- pgpdump # Analyze PGP/GPG keys and packets
- ];
-}
\ No newline at end of file
diff --git a/users/jeirmeister/programs/obsidian.nix b/users/jeirmeister/programs/obsidian.nix
deleted file mode 100644
index 6d530f0..0000000
--- a/users/jeirmeister/programs/obsidian.nix
+++ /dev/null
@@ -1,8 +0,0 @@
-# users/jeirmeister/programs/obsidian.nix
-{ config, pkgs, ... }:
-
-{
- home.packages = with pkgs; [
- obsidian
- ];
-}
diff --git a/users/jeirmeister/programs/ssh.nix b/users/jeirmeister/programs/ssh.nix
deleted file mode 100644
index 3d31bd1..0000000
--- a/users/jeirmeister/programs/ssh.nix
+++ /dev/null
@@ -1,38 +0,0 @@
-# users/jeirmeister/programs/ssh.nix
-{ config, pkgs, ... }:
-
-{
- programs.ssh = {
- enable = true;
-
- extraConfig = ''
- AddKeysToAgent yes
- UseKeychain yes
- IdentitiesOnly yes
- HashKnownHosts yes
- '';
-
- # For better security
- serverAliveInterval = 60;
- serverAliveCountMax = 2;
-
- # Manage known hosts
- userKnownHostsFile = "~/.ssh/known_hosts";
-
- # Example host configurations
- matchBlocks = {
- "github.com" = {
- hostname = "github.com";
- user = "git";
- identityFile = "~/.ssh/github";
- extraOptions = {
- PreferredAuthentications = "publickey";
- };
- };
- "*" = {
- compression = true;
- serverAliveInterval = 60;
- };
- };
- };
-}
\ No newline at end of file
diff --git a/users/jeirmeister/programs/sublime.nix b/users/jeirmeister/programs/sublime.nix
deleted file mode 100644
index 3d066b0..0000000
--- a/users/jeirmeister/programs/sublime.nix
+++ /dev/null
@@ -1,8 +0,0 @@
-# users/jeirmeister/programs/sublime.nix
-{ config, pkgs, ... }:
-
-{
- home.packages = with pkgs; [
- sublime4
- ];
-}
diff --git a/users/jeirmeister/programs/tailscale.nix b/users/jeirmeister/programs/tailscale.nix
deleted file mode 100644
index 4e6da80..0000000
--- a/users/jeirmeister/programs/tailscale.nix
+++ /dev/null
@@ -1,8 +0,0 @@
-# users/jeirmeister/programs/tailscale.nix
-{ config, pkgs, ... }:
-
-{
- home.packages = with pkgs; [
- tailscale
- ];
-}
diff --git a/users/jeirmeister/programs/tmux.nix b/users/jeirmeister/programs/tmux.nix
deleted file mode 100644
index 94c1076..0000000
--- a/users/jeirmeister/programs/tmux.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-# users/jeirmeister/programs/tmux.nix
-{ config, pkgs, ... }:
-
-{
- programs.tmux = {
- enable = true;
- clock24 = true;
- # Add your tmux configurations here
- };
-}
diff --git a/users/jeirmeister/programs/vr.nix b/users/jeirmeister/programs/vr.nix
deleted file mode 100644
index 544c993..0000000
--- a/users/jeirmeister/programs/vr.nix
+++ /dev/null
@@ -1,43 +0,0 @@
-# users/jeirmeister/programs/vr.nix
-{ config, pkgs, ... }:
-
-{
- home.packages = with pkgs; [
- immersed
- ];
-
- systemd.user.services.immersed = {
- Unit = {
- Description = "Immersed VR Client";
- After = [ "graphical-session.target" "network.target" ];
- PartOf = [ "graphical-session.target" ];
- Requires = [ "network.target" ];
- };
-
- Service = {
- Type = "simple";
- ExecStartPre = "${pkgs.coreutils}/bin/sleep 2"; # Give the video device time to initialize
- ExecStart = "${pkgs.immersed}/bin/immersed";
- Environment = [
- "DISPLAY=:0"
- "XDG_CURRENT_DESKTOP=KDE" # Since you're using Plasma
- "QT_QPA_PLATFORM=xcb" # Force X11 mode for better compatibility
- "XDG_RUNTIME_DIR=/run/user/1000"
- "XDG_SESSION_TYPE=x11" # Force X11 mode
- ];
- Restart = "on-failure";
- RestartSec = 5;
- StandardOutput = "journal";
- StandardError = "journal";
- DevicePolicy = "auto";
- };
-
- Install = {
- WantedBy = [ "graphical-session.target" ];
- };
- };
-
- # Create required directories
- home.file.".local/share/immersed/.keep".text = "";
- home.file.".config/immersed/.keep".text = "";
-}
\ No newline at end of file
diff --git a/users/jeirmeister/programs/vscode.nix b/users/jeirmeister/programs/vscode.nix
deleted file mode 100644
index 1be8a8c..0000000
--- a/users/jeirmeister/programs/vscode.nix
+++ /dev/null
@@ -1,57 +0,0 @@
-{ config, pkgs, ... }:
-{
- programs.vscode = {
- enable = true; # Make sure this is enabled
-
- extensions = with pkgs.vscode-extensions; [
- # Essentia
-
- ms-vsliveshare.vsliveshare
-
-
- # Languages
-# bbenoist.nix
- ms-python.python
- rust-lang.rust-analyzer
-
- # Tools
- # eamodio.gitlens
- ms-azuretools.vscode-docker
-
- # Theme & UI
- pkief.material-icon-theme
- dracula-theme.theme-dracula
- ];
-
- userSettings = {
- # Existing settings
- "editor.fontSize" = 14;
- "editor.fontFamily" = "FiraCode Nerd Font";
- "editor.formatOnSave" = true;
- "files.autoSave" = "onFocusChange";
- "workbench.colorTheme" = "Dracula";
- "editor.minimap.enabled" = false;
- "editor.rulers" = [ 80 120 ];
- "files.trimTrailingWhitespace" = true;
- "editor.bracketPairColorization.enabled" = true;
-
- # Git settings
- "git.enabled" = true;
- "git.autofetch" = true;
- "git.confirmSync" = false;
- "git.enableSmartCommit" = true;
- "git.path" = "${pkgs.git}/bin/git";
- "git.openRepositoryInParentFolders" = "never";
-
- # GitLens settings (since you have it installed)
- "gitlens.hovers.currentLine.over" = "line";
- "gitlens.currentLine.enabled" = true;
- "gitlens.hovers.enabled" = true;
- "gitlens.mode.active" = "zen";
-
- # Credential manager integration
- "git.terminalAuthentication" = true;
- "git.credential.helper" = "${pkgs.git-credential-manager}/bin/git-credential-manager";
- };
- };
-}
diff --git a/users/jeirmeister/programs/zsh.nix b/users/jeirmeister/programs/zsh.nix
deleted file mode 100644
index 7805174..0000000
--- a/users/jeirmeister/programs/zsh.nix
+++ /dev/null
@@ -1,28 +0,0 @@
-# users/jeirmeister/programs/zsh.nix
-{ config, pkgs, ... }:
-
-{
- programs.zsh = {
- enable = true;
- autosuggestion.enable = true;
- enableCompletion = true;
- syntaxHighlighting.enable = true;
-
- oh-my-zsh = {
- enable = true;
- theme = "robbyrussell";
- plugins = [ "git" "docker" "kubectl" ];
- };
-
- # Add this section to ensure home-manager paths are properly sourced
- initExtra = ''
- # Add home-manager applications to PATH
- export PATH=$HOME/.nix-profile/bin:$PATH
- '';
- };
-
- # Make zsh the default shell
- home.sessionVariables = {
- SHELL = "${pkgs.zsh}/bin/zsh";
- };
-}
\ No newline at end of file

13
config.json Normal file
View File

@ -0,0 +1,13 @@
{
"users/jeirmeister/programs/development/env/languages/python/default.nix": "{ config, pkgs, ... }:\n\n{\n imports = [\n ./pipenv.nix\n ./poetry.nix\n ./pyenv.nix\n ];\n\n # Base Python installation\n home.packages = with pkgs; [\n python311\n python311Packages.pip\n python311Packages.setuptools\n python311Packages.wheel\n ];\n\n # Common Python environment variables\n home.sessionVariables = {\n PYTHONDONTWRITEBYTECODE = 1;\n PYTHONIOENCODING = \"UTF-8\";\n PYTHONUSERBASE = \"$HOME/.local/python\";\n PATH = \"$PYTHONUSERBASE/bin:$PATH\";\n };\n\n # Create Python user directory\n home.file.\".local/python/.keep\".text = \"\";\n}",
"users/jeirmeister/programs/development/env/languages/python/pipenv.nix": "{ config, pkgs, ... }:\n\n{\n home.packages = with pkgs; [\n python311Packages.pipenv\n ];\n\n home.sessionVariables = {\n PIPENV_VENV_IN_PROJECT = \"1\";\n WORKON_HOME = \"$HOME/.local/share/virtualenvs\";\n PIP_NO_CACHE_DIR = \"off\";\n PIPENV_SKIP_LOCK = \"1\";\n PIPENV_IGNORE_VIRTUALENVS = \"1\";\n PIPENV_MAX_DEPTH = \"5\";\n };\n\n home.file.\".local/share/virtualenvs/.keep\".text = \"\";\n}",
"users/jeirmeister/programs/development/env/languages/python/poetry.nix": "{ config, pkgs, ... }:\n\n{\n home.packages = with pkgs; [\n python311Packages.poetry\n ];\n\n home.sessionVariables = {\n POETRY_VIRTUALENVS_IN_PROJECT = \"true\";\n POETRY_CACHE_DIR = \"$HOME/.cache/pypoetry\";\n POETRY_IGNORE_ENVIRONMENT_VARIABLES = \"1\";\n };\n\n home.file.\".config/pypoetry/config.toml\".text = ''\n [virtualenvs]\n in-project = true\n path = \"{cache-dir}/virtualenvs\"\n create = true\n clear = false\n \n [repositories]\n '';\n}",
"users/jeirmeister/programs/development/env/languages/python/pyenv.nix": "{ config, pkgs, ... }:\n\n{\n home.packages = with pkgs; [\n pyenv\n ];\n\n home.sessionVariables = {\n PYENV_ROOT = \"$HOME/.pyenv\";\n PATH = \"$PYENV_ROOT/bin:$PATH\";\n PYENV_SHELL = \"zsh\";\n PYENV_VIRTUALENV_INIT = \"1\";\n };\n\n home.file.\".pyenv/version\".text = \"system\";\n \n programs.zsh.initExtra = ''\n eval \"$(pyenv init --path)\"\n eval \"$(pyenv virtualenv-init -)\"\n '';\n}",
"users/jeirmeister/programs/development/tools.nix": "{ config, pkgs, ... }:\n\n{\n home.packages = with pkgs; [\n git\n gh\n gnumake\n gcc\n cmake\n # Python development tools\n python311Packages.black\n python311Packages.pylint\n python311Packages.mypy\n python311Packages.pytest\n python311Packages.pytest-cov\n ];\n}",
"users/jeirmeister/packages/repo-to-text.nix": "{ lib\n, python311Packages\n, fetchPypi\n, tree\n}:\n\npython311Packages.buildPythonPackage rec {\n pname = \"repo_to_text\";\n version = \"0.4.2\";\n format = \"setuptools\";\n\n src = fetchPypi {\n pname = \"repo_to_text\";\n inherit version;\n sha256 = \"d2oydJFP6PNUyPVZlrOtCkyMrFZyc1fkGRa/ZnqsCkQ=\";\n };\n\n propagatedBuildInputs = with python311Packages; [\n pyyaml\n pyperclip\n pathspec\n ];\n\n buildInputs = [\n tree\n ];\n\n pythonImportsCheck = [ \"repo_to_text\" ];\n\n meta = with lib; {\n description = \"Convert directory/repository structure and contents into a single text file\";\n homepage = \"https://github.com/kirill-markin/repo-to-text\";\n license = licenses.mit;\n maintainers = [];\n };\n\n postInstall = ''\n mv $out/bin/repo_to_text $out/bin/repo-to-text || true\n '';\n}"
}

30
config.sh Executable file
View File

@ -0,0 +1,30 @@
#!/usr/bin/env bash
set -euo pipefail
# Make sure jq is available
if ! command -v jq &> /dev/null; then
echo "Error: jq is required but not installed"
exit 1
fi
# Make sure config.json exists
if [ ! -f "config.json" ]; then
echo "Error: config.json not found in current directory"
exit 1
fi
echo "Creating directories and files..."
# Process each key in the JSON configuration
for file in $(jq -r 'keys[]' config.json); do
# Create directory if it doesn't exist
dir=$(dirname "$file")
mkdir -p "$dir"
# Write content to file
jq -r --arg file "$file" '.[$file]' config.json > "$file"
echo "Created: $file"
done
echo "Configuration files have been created successfully!"

73
full_status.txt Normal file
View File

@ -0,0 +1,73 @@
On branch main
Your branch is up to date with 'origin/main'.
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
new file: .gitignore
new file: .repo-to-text-settings.yaml
new file: changes.diff
new file: config.json
new file: config.sh
modified: home.nix
new file: status.txt
new file: users/jeirmeister/home.nix
modified: users/jeirmeister/packages/repo-to-text.nix
new file: users/jeirmeister/programs/browsers/default.nix
new file: users/jeirmeister/programs/browsers/floorp.nix
modified: users/jeirmeister/programs/default.nix
new file: users/jeirmeister/programs/development/default.nix
new file: users/jeirmeister/programs/development/docs.nix
new file: users/jeirmeister/programs/development/editors/default.nix
renamed: users/jeirmeister/programs/sublime.nix -> users/jeirmeister/programs/development/editors/sublime.nix
renamed: users/jeirmeister/programs/vscode.nix -> users/jeirmeister/programs/development/editors/vscode.nix
new file: users/jeirmeister/programs/development/env/default.nix
renamed: users/jeirmeister/programs/direnv.nix -> users/jeirmeister/programs/development/env/direnv.nix
new file: users/jeirmeister/programs/development/env/languages/default.nix
new file: users/jeirmeister/programs/development/env/languages/go/default.nix
new file: users/jeirmeister/programs/development/env/languages/go/tools.nix
new file: users/jeirmeister/programs/development/env/languages/javascript/default.nix
new file: users/jeirmeister/programs/development/env/languages/javascript/node.nix
new file: users/jeirmeister/programs/development/env/languages/javascript/pnpm.nix
new file: users/jeirmeister/programs/development/env/languages/javascript/yarn.nix
new file: users/jeirmeister/programs/development/env/languages/python/default.nix
new file: users/jeirmeister/programs/development/env/languages/python/pipenv.nix
new file: users/jeirmeister/programs/development/env/languages/python/poetry.nix
new file: users/jeirmeister/programs/development/env/languages/python/pyenv.nix
new file: users/jeirmeister/programs/development/env/languages/rust/cargo.nix
new file: users/jeirmeister/programs/development/env/languages/rust/default.nix
new file: users/jeirmeister/programs/development/env/languages/rust/rustup.nix
new file: users/jeirmeister/programs/development/tools.nix
new file: users/jeirmeister/programs/gaming/default.nix
renamed: users/jeirmeister/programs/vr.nix -> users/jeirmeister/programs/gaming/vr/default.nix
new file: users/jeirmeister/programs/productivity/bitwarden.nix
new file: users/jeirmeister/programs/productivity/default.nix
renamed: users/jeirmeister/programs/obsidian.nix -> users/jeirmeister/programs/productivity/obsidian.nix
new file: users/jeirmeister/programs/productivity/todoist.nix
new file: users/jeirmeister/programs/shell/default.nix
new file: users/jeirmeister/programs/shell/multiplexers/default.nix
renamed: users/jeirmeister/programs/tmux.nix -> users/jeirmeister/programs/shell/multiplexers/tmux.nix
new file: users/jeirmeister/programs/shell/shells/default.nix
renamed: users/jeirmeister/programs/zsh.nix -> users/jeirmeister/programs/shell/shells/zsh.nix
new file: users/jeirmeister/programs/shell/utilities/default.nix
new file: users/jeirmeister/programs/shell/utilities/files/default.nix
new file: users/jeirmeister/programs/shell/utilities/files/tools.nix
new file: users/jeirmeister/programs/shell/utilities/network/default.nix
new file: users/jeirmeister/programs/shell/utilities/network/tools.nix
new file: users/jeirmeister/programs/shell/utilities/security/default.nix
renamed: users/jeirmeister/programs/gpg.nix -> users/jeirmeister/programs/shell/utilities/security/gpg.nix
renamed: users/jeirmeister/programs/ssh.nix -> users/jeirmeister/programs/shell/utilities/security/ssh.nix
new file: users/jeirmeister/programs/shell/utilities/tools.nix
new file: users/jeirmeister/programs/shell/utilities/version-control/default.nix
renamed: users/jeirmeister/programs/git.nix -> users/jeirmeister/programs/shell/utilities/version-control/git.nix
renamed: users/jeirmeister/programs/appimage.nix -> users/jeirmeister/programs/system/appimage.nix
new file: users/jeirmeister/programs/system/default.nix
renamed: users/jeirmeister/programs/tailscale.nix -> users/jeirmeister/programs/system/tailscale.nix
Untracked files:
(use "git add <file>..." to include in what will be committed)
full_status.txt
Ignored files:
(use "git add -f <file>..." to include in what will be committed)
repo-to-text_2024-10-31-03-10-40-UTC.txt

View File

@ -1,4 +1,3 @@
# home.nix
{ config, pkgs, ... }:
let
@ -13,55 +12,15 @@ in
username = "jeirmeister";
homeDirectory = "/home/jeirmeister";
stateVersion = "24.05";
packages = with pkgs; [
htop
fortune
ripgrep
fd
jq
tree
xclip
bitwarden-desktop
floorp
bitwarden-cli
nix-prefetch-git
(customPackages.repo-to-text) # Try wrapping in parentheses
# Development tools
nodejs
yarn
python3
gcc
rustup
# System tools
btop
neofetch
bat
fzf
# Network tools
mtr
iperf3
nmap
# File management
unzip
p7zip
file
# Documentation & reference
tldr
# Productivity
todoist
todoist-electron
(customPackages.repo-to-text)
];
};
programs.home-manager.enable = true;
nixpkgs = {
config = {
allowUnfree = true;
@ -70,4 +29,4 @@ in
];
};
};
}
}

82
status.txt Normal file
View File

@ -0,0 +1,82 @@
On branch main
Your branch is up to date with 'origin/main'.
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: home.nix
modified: users/jeirmeister/packages/repo-to-text.nix
deleted: users/jeirmeister/programs/appimage.nix
modified: users/jeirmeister/programs/default.nix
deleted: users/jeirmeister/programs/direnv.nix
deleted: users/jeirmeister/programs/git.nix
deleted: users/jeirmeister/programs/gpg.nix
deleted: users/jeirmeister/programs/obsidian.nix
deleted: users/jeirmeister/programs/ssh.nix
deleted: users/jeirmeister/programs/sublime.nix
deleted: users/jeirmeister/programs/tailscale.nix
deleted: users/jeirmeister/programs/tmux.nix
deleted: users/jeirmeister/programs/vr.nix
deleted: users/jeirmeister/programs/vscode.nix
deleted: users/jeirmeister/programs/zsh.nix
Untracked files:
(use "git add <file>..." to include in what will be committed)
.gitignore
.repo-to-text-settings.yaml
changes.diff
config.json
config.sh
status.txt
users/jeirmeister/home.nix
users/jeirmeister/programs/browsers/default.nix
users/jeirmeister/programs/browsers/floorp.nix
users/jeirmeister/programs/development/default.nix
users/jeirmeister/programs/development/docs.nix
users/jeirmeister/programs/development/editors/default.nix
users/jeirmeister/programs/development/editors/sublime.nix
users/jeirmeister/programs/development/editors/vscode.nix
users/jeirmeister/programs/development/env/default.nix
users/jeirmeister/programs/development/env/direnv.nix
users/jeirmeister/programs/development/env/languages/default.nix
users/jeirmeister/programs/development/env/languages/go/default.nix
users/jeirmeister/programs/development/env/languages/go/tools.nix
users/jeirmeister/programs/development/env/languages/javascript/default.nix
users/jeirmeister/programs/development/env/languages/javascript/node.nix
users/jeirmeister/programs/development/env/languages/javascript/pnpm.nix
users/jeirmeister/programs/development/env/languages/javascript/yarn.nix
users/jeirmeister/programs/development/env/languages/python/default.nix
users/jeirmeister/programs/development/env/languages/python/pipenv.nix
users/jeirmeister/programs/development/env/languages/python/poetry.nix
users/jeirmeister/programs/development/env/languages/python/pyenv.nix
users/jeirmeister/programs/development/env/languages/rust/cargo.nix
users/jeirmeister/programs/development/env/languages/rust/default.nix
users/jeirmeister/programs/development/env/languages/rust/rustup.nix
users/jeirmeister/programs/development/tools.nix
users/jeirmeister/programs/gaming/default.nix
users/jeirmeister/programs/gaming/vr/default.nix
users/jeirmeister/programs/productivity/bitwarden.nix
users/jeirmeister/programs/productivity/default.nix
users/jeirmeister/programs/productivity/obsidian.nix
users/jeirmeister/programs/productivity/todoist.nix
users/jeirmeister/programs/shell/default.nix
users/jeirmeister/programs/shell/multiplexers/default.nix
users/jeirmeister/programs/shell/multiplexers/tmux.nix
users/jeirmeister/programs/shell/shells/default.nix
users/jeirmeister/programs/shell/shells/zsh.nix
users/jeirmeister/programs/shell/utilities/default.nix
users/jeirmeister/programs/shell/utilities/files/default.nix
users/jeirmeister/programs/shell/utilities/files/tools.nix
users/jeirmeister/programs/shell/utilities/network/default.nix
users/jeirmeister/programs/shell/utilities/network/tools.nix
users/jeirmeister/programs/shell/utilities/security/default.nix
users/jeirmeister/programs/shell/utilities/security/gpg.nix
users/jeirmeister/programs/shell/utilities/security/ssh.nix
users/jeirmeister/programs/shell/utilities/tools.nix
users/jeirmeister/programs/shell/utilities/version-control/default.nix
users/jeirmeister/programs/shell/utilities/version-control/git.nix
users/jeirmeister/programs/system/appimage.nix
users/jeirmeister/programs/system/default.nix
users/jeirmeister/programs/system/tailscale.nix
no changes added to commit (use "git add" and/or "git commit -a")

View File

@ -0,0 +1,32 @@
{ config, pkgs, ... }:
let
customPackages = import ./users/jeirmeister/packages { inherit pkgs; };
in
{
imports = [
./users/jeirmeister/programs
];
home = {
username = "jeirmeister";
homeDirectory = "/home/jeirmeister";
stateVersion = "24.05";
packages = with pkgs; [
fortune
(customPackages.repo-to-text)
];
};
programs.home-manager.enable = true;
nixpkgs = {
config = {
allowUnfree = true;
permittedInsecurePackages = [
"openssl-1.1.1w"
];
};
};
}

View File

@ -1,31 +1,31 @@
# users/jeirmeister/packages/repo2text.nix
{ lib
, python3Packages
, python311Packages
, fetchPypi
, tree
}:
python3Packages.buildPythonPackage rec {
pname = "repo_to_text"; # Changed to underscore for PyPI
python311Packages.buildPythonPackage rec {
pname = "repo_to_text";
version = "0.4.2";
format = "setuptools";
src = fetchPypi {
pname = "repo_to_text"; # Using underscore here too
pname = "repo_to_text";
inherit version;
sha256 = "d2oydJFP6PNUyPVZlrOtCkyMrFZyc1fkGRa/ZnqsCkQ=";
};
propagatedBuildInputs = with python3Packages; [
propagatedBuildInputs = with python311Packages; [
pyyaml
pyperclip
pathspec
];
buildInputs = [
tree
];
pythonImportsCheck = [ "repo_to_text" ]; # Underscore here too
pythonImportsCheck = [ "repo_to_text" ];
meta = with lib; {
description = "Convert directory/repository structure and contents into a single text file";
@ -34,8 +34,7 @@ python3Packages.buildPythonPackage rec {
maintainers = [];
};
# This ensures the command is available as repo-to-text
postInstall = ''
mv $out/bin/repo_to_text $out/bin/repo-to-text || true
'';
}
}

View File

@ -0,0 +1,7 @@
{ config, pkgs, ... }:
{
imports = [
./floorp.nix
];
}

View File

@ -0,0 +1,7 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
floorp
];
}

View File

@ -1,19 +1,11 @@
# users/jeirmeister/programs/default.nix
{ config, pkgs, ... }:
{
imports = [
./appimage.nix
./direnv.nix
./git.nix
./gpg.nix
./obsidian.nix
./ssh.nix
./sublime.nix
./tailscale.nix
./tmux.nix
./vscode.nix
./vr.nix
./zsh.nix
./development
./gaming
./productivity
./shell
./system
];
}

View File

@ -0,0 +1,10 @@
{ config, pkgs, ... }:
{
imports = [
./editors
./env
./tools.nix
./docs.nix
];
}

View File

@ -0,0 +1,7 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
tldr
];
}

View File

@ -0,0 +1,8 @@
{ config, pkgs, ... }:
{
imports = [
./sublime.nix
./vscode.nix
];
}

View File

@ -1,4 +1,3 @@
# users/jeirmeister/programs/sublime.nix
{ config, pkgs, ... }:
{

View File

@ -1,26 +1,20 @@
{ config, pkgs, ... }:
{
programs.vscode = {
enable = true; # Make sure this is enabled
enable = true;
extensions = with pkgs.vscode-extensions; [
# Essentia
# Existing extensions
ms-vsliveshare.vsliveshare
# Languages
# bbenoist.nix
ms-python.python
rust-lang.rust-analyzer
# Tools
# eamodio.gitlens
ms-azuretools.vscode-docker
# Theme & UI
pkief.material-icon-theme
dracula-theme.theme-dracula
# Add Nix support
jnoortheen.nix-ide # Comprehensive Nix IDE support
# or alternatively: bbenoist.nix
];
userSettings = {
@ -35,7 +29,7 @@
"files.trimTrailingWhitespace" = true;
"editor.bracketPairColorization.enabled" = true;
# Git settings
# Git settings (unchanged)
"git.enabled" = true;
"git.autofetch" = true;
"git.confirmSync" = false;
@ -43,15 +37,30 @@
"git.path" = "${pkgs.git}/bin/git";
"git.openRepositoryInParentFolders" = "never";
# GitLens settings (since you have it installed)
# GitLens settings (unchanged)
"gitlens.hovers.currentLine.over" = "line";
"gitlens.currentLine.enabled" = true;
"gitlens.hovers.enabled" = true;
"gitlens.mode.active" = "zen";
# Credential manager integration
# Credential manager integration (unchanged)
"git.terminalAuthentication" = true;
"git.credential.helper" = "${pkgs.git-credential-manager}/bin/git-credential-manager";
# Nix formatting settings
"nix.enableLanguageServer" = true;
"nix.serverPath" = "nil";
"nix.formatterPath" = "${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt";
"[nix]" = {
"editor.defaultFormatter" = "jnoortheen.nix-ide";
"editor.formatOnSave" = true;
};
};
};
}
# Ensure nixpkgs-fmt is available in the environment
home.packages = with pkgs; [
nixpkgs-fmt
nil # Nix language server
];
}

View File

@ -0,0 +1,8 @@
{ config, pkgs, ... }:
{
imports = [
./direnv.nix
./languages
];
}

View File

@ -0,0 +1,10 @@
{ config, pkgs, ... }:
{
imports = [
./go
./javascript
./python
./rust
];
}

View File

@ -0,0 +1,7 @@
{ config, pkgs, ... }:
{
imports = [
./tools.nix
];
}

View File

@ -0,0 +1,17 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
go
gopls
golangci-lint
delve
];
home.sessionVariables = {
GOPATH = "$HOME/go";
GOBIN = "$HOME/go/bin";
};
home.file."go/bin/.keep".text = "";
}

View File

@ -0,0 +1,9 @@
{ config, pkgs, ... }:
{
imports = [
./node.nix
./pnpm.nix
./yarn.nix
];
}

View File

@ -0,0 +1,17 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
nodejs_20
nodePackages.npm
nodePackages.node-gyp
nodePackages.node-pre-gyp
];
home.sessionVariables = {
NODE_PATH = "$HOME/.npm-packages/lib/node_modules";
NPM_CONFIG_PREFIX = "$HOME/.npm-packages";
};
home.file.".npmrc".text = "prefix=$HOME/.npm-packages";
}

View File

@ -0,0 +1,12 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
nodePackages.pnpm
];
home.file.".pnpmrc".text = "
pnpm-version=8.9.0
store-dir=$HOME/.pnpm-store
";
}

View File

@ -0,0 +1,11 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
yarn
];
home.file.".yarnrc".text = "
cache-folder $HOME/.yarn-cache
";
}

View File

@ -0,0 +1,28 @@
{ config, pkgs, ... }:
{
imports = [
./pipenv.nix
./poetry.nix
./pyenv.nix
];
# Base Python installation
home.packages = with pkgs; [
python311
python311Packages.pip
python311Packages.setuptools
python311Packages.wheel
];
# Common Python environment variables
home.sessionVariables = {
PYTHONDONTWRITEBYTECODE = 1;
PYTHONIOENCODING = "UTF-8";
PYTHONUSERBASE = "$HOME/.local/python";
PATH = "$PYTHONUSERBASE/bin:$PATH";
};
# Create Python user directory
home.file.".local/python/.keep".text = "";
}

View File

@ -0,0 +1,18 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
python311Packages.pipenv
];
home.sessionVariables = {
PIPENV_VENV_IN_PROJECT = "1";
WORKON_HOME = "$HOME/.local/share/virtualenvs";
PIP_NO_CACHE_DIR = "off";
PIPENV_SKIP_LOCK = "1";
PIPENV_IGNORE_VIRTUALENVS = "1";
PIPENV_MAX_DEPTH = "5";
};
home.file.".local/share/virtualenvs/.keep".text = "";
}

View File

@ -0,0 +1,23 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
python311Packages.poetry
];
home.sessionVariables = {
POETRY_VIRTUALENVS_IN_PROJECT = "true";
POETRY_CACHE_DIR = "$HOME/.cache/pypoetry";
POETRY_IGNORE_ENVIRONMENT_VARIABLES = "1";
};
home.file.".config/pypoetry/config.toml".text = ''
[virtualenvs]
in-project = true
path = "{cache-dir}/virtualenvs"
create = true
clear = false
[repositories]
'';
}

View File

@ -0,0 +1,21 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
pyenv
];
home.sessionVariables = {
PYENV_ROOT = "$HOME/.pyenv";
PATH = "$PYENV_ROOT/bin:$PATH";
PYENV_SHELL = "zsh";
PYENV_VIRTUALENV_INIT = "1";
};
home.file.".pyenv/version".text = "system";
programs.zsh.initExtra = ''
eval "$(pyenv init --path)"
eval "$(pyenv virtualenv-init -)"
'';
}

View File

@ -0,0 +1,24 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
cargo
cargo-edit
cargo-watch
cargo-audit
cargo-tarpaulin
];
home.sessionVariables = {
CARGO_HOME = "$HOME/.cargo";
PATH = "$CARGO_HOME/bin:$PATH";
};
home.file.".cargo/config.toml".text = ''
[build]
target-dir = "target"
[cargo-new]
vcs = "git"
'';
}

View File

@ -0,0 +1,8 @@
{ config, pkgs, ... }:
{
imports = [
./cargo.nix
./rustup.nix
];
}

View File

@ -0,0 +1,16 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
rustup
];
home.sessionVariables = {
RUSTUP_HOME = "$HOME/.rustup";
};
home.file.".rustup/settings.toml".text = ''
default_toolchain = "stable"
profile = "default"
'';
}

View File

@ -0,0 +1,17 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
git
gh
gnumake
gcc
cmake
# Python development tools
python311Packages.black
python311Packages.pylint
python311Packages.mypy
python311Packages.pytest
python311Packages.pytest-cov
];
}

View File

@ -0,0 +1,7 @@
{ config, pkgs, ... }:
{
imports = [
./vr
];
}

View File

@ -1,4 +1,3 @@
# users/jeirmeister/programs/vr.nix
{ config, pkgs, ... }:
{

View File

@ -0,0 +1,8 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
bitwarden-desktop
bitwarden-cli
];
}

View File

@ -0,0 +1,9 @@
{ config, pkgs, ... }:
{
imports = [
./obsidian.nix
./bitwarden.nix
./todoist.nix
];
}

View File

@ -1,4 +1,3 @@
# users/jeirmeister/programs/obsidian.nix
{ config, pkgs, ... }:
{

View File

@ -0,0 +1,8 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
todoist
todoist-electron
];
}

View File

@ -0,0 +1,9 @@
{ config, pkgs, ... }:
{
imports = [
./multiplexers
./shells
./utilities
];
}

View File

@ -0,0 +1,7 @@
{ config, pkgs, ... }:
{
imports = [
./tmux.nix
];
}

View File

@ -1,4 +1,3 @@
# users/jeirmeister/programs/tmux.nix
{ config, pkgs, ... }:
{

View File

@ -0,0 +1,7 @@
{ config, pkgs, ... }:
{
imports = [
./zsh.nix
];
}

View File

@ -1,4 +1,3 @@
# users/jeirmeister/programs/zsh.nix
{ config, pkgs, ... }:
{

View File

@ -0,0 +1,11 @@
{ config, pkgs, ... }:
{
imports = [
./security
./version-control
./tools.nix
./network
./files
];
}

View File

@ -0,0 +1,7 @@
{ config, pkgs, ... }:
{
imports = [
./tools.nix
];
}

View File

@ -0,0 +1,9 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
unzip
p7zip
file
];
}

View File

@ -0,0 +1,7 @@
{ config, pkgs, ... }:
{
imports = [
./tools.nix
];
}

View File

@ -0,0 +1,9 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
mtr
iperf3
nmap
];
}

View File

@ -0,0 +1,8 @@
{ config, pkgs, ... }:
{
imports = [
./gpg.nix
./ssh.nix
];
}

View File

@ -1,4 +1,3 @@
# users/jeirmeister/programs/gpg.nix
{ config, pkgs, ... }:
{

View File

@ -1,4 +1,3 @@
# users/jeirmeister/programs/ssh.nix
{ config, pkgs, ... }:
{

View File

@ -0,0 +1,16 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
htop
btop
ripgrep
fd
jq
tree
xclip
bat
fzf
neofetch
];
}

View File

@ -0,0 +1,7 @@
{ config, pkgs, ... }:
{
imports = [
./git.nix
];
}

View File

@ -1,4 +1,3 @@
# users/jeirmeister/programs/appimage.nix
{ config, pkgs, ... }:
{

View File

@ -0,0 +1,8 @@
{ config, pkgs, ... }:
{
imports = [
./appimage.nix
./tailscale.nix
];
}

View File

@ -1,4 +1,3 @@
# users/jeirmeister/programs/tailscale.nix
{ config, pkgs, ... }:
{