DEVELOPMENT ENVIRONMENT

~liljamo/tixe

c21270e94b3a035270dc08352585b62c0bf74bcc — Jonni Liljamo 1 year, 3 months ago ba663ae
feat: add a flake and a dev env for me
4 files changed, 54 insertions(+), 1 deletions(-)

M dev.elv
A flake.lock
A flake.nix
A shell.elv
M dev.elv => dev.elv +1 -1
@@ 1,4 1,4 @@
#!/bin/elvish
#!/usr/bin/env elvish

fn run {
    clear

A flake.lock => flake.lock +27 -0
@@ 0,0 1,27 @@
{
  "nodes": {
    "nixpkgs": {
      "locked": {
        "lastModified": 1692067901,
        "narHash": "sha256-kq8Pf/nmlXECDWMkQSRGQkjWsA6G0pjzZkfUEaTmXJE=",
        "owner": "nixos",
        "repo": "nixpkgs",
        "rev": "ea95c0917609e5c48023cc7c6141bea2fdf13970",
        "type": "github"
      },
      "original": {
        "owner": "nixos",
        "ref": "nixpkgs-unstable",
        "repo": "nixpkgs",
        "type": "github"
      }
    },
    "root": {
      "inputs": {
        "nixpkgs": "nixpkgs"
      }
    }
  },
  "root": "root",
  "version": 7
}

A flake.nix => flake.nix +24 -0
@@ 0,0 1,24 @@
{
  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
  };

  outputs = { self, nixpkgs }:
  let
    pkgs = nixpkgs.legacyPackages.x86_64-linux.pkgs;
  in
  {
    devShells.x86_64-linux.default = pkgs.mkShell {
      buildInputs = with pkgs; [
        go
        gopls

        nodePackages.tailwindcss
      ];
      shellHook = ''
      elvish -rc ./shell.elv
      exit
      '';
    };
  };
}

A shell.elv => shell.elv +2 -0
@@ 0,0 1,2 @@
#!/usr/bin/env elvish
set edit:prompt = { tilde-abbr $pwd; styled ' (tixe devshell) ' green; styled '> ' }