working almost

This commit is contained in:
Tyler Mac
2026-08-20 08:47:54 -04:00
parent 86120dcd8d
commit 924cdb2e08
8 changed files with 249 additions and 364 deletions
+31
View File
@@ -0,0 +1,31 @@
# Alacritty configuration - simple but functional
font:
normal:
family: JetBrainsMono Nerd Font
size: 12.0
colors:
primary:
background: "0x1e1e2e"
foreground: "0xf8f8f2"
cursor:
text: "0x1e1e2e"
cursor: "0xf8f8f2"
normal:
black: "0x1e1e2e"
red: "0xf84a50"
green: "0x7ab872"
yellow: "0xf59850"
blue: "0x5192db"
magenta: "0xb775d9"
cyan: "0x54cecd"
white: "0xf8f8f2"
bright:
black: "0x1e1e2e"
red: "0xf84a50"
green: "0x7ab872"
yellow: "0xf59850"
blue: "0x5192db"
magenta: "0xb775d9"
cyan: "0x54cecd"
white: "0xf8f8f2"
+4
View File
@@ -0,0 +1,4 @@
[core]
editor = hx
[push]
default = current
+8
View File
@@ -0,0 +1,8 @@
# Starship configuration - modern prompt
add_newline = false
command_timeout = 1000
format = "$all"
right_format = "$time"
[time]
format = "%T"
disabled = false
+5
View File
@@ -0,0 +1,5 @@
# Tmux configuration - base settings
set -g clock24 on
set -g history-limit 10000
set -g mouse on
set -g default-shell /run/current-system/sw/bin/zsh
+13
View File
@@ -0,0 +1,13 @@
# ZSH configuration that works with Nix
# This file should be sourced from your shell config
# Aliases
alias g="git"
alias docker="docker"
alias h="htop"
# Path setup for Nix packages
export PATH="/nix/var/nix/profiles/default/bin:$PATH"
# Enable syntax highlighting
ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets)
Generated
+96 -41
View File
@@ -16,13 +16,32 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils": { "flake-compat_2": {
"flake": false,
"locked": { "locked": {
"lastModified": 1644229661, "lastModified": 1650374568,
"narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", "narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "b4a34015c698c7793d592d66adbab377907a2be8",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1694529238,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797", "rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -35,6 +54,25 @@
"inputs": { "inputs": {
"flake-utils": "flake-utils" "flake-utils": "flake-utils"
}, },
"locked": {
"lastModified": 1715533576,
"narHash": "sha256-fT4ppWeCJ0uR300EH3i7kmgRZnAVxrH+XtK09jQWihk=",
"owner": "gytis-ivaskevicius",
"repo": "flake-utils-plus",
"rev": "3542fe9126dc492e53ddd252bb0260fe035f2c0f",
"type": "github"
},
"original": {
"owner": "gytis-ivaskevicius",
"repo": "flake-utils-plus",
"rev": "3542fe9126dc492e53ddd252bb0260fe035f2c0f",
"type": "github"
}
},
"flake-utils-plus_2": {
"inputs": {
"flake-utils": "flake-utils_2"
},
"locked": { "locked": {
"lastModified": 1657226504, "lastModified": 1657226504,
"narHash": "sha256-GIYNjuq4mJlFgqKsZ+YrgzWm0IpA4axA3MCrdKYj7gs=", "narHash": "sha256-GIYNjuq4mJlFgqKsZ+YrgzWm0IpA4axA3MCrdKYj7gs=",
@@ -49,42 +87,22 @@
"type": "github" "type": "github"
} }
}, },
"home-manager": { "flake-utils_2": {
"inputs": {
"nixpkgs": "nixpkgs"
},
"locked": { "locked": {
"lastModified": 1719827415, "lastModified": 1644229661,
"narHash": "sha256-pvh+1hStXXAZf0sZ1xIJbWGx4u+OGBC1rVx6Wsw0fBw=", "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=",
"owner": "nix-community", "owner": "numtide",
"repo": "home-manager", "repo": "flake-utils",
"rev": "f2e3c19867262dbe84fdfab42467fc8dd83a2005", "rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "numtide",
"ref": "release-23.11", "repo": "flake-utils",
"repo": "home-manager",
"type": "github" "type": "github"
} }
}, },
"nixpkgs": { "nixpkgs": {
"locked": {
"lastModified": 1705331948,
"narHash": "sha256-qjQXfvrAT1/RKDFAMdl8Hw3m4tLVvMCc8fMqzJv0pP4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b8dd8be3c790215716e7c12b247f45ca525867e2",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-23.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1787070829, "lastModified": 1787070829,
"narHash": "sha256-vXNVDVtvfiQuXthP0NHPFdNvvMTkGpx0UP8oddIWbNk=", "narHash": "sha256-vXNVDVtvfiQuXthP0NHPFdNvvMTkGpx0UP8oddIWbNk=",
@@ -100,7 +118,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_3": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1687596132, "lastModified": 1687596132,
"narHash": "sha256-snkoTnUJQICNvg7b+DfxPLnIen6FIucM95niW95vTJI=", "narHash": "sha256-snkoTnUJQICNvg7b+DfxPLnIen6FIucM95niW95vTJI=",
@@ -118,17 +136,17 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"home-manager": "home-manager", "nixpkgs": "nixpkgs",
"nixpkgs": "nixpkgs_2", "snowfall-lib": "snowfall-lib",
"tmux-flake": "tmux-flake" "tmux": "tmux"
} }
}, },
"snowfall": { "snowfall": {
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat_2",
"flake-utils-plus": "flake-utils-plus", "flake-utils-plus": "flake-utils-plus_2",
"nixpkgs": [ "nixpkgs": [
"tmux-flake", "tmux",
"nixpkgs" "nixpkgs"
] ]
}, },
@@ -147,9 +165,46 @@
"type": "github" "type": "github"
} }
}, },
"tmux-flake": { "snowfall-lib": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_3", "flake-compat": "flake-compat",
"flake-utils-plus": "flake-utils-plus",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1784328457,
"narHash": "sha256-4R5WV74NHhPk21ctoPmjL7nQ6txDnoBLwSWULvIw0TY=",
"owner": "snowfallorg",
"repo": "lib",
"rev": "6ee3542cb459ca4b038cfe50ceb8797f05cdabad",
"type": "github"
},
"original": {
"owner": "snowfallorg",
"repo": "lib",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"tmux": {
"inputs": {
"nixpkgs": "nixpkgs_2",
"snowfall": "snowfall", "snowfall": "snowfall",
"unstable": "unstable" "unstable": "unstable"
}, },
+92 -29
View File
@@ -3,41 +3,104 @@
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager = { snowfall-lib = {
url = "github:nix-community/home-manager/release-23.11"; url = "github:snowfallorg/lib";
inputs.nixpkgs.follows = "nixpkgs";
}; };
tmux-flake = { tmux = {
url = "github:jakehamilton/tmux"; url = "github:jakehamilton/tmux";
}; };
}; };
outputs = { self, nixpkgs, home-manager, tmux-flake }: outputs = inputs:
let inputs.snowfall-lib.mkFlake {
system = "aarch64-darwin"; inherit inputs;
pkgs = import nixpkgs { src = ./.;
inherit system;
config = { overlays = with inputs; [
allowUnfree = true; tmux.overlay
tmux.overlays."nixpkgs/plusultra"
];
# Build the package set for the homies environment
packages = {
homies = let
pkgs = import inputs.nixpkgs {
system = "x86_64-linux"; # Default, will be overridden by system-specific builds
};
in
pkgs.buildEnv {
name = "homies";
paths = with pkgs; [
# Core tools
tmux
helix
zsh
git
openssh
# Terminal applications
alacritty
starship
htop
# Docker support
docker-client
docker-compose
# Programming languages and language servers (default always included)
odin
ols # Odin Language Server
harper # Harper Language Server
# Additional dev tools
gcc
gnumake
curl
wget
jq
ripgrep
findutils
# Language support packages (optional ones you can enable conditionally)
rustc # For enabling Rust support
rust-analyzer # For Rust LSP
python3 # For Python support
python3Packages.pyright # For Python LSP
nodejs # For JavaScript/TypeScript support
nodePackages.typescript-language-server # For TS LSP
go # For Go support
gopls # For Go LSP
openjdk # For Java support
jdt.ls # For Java LSP
];
};
};
# System-specific configuration
systemConfigs = {
# x86_64-linux system config
"x86_64-linux" = { pkgs, ... }: {
# This is where you'd define system-specific configurations
# But in pure Nix, packages are handled through the packages attribute above
};
# aarch64-linux system config (ARM Mac/Linux)
"aarch64-linux" = { pkgs, ... }: {
};
# darwin (MacOS) system config
"aarch64-darwin" = { pkgs, ... }: {
};
# x86_64-darwin (Intel Mac) system config
"x86_64-darwin" = { pkgs, ... }: {
}; };
}; };
in {
# Use tmux from jakehamilton/tmux repository # Make the packages available in the flake
homeConfigurations."tylerbohrer" = home-manager.lib.homeManagerConfiguration { # This is what users will run to build/install homies
pkgs = pkgs; # nix build .#homies
modules = [ # nix profile install .#homies
({ pkgs, ... }: {
# Use the tmux package from jakehamilton/tmux repository
programs.tmux.package = tmux-flake.packages.${system}.tmux;
# Set the required Home Manager options
home.username = "tylerbohrer";
home.homeDirectory = "/Users/tylerbohrer";
home.stateVersion = "23.11";
# Include all other settings from the original home.nix
imports = [ ./home-manager/home.nix ];
})
];
};
}; };
} }
-294
View File
@@ -1,294 +0,0 @@
{ pkgs, tmuxPackage ? null, ... }:
let
# Define programming language support options with comprehensive configuration
supportedLanguages = {
# Default languages that are always included for basic functionality
odin = {
enable = true;
package = pkgs.odin;
languageServer = pkgs.ols;
lspName = "ols";
description = "Odin programming language with OLS";
};
harper = {
enable = true;
package = pkgs.harper;
languageServer = pkgs.harper;
lspName = "harper";
description = "Harper language with Harper Language Server";
};
# Optional languages that can be conditionally enabled
rust = {
enable = false;
package = pkgs.rustc;
languageServer = pkgs.rust-analyzer;
lspName = "rust-analyzer";
description = "Rust programming language with rust-analyzer";
};
python = {
enable = false;
package = pkgs.python3;
languageServer = pkgs.python3Packages.pyright;
lspName = "pyright";
description = "Python programming language with Pyright";
};
javascript = {
enable = false;
package = pkgs.nodejs;
languageServer = pkgs.nodePackages.typescript-language-server;
lspName = "typescript-language-server";
description = "JavaScript/TypeScript with TypeScript Language Server";
};
go = {
enable = false;
package = pkgs.go;
languageServer = pkgs.gopls;
lspName = "gopls";
description = "Go programming language with gopls";
};
java = {
enable = false;
package = pkgs.openjdk;
languageServer = pkgs.jdt.ls;
lspName = "jdt.ls";
description = "Java programming language with JDT Language Server";
};
};
# Helper function to get activated language packages
getActivatedLanguages =
builtins.filter (name: supportedLanguages.${name}.enable) (builtins.attrNames supportedLanguages);
# Helper function to get all language packages for activation
getAllLanguagePackages =
(builtins.map (lang: supportedLanguages.${lang}.package) (getActivatedLanguages))
++ (builtins.map (lang: supportedLanguages.${lang}.languageServer) (getActivatedLanguages));
# Helper function to generate language server configuration sections
generateLanguageServerConfig =
(builtins.concatMap (lang:
if supportedLanguages.${lang}.enable then
[
''[[languages.${lang}]]''
''language-server = { name = "${supportedLanguages.${lang}.lspName}", command = "${supportedLanguages.${lang}.lspName}" }''
]
else
[]
) (getActivatedLanguages));
# Get all activated language servers for PATH
getLanguageServerPaths =
(builtins.map (lang: "${supportedLanguages.${lang}.languageServer}/bin") (getActivatedLanguages));
in
{
# Home Manager configuration for cross-platform use (WSL, Linux, Mac M1)
# Enable Home Manager
programs.home-manager.enable = true;
# Package configuration - these will work across all platforms
home.packages = with pkgs; [
# Core tools
tmux
helix
zsh
git
openssh
# Terminal applications
alacritty
starship
htop
# Docker support
docker-client
docker-compose
# Programming languages and language servers (default always included)
# These are the core tools that are always enabled
odin
ols # Odin Language Server
harper # Harper Language Server
# Additional dev tools
gcc
gnumake
curl
wget
jq
ripgrep
findutils
] ++ getAllLanguagePackages;
# Zsh configuration
programs.zsh = {
enable = true;
syntaxHighlighting.enable = true;
oh-my-zsh = {
enable = true;
theme = "agnoster";
};
# Zshrc configuration
shellAliases = {
"ls" = "eza";
"g" = "git";
"docker" = "docker";
"h" = "htop";
};
};
# Tmux configuration - base settings
programs.tmux = {
enable = true;
clock24 = true;
historyLimit = 10000;
mouse = true;
# Basic tmux configuration file
shell = "zsh";
# Use the tmux package from jakehamilton/tmux
package = tmuxPackage;
};
# Git configuration
programs.git = {
enable = true;
userName = "Your Name";
userEmail = "your.email@example.com";
extraConfig = {
core.editor = "hx";
push.default = "current";
};
};
# SSH configuration
programs.ssh = {
enable = true;
};
# Alacritty configuration - simple but functional
programs.alacritty = {
enable = true;
settings = {
font = {
normal.family = "JetBrainsMono Nerd Font";
size = 12.0;
};
colors = {
primary = {
background = "0x1e1e2e";
foreground = "0xf8f8f2";
};
cursor = {
text = "0x1e1e2e";
cursor = "0xf8f8f2";
};
normal = {
black = "0x1e1e2e";
red = "0xf84a50";
green = "0x7ab872";
yellow = "0xf59850";
blue = "0x5192db";
magenta = "0xb775d9";
cyan = "0x54cecd";
white = "0xf8f8f2";
};
bright = {
black = "0x1e1e2e";
red = "0xf84a50";
green = "0x7ab872";
yellow = "0xf59850";
blue = "0x5192db";
magenta = "0xb775d9";
cyan = "0x54cecd";
white = "0xf8f8f2";
};
};
};
};
# Starship configuration - modern prompt
programs.starship = {
enable = true;
settings = {
add_newline = false;
command_timeout = 1000;
format = "$all";
right_format = "$time";
time = {
format = "%T";
disabled = false;
};
};
};
# Helix - main editor with language server support
programs.helix = {
enable = true;
};
# Create Helix config with language servers for all activated languages
home.file.".config/helix/config.toml".text = ''
# Helix Configuration with Language Servers
[editor]
theme="peachpuff"
[editor.file-picker]
hidden = true
[editor]
line-number = "relative"
[editor.cursor-shape]
insert = "bar"
normal = "block"
select = "underline"
[editor.lsp]
enable = true
auto-start = true
[language-server.harper-ls]
command = "harper-ls"
args = ["--stdio"]
[language-server.harper-ls.config.harper-ls.linters]
SpellCheck = false
SentenceCapitalization = false
[language-server.ols]
command = "ols"
args = []
[[language]]
name = "odin"
language-servers = ["ols", "harper-ls"]
# Dynamically added language servers based on user selection
${builtins.concatStringsSep "\n" (generateLanguageServerConfig)}
'';
# Environment variables
home.sessionVariables = {
EDITOR = "hx";
VISUAL = "hx";
};
# Ensure proper PATH for language servers
home.sessionPath = [
"${pkgs.odin}/bin"
"${pkgs.ols}/bin"
"${pkgs.harper}/bin"
"${pkgs.docker-client}/bin"
] ++ getLanguageServerPaths;
# Create directory structure for configs
home.activation = {
createDirs = ''
mkdir -p $HOME/.config/helix
'';
};
}