Skip to content

Instantly share code, notes, and snippets.

@webframp
Last active October 6, 2023 05:43
Show Gist options
  • Save webframp/ef1fee698ee382457d5d46d17f5457f9 to your computer and use it in GitHub Desktop.
Save webframp/ef1fee698ee382457d5d46d17f5457f9 to your computer and use it in GitHub Desktop.
trying out a team tooling flake
{
description = "some nix based tooling";
inputs = {
# Default to nixpkgs unstable channel - ensure we have access to latest tools
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
# Pure Nix flake utility functions, can simplify some tasks
flake-utils.url = "github:numtide/flake-utils";
};
nixConfig.bash-prompt =
"$(hostname -s | tr '[A-Z]' '[a-z]') \\[\\e[38;5;81m\\]\\w\\[\\e[0m\\]\\n\\[\\e[0m\\]$ ";
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
# pkgs is based on the way it's used here: https://github.com/Misterio77/nix-starter-configs/tree/main/standard/pkgs
packages = import ./pkgs { inherit pkgs; };
allpackages = ( pkgs // packages);
in {
devShells.default = pkgs.callPackage ./shell.nix { inherit allpackages; };
});
}
# Shell for bootstrapping flake-enabled nix and home-manager
# Use: nix develop
{ allpackages }:
with allpackages;
mkShell {
packages = [
awscli2
bash
bat
eza
fd
fzf
git
granted
jq
nix
neovim
ripgrep
tmux
# custom packages that live in this repo
# package names will override any that live upstream
iamlive
];
shellHook = ''
alias ls='eza'
alias ll='ls -l'
echo "Welcome to the dev shell"
'';
env = { AWS_DEFAULT_REGION = "us-east-1"; };
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment