Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:

Wael Nasreddine kalbasit

:octocat:
View GitHub Profile
View gist:1b8436e3c8b49a3e176b90e75f79f6e6
(_: topSuper: {
lib = topSuper.lib.extend(self: super: {
mkOption = { auto-enable ? true, ... }@attrs:
let
attrs' = builtins.removeAttrs attrs [ "auto-enable" ];
in
(super.mkOption attrs') // { inherit auto-enable; };
});
})
View overlays.nix
while evaluating the attribute 'xorg' at /nix/store/rdsir7xmi2fgyk64idk2zxir0bcj6w41-nixpkgs-base-0419d983480a3dbc8583ac55c3dc849d2f65ccc2/pkgs/top-level/all-packages.nix:14990:3:
while evaluating 'recurseIntoAttrs' at /nix/store/rdsir7xmi2fgyk64idk2zxir0bcj6w41-nixpkgs-base-0419d983480a3dbc8583ac55c3dc849d2f65ccc2/pkgs/top-level/all-packages.nix:67:22, called from /nix/store/rdsir7xmi2fgyk64idk2zxir0bcj6w41-nixpkgs-base-0419d983480a3dbc8583ac55c3dc849d2f65ccc2/pkgs/top-level/all-packages.nix:14990:10:
while evaluating 'callPackageWith' at /nix/store/rdsir7xmi2fgyk64idk2zxir0bcj6w41-nixpkgs-base-0419d983480a3dbc8583ac55c3dc849d2f65ccc2/lib/customisation.nix:108:35, called from /nix/store/rdsir7xmi2fgyk64idk2zxir0bcj6w41-nixpkgs-base-0419d983480a3dbc8583ac55c3dc849d2f65ccc2/pkgs/top-level/all-packages.nix:14990:29:
while evaluating 'makeOverridable' at /nix/store/rdsir7xmi2fgyk64idk2zxir0bcj6w41-nixpkgs-base-0419d983480a3dbc8583ac55c3dc849d2f65ccc2/lib/customisation.nix:67:24, called from /nix/store/rdsir7xmi2
@kalbasit
kalbasit / Gemfile
Last active May 20, 2020 — forked from jdennes/Gemfile
Export a list of members from a GitHub organisation
View Gemfile
source "https://rubygems.org"
gem "octokit"
@kalbasit
kalbasit / full.nix
Last active Mar 15, 2020
Set all options named 'enable' to true
View full.nix
{ lib, options, ... }:
with lib;
{
config = mapAttrsRecursiveCond
(attrs: ! isOption attrs)
(path: value: mkIf (last path == "enable") true)
{ inherit (options) myOptions; };
}
View .tmux.conf
# ============================================= #
# Start with defaults from the Sensible plugin #
# --------------------------------------------- #
run-shell /nix/store/sy5y4892r4zp4q881363bcclx099prgn-tmuxplugin-sensible/share/tmux-plugins/sensible/sensible.tmux
# ============================================= #
set -g default-terminal "screen"
set -g base-index 0
setw -g pane-base-index 0
View nixops-test.sh
#! /usr/bin/env nix-shell
#! nix-shell <shabka/shell.nix>
nixops "$@"
View proto.sh
#! /usr/bin/env bash
set -euo pipefail
OS="$(go env GOHOSTOS)"
ARCH="$(go env GOARCH)"
echo -e ">>> Compiling the Go proto"
for label in $(bazel query 'kind(go_proto_library, //...)'); do
package="${label%%:*}"
View mk-external.nix
mkExternal =
{ name, revision, src, patches }:
stdenvNoCC.mkDerivation {
inherit src patches;
name = "${name}-${revision}";
preferLocalBuild = true;
buildPhase = ''
echo -n "${revision}" > .git-revision
View workaround.sh
if ! nix-shell -p hello --run 'hello' &>/dev/null; then
# The following condition addresses https://github.com/NixOS/nix/issues/2523
if [[ "$(uname -s)" == "Darwin" ]] && [[ "$( grep -E 'nix-daemon.*fork()' /var/log/system.log | wc -l )" -gt 0 ]]; then
>&2 echo ">>> I ran into a Mac-specific bug (https://github.com/NixOS/nix/issues/2523) and I'm applying the workaround automatically for it."
sudo launchctl remove org.nixos.nix-daemon
sed \
-e "s:<key>Program</key>:<key>EnvironmentVariables</key><dict><key>OBJC_DISABLE_INITIALIZE_FORK_SAFETY</key><string>YES</string></dict>&:g" \
/Library/LaunchDaemons/org.nixos.nix-daemon.plist > /tmp/org.nixos.nix-daemon.plist
sudo mv /tmp/org.nixos.nix-daemon.plist /Library/LaunchDaemons/org.nixos.nix-daemon.plist
sudo chown root: /Library/LaunchDaemons/org.nixos.nix-daemon.plist
View 56500-build
bazel-watcher
boringssl
cadvisor
cide
cni-plugins
deepin.dbus-factory
deepin.dde-api
deepin.dde-daemon
deepin.deepin-desktop-base
deepin.deepin-desktop-schemas
You can’t perform that action at this time.