Skip to content

Instantly share code, notes, and snippets.

Daiderd Jordan LnL7

Block or report user

Report or block LnL7

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
@LnL7
LnL7 / find-fixed-outputs.nix
Last active May 5, 2019
Find fixed output derivations
View find-fixed-outputs.nix
# This expression returns a list of all fixed output derivations used by ‘expr’.
# eg.
# $ nix-instantiate find-fixed-outputs.nix --eval --strict --json --arg expr '(import <nixpkgs> {}).hello'
with import <nixpkgs> { };
with lib;
{ expr }:
let
View configuration.nix
{ config, lib, pkgs, ... }:
{
imports = [ ./foo.nix ];
_module.args.foo = 42;
}
View secret-store.sh
echo 'builtins.toFile "foo" "bar"' | nix-instantiate --store "local?store=$HOME/.secret/store&state=$HOME/.secret/var&log=$HOME/.secret/log" --read-write-mode --eval -
View nix-wrap
#!/usr/bin/env bash
# vim: sw=4 ts=4
NIX_WRAP=${NIX_WRAP:-0}
if [ "$NIX_WRAP" -eq 1 ]; then
NIX_WRAP=0 exec nix-shell -p curl --run "exec $0 ${*@Q}"
fi
View haskell-packages.nix
let
pkgs = import <nixpkgs> {};
haskellPackages = pkgs.haskell.packages.ghc862.override {
extension = self: super: {
cabal = pkgs.haskell.packages.ghc862.cabalNoTest;
};
};
};
in
View source-overlay.nix
self: super:
{
tt-rss-plugin-tumblr-gdpr = super.tt-rss-plugin-tumblr-gdpr.overrideAttrs (drv: rec {
name = "tt-rss-plugin-tumblr-gdpr-${version}";
version = "1.3";
src = super.fetchFromGitHub {
owner = "GregThib";
repo = "ttrss-tumblr-gdpr";
rev = "v${version}";
View org.nixos.nix-daemon.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>EnvironmentVariables</key>
<dict>
<key>NIX_SSL_CERT_FILE</key>
<string>/nix/store/py3kd58jwpaghd15pzh2knsrr0q6ca35-nss-cacert-3.38/etc/ssl/certs/ca-bundle.crt</string>
</dict>
<key>Label</key>
View hydra-job-revision.sh
#!/usr/bin/env bash
hydra-job-revision() {
local jobseteval job=$1
shift 1
case "$job" in
*'/'*) ;;
*) job="nixpkgs/trunk/$job" ;;
esac
case "$job" in
View nix-resolve-dependencies.sh
#!/usr/bin/env bash
if ! test -e /tmp/nix-nixpkgs-cache; then
nix-env -f '<nixpkgs>' -qaP --no-name --out-path \* > /tmp/nix-nixpkgs-cache
fi
exprs="with import <nixpkgs> {}; (pkgs.runCommandCC or pkgs.runCommand) \"instantiate\" { buildInputs = [ $* ]; } \"\""
exprsDrv=$(nix-instantiate -E "$exprs" 2> /dev/null)
for drv in $(nix-store -qR "$exprsDrv"); do
View unstable-overlay.nix
self: super:
let
# Import unstable channel.
# $ sudo nix-channel --add http://nixos.org/channels/nixpkgs-unstable nixpkgs-unstable
# $ sudo nix-channel --update nixpkgs-unstable
unstable = import <nixpkgs-unstable> {};
in
{
You can’t perform that action at this time.