Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View bsima's full-sized avatar
drinking coffee

Ben Sima bsima

drinking coffee
View GitHub Profile
- system: `"x86_64-linux"`
- host os: `Linux 4.15.0-1037-gcp, Ubuntu, 16.04.6 LTS (Xenial Xerus)`
- multi-user?: `yes`
- sandbox: `relaxed`
- version: `nix-env (Nix) 2.2`
- channels(root): `"nixpkgs-19.09pre186545.f11ce8683e1"`
- nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixpkgs`
@bsima
bsima / error.md
Created January 17, 2019 20:11
haskell, cabal, nix err

cabal file

name: hero-server
version: 2
license: AllRightsReserved
license-file: LICENSE
cabal-version: >= 1.18
build-type: Simple
ben@neb:~$ curl -I https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png
HTTP/2 200
accept-ranges: bytes
content-type: image/png
content-length: 5969
date: Fri, 13 Jul 2018 21:52:02 GMT
expires: Fri, 13 Jul 2018 21:52:02 GMT
cache-control: private, max-age=31536000
last-modified: Thu, 08 Dec 2016 01:00:57 GMT
x-content-type-options: nosniff
#!/usr/bin/env stack
-- stack --nix --resolver lts-11.7 script
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
import Data.List
import Control.Monad
import Control.Exception (assert)
[ben@lithium:~/src/pprjam]$ nixops modify -d pprjam ops/production.nix && nixops deploy -d pprjam
Warning: Permanently added '138.68.225.65' (ED25519) to the list of known hosts.
building all machine configurations...
building path(s) ‘/nix/store/jz1rq5fvi19idr126fpfj9c2sf1bal87-pprjam’
unpacking sources
unpacking source archive /nix/store/7f0rfvihfq5qlckls5rrxiazi7ifhra8-pprjam
source root is pprjam
patching sources
generated pprjam.cabal
installing
@bsima
bsima / production.nix
Last active December 8, 2019 22:41
production.nix
{
resources.sshKeyPairs.ssh-key = {};
pprjam =
{ config, pkgs, ... }:
let
pprjam = (import ../release.nix { inherit pkgs; }).pprjam // {
preInstall = ''
echo "======================================================="
echo "======================================================="
case msg of
AddUserResponse newUsers ->
let
(newUserList, cmd) =
RemoteData.update \(ls -> (List.append ls newUsers, Cmd.none)) model.users
in
( { model | users = newUserList }, cmd )
----
type alias VenueId =
String
type alias Venue =
{ id : VenueId
, name : String
}
type alias HappyHour =