feat: add NixOS support, Go, and Ruby on Rails; remove Rust
- Add nixos/ directory with declarative flake.nix and home.nix for NixOS - Make all setup scripts NixOS-aware with proper detection and early exit - Update bashrc, zshrc, and aliases with Go, Ruby on Rails, and Nix profile paths - Replace Rust/Cargo references in shell configs with rbenv/Ruby on Rails - Update README with NixOS quick start and full documentation
This commit is contained in:
167
nixos/flake.nix
Normal file
167
nixos/flake.nix
Normal file
@@ -0,0 +1,167 @@
|
||||
{
|
||||
description = "Blake's NixOS configuration with dev tooling";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, home-manager, ... }@inputs:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
in {
|
||||
# ── System-level configuration ──────────────────────────
|
||||
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
({ pkgs, ... }: {
|
||||
# ---- Core system ----
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
networking.hostName = "nixos";
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
time.timeZone = "America/Chicago";
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
# ── Users ──────────────────────────────────────────
|
||||
users.users.blake = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" "networkmanager" "docker" "libvirtd" ];
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
|
||||
# ── System packages ────────────────────────────────
|
||||
environment.systemPackages = with pkgs; [
|
||||
# Shell & terminal
|
||||
zsh
|
||||
zsh-completions
|
||||
tmux
|
||||
oh-my-posh
|
||||
nushell
|
||||
eza
|
||||
bat
|
||||
fzf
|
||||
zoxide
|
||||
ripgrep
|
||||
fd
|
||||
jq
|
||||
tldr
|
||||
unzip
|
||||
wget
|
||||
curl
|
||||
|
||||
# Development - Go
|
||||
go
|
||||
gopls
|
||||
delve
|
||||
|
||||
# Development - Ruby on Rails
|
||||
ruby
|
||||
bundler
|
||||
nodejs
|
||||
yarn
|
||||
rbenv
|
||||
|
||||
# Development - Python
|
||||
python3
|
||||
python3Packages.pip
|
||||
python3Packages.virtualenv
|
||||
|
||||
# Cloud / DevOps
|
||||
kubectl
|
||||
k9s
|
||||
minikube
|
||||
terraform
|
||||
helm
|
||||
kubectx
|
||||
stern
|
||||
dive
|
||||
trivy
|
||||
ansible
|
||||
awscli2
|
||||
direnv
|
||||
|
||||
# Networking
|
||||
nmap
|
||||
mtr
|
||||
tcpdump
|
||||
socat
|
||||
whois
|
||||
iperf3
|
||||
traceroute
|
||||
bind
|
||||
|
||||
# System
|
||||
btop
|
||||
fastfetch
|
||||
virt-manager
|
||||
flatpak
|
||||
docker
|
||||
docker-compose
|
||||
|
||||
# HTTP
|
||||
httpie
|
||||
|
||||
# Git
|
||||
git
|
||||
gh
|
||||
|
||||
# Neovim
|
||||
neovim
|
||||
];
|
||||
|
||||
# ── Flatpak ────────────────────────────────────────
|
||||
services.flatpak.enable = true;
|
||||
|
||||
# ── Docker ─────────────────────────────────────────
|
||||
virtualisation.docker.enable = true;
|
||||
|
||||
# ── Virtualisation (virt-manager) ──────────────────
|
||||
virtualisation.libvirtd.enable = true;
|
||||
|
||||
# ── Fonts ──────────────────────────────────────────
|
||||
fonts.packages = with pkgs; [
|
||||
nerd-fonts.hack
|
||||
nerd-fonts.fira-code
|
||||
];
|
||||
|
||||
# ── Programs ───────────────────────────────────────
|
||||
programs.fish.enable = true; # some scripts may need /bin/fish
|
||||
programs.zsh.enable = true;
|
||||
programs.direnv.enable = true;
|
||||
|
||||
# ── Nix settings ───────────────────────────────────
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
|
||||
# ── Security ───────────────────────────────────────
|
||||
services.openssh.enable = true;
|
||||
|
||||
# ── Neovim default editor ──────────────────────────
|
||||
environment.variables.EDITOR = "nvim";
|
||||
|
||||
system.stateVersion = "24.11";
|
||||
})
|
||||
];
|
||||
};
|
||||
|
||||
# ── Home-manager user configuration ────────────────────
|
||||
homeConfigurations.blake = home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
modules = [
|
||||
./home.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user