This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nix eval np#hello.drvPath --raw \ | |
| xargs nix-store -qR \ | |
| grep '\.drv$' \ | |
| xargs -n1 nix show-derivation \ | |
| jq -s '.[] | select(.[] | .env | has("outputHash")) | keys | .[]' -r \ | |
| xargs nix build --no-link --print-out-paths |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env nix-shell | |
#!nix-shell -p coreutils nix-index patchelf dmenu -i bash | |
file=$1 | |
patchelf --set-interpreter `nix-build --no-out-link "<nixpkgs>" -A glibc`/bin/ld-linux-x86-64.so.2 $file | |
rpath=$(ldd $file | sed -r "/^$/d" | cut -f1 -d' ' | cut -f2 | xargs -L 1 sh -c "nix-locate \$0 | dmenu -l 40 | awk '{print \$4;}' | xargs -L 1 dirname" | tr "\n" ":") | |
echo $rpath |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ stdenv, buildRustCrate, fetchurl, lib, defaultCrateOverrides }: | |
{ src, overrides ? { }, features ? [ "default" ] | |
, builtin ? [ "core" "compiler_builtins" ], cargoToml ? src + "/Cargo.toml" | |
, cargoLock ? src + "/Cargo.lock", local ? true }: | |
let | |
project = builtins.fromTOML (builtins.readFile cargoToml); | |
projectLock = builtins.fromTOML (builtins.readFile cargoLock); | |
packages = builtins.foldl' (a: n: | |
a // { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env runhaskell | |
{-# LANGUAGE BangPatterns #-} | |
{- | |
A program to estimate the average distance that one finger has to move between two keys while typing a given text on | |
european keyboard with different layouts. Note: ~ character is considered to be used very rarely and thus replaces newline | |
on "shifted" layouts. | |
-} | |
import Data.Map (fromList, (!?)) | |
import Data.List |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
building Nix... | |
building the system configuration... | |
these derivations will be built: | |
/nix/store/mbs6paf6m819hz3bi70b1s6pg237s0l7-xdg-desktop-portal-kde-5.14.4.drv | |
/nix/store/9bjqmxn463sb479kc30gs7vlhlinacaq-system-path.drv | |
/nix/store/6bxnmg3bfycqwar2571wy6pfrprk8wkl-dbus-1.drv | |
/nix/store/spkrx5ci8sl19psm4r2n6iwii1yk4jp5-unit-dbus.service.drv | |
/nix/store/mf7fgg7fzbnm0vs9p57y2qny7mgjgw4b-user-units.drv | |
/nix/store/d98v0vvhh4cbl7y0kxvn74bymfy7a6zd-unit-dbus.service.drv | |
/nix/store/qdmpnxwwdh3n3xw8zgaygmwgafm3nkpg-unit-accounts-daemon.service.drv |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
echo `find /`; | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{pkgs, ...}: | |
{ | |
programs.home-manager = { | |
enable = true; | |
path = https://github.com/rycee/home-manager/archive/master.tar.gz; | |
}; | |
programs.zsh = { | |
enable = true; | |
enableAutosuggestions = true; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import defaultdict | |
def dfs(graph, start, end, path=[]): | |
has_choice = False | |
for i in graph[start]: | |
if len(path) % 2 == 1 and i in path and i != path[-1]: | |
return None | |
if i == end: | |
yield [start, i] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ config, lib, pkgs, ...}: | |
with lib; | |
let | |
cfg = config.services.crd; | |
in { | |
options = { | |
services.crd = { | |
enable = mkEnableOption '' | |
chrome remote desktop, a service which allows for remote control of your desktop from anywhere. | |
''; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ config, pkgs, ... }: | |
{ | |
imports = | |
[ # Include the results of the hardware scan. | |
./hardware-configuration.nix | |
]; | |
# Use the systemd-boot EFI boot loader. | |
boot.loader.systemd-boot.enable = true; |