Skip to content

Instantly share code, notes, and snippets.

:octocat:

Wael Nasreddine kalbasit

:octocat:
Block or report user

Report or block kalbasit

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View aws.nix
resources = {
ec2SecurityGroups = rec {
ssh-in = {
inherit accessKeyId region;
description = "Allow incoming SSH connection from anywhere";
rules = [
{ fromPort = 22; toPort = 22; protocol = "tcp"; sourceIp = "0.0.0.0/0"; }
# TODO(low): https://github.com/NixOS/nixops/issues/683
# {fromPort = 22; toPort = 22; protocol = "tcp"; sourceIp = "::/0"; }
View aws.nix
{
resources.ec2SecurityGroups.ssh-in = {
inherit accessKeyId region;
description = "Allow incoming SSH connection from anywhere";
rules = [
{ fromPort = 22; toPort = 22; protocol = "tcp"; sourceIp = "0.0.0.0/0"; }
# TODO(low): https://github.com/NixOS/nixops/issues/683
# {fromPort = 22; toPort = 22; protocol = "tcp"; sourceIp = "::/0"; }
];
};
View nix-repl.sh-session
λ  nix repl
Welcome to Nix version 2.1.3. Type :? for help.
nix-repl> pkgs = import <nixpkgs> {}
nix-repl> transform = with pkgs; with pkgs.lib; let transformType = with types; let list3 = elemType: addCheck (listOf elemType) (l: length l != 3); in uniq (list3 (list3 float)); in mkOption { type = transformType; description = "3×3 matrix of floating point numbers"; default = []; example = [ [ 0.6 0.0 0.0 ] [ 0.0 0.6 0.0 ] [ 0.0 0.0 1.0 ] ]; }
View configuration.nix
# neither A nor B is working. I don't see this in the activation script or under `result/etc/`
{
# A
system.activationScripts = {
nixpkgsPin = {
text = ''
ln -sfn ${pinnedNixpkgs} /etc/nixpkgs
'';
deps = [];
View shell.nix
# This allows overriding nixpkgs by passing `--arg pkgs ...`
{ pkgs ? import ./devtools/lib/nix/nixpkgs.nix {}
, lib ? pkgs.lib
}:
with pkgs;
with lib;
let
View gist:f46243b4c3860b9d19fe9c82524780db
pure  λ  bundle  ~/c/k/s/P/src/b/k/k2_web   PLATF-337 ●  ✍ keeptruckin@PLATF-337  SIGINT(2) ↵  INSERT
There was an error accessing `/nix/store/grx8bgdbgwqngn61bc9z4cqq9pkl1aq1-gemfile-and-lockfile/.bundle/config`.
The underlying system error is Errno::EROFS: Read-only file system @ dir_s_mkdir - /nix/store/grx8bgdbgwqngn61bc9z4cqq9pkl1aq1-gemfile-and-lockfile/.bundle
pure  λ  bundle lock  ~/c/k/s/P/src/b/k/k2_web   PLATF-337 ●  ✍ keeptruckin@PLATF-337  32 ↵  INSERT
Following files may not be w
View shell.nix
# This allows overriding nixpkgs by passing `--arg pkgs ...`
{ pkgs ? import ./devtools/lib/nix/nixpkgs.nix {}
, lib ? pkgs.lib
}:
with pkgs;
with lib;
let
View nixpkgs.nix
$ nixos-rebuild -I nixpkgs=./external/nixpkgs-stable.nix build
building Nix...
building the system configuration...
error: anonymous function at /yl/code/personal/stories/shabka_pin-nixpkgs/src/github.com/kalbasit/shabka/external/nixpkgs-stable.nix:1:1 called with unexpected argument 'system', at /nix/store/gbmr238hsi0davrk8k6syqqj8824s167-home-manager-235a6617c46b4267d4f67cde9a93dbef0f12bd3f/modules/misc/nixpkgs.nix:52:11
(use '--show-trace' to show detailed location information)
$ nix-shell -I nixpkgs=./external/nixpkgs-stable.nix -p jq --run 'jq --version'
jq-1.5
View keybase.md

Keybase proof

I hereby claim:

  • I am kalbasit on github.
  • I am ylcodes (https://keybase.io/ylcodes) on keybase.
  • I have a public key ASAmEfNlKYs8pm3I4o6PVIXxrTpHvuBkErmsk1GAutGExQo

To claim this, I am signing this object:

View releases.diff
diff -Naur not-generated/.gitignore generated/.gitignore
--- not-generated/.gitignore 1969-12-31 16:00:00.000000000 -0800
+++ generated/.gitignore 2018-11-30 11:35:52.149183398 -0800
@@ -0,0 +1,27 @@
+*.annot
+*.cmo
+*.cma
+*.cmi
+*.a
+*.o
You can’t perform that action at this time.