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.

Revisions

  1. webframp revised this gist Oct 6, 2023. 1 changed file with 34 additions and 0 deletions.
    34 changes: 34 additions & 0 deletions shell.nix
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,34 @@
    # 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"; };
    }
  2. webframp created this gist Oct 6, 2023.
    26 changes: 26 additions & 0 deletions flake.nix
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    {
    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; };
    });

    }