Skip to content

Instantly share code, notes, and snippets.

View Synthetica9's full-sized avatar

Patrick Hilhorst Synthetica9

View GitHub Profile
instance DiscreteOrdered a => Semigroup (RSet a) where
(<>) = rSetUnion
instance DiscreteOrdered a => Monoid (RSet a) where
mempty = rSetEmpty
# Doesn't work:
$ cat examples/diyInherit.nix | ./result/bin/nix-linter /dev/stdin
Failure when parsing:
/dev/stdin:1:1:
|
1 | <empty line>
| ^
unexpected end of input
expecting '{', assert, if, let block, letter, or with
redshift = pkgs.redshift.overrideAttrs (oldAttrs: rec {
src = pkgs.fetchFromGitHub {
owner = "breznak";
repo = "redshift";
rev = "Lourens-Rich-master";
sha256 = "1b9gjz1crw8fzlpdisafn6lx37m5dg7s1ak35qcrgzgqlcsldw1l";
};
});
nixpkgs.config.packageOverrides = pkgs: {
redshift = pkgs.redshift.overrideAttrs (oldAttrs: rec {
src = pkgs.fetchFromGitHub {
owner = "breznak";
repo = "redshift";
rev = "Lourens-Rich-master";
sha256 = "1b9gjz1crw8fzlpdisafn6lx37m5dg7s1ak35qcrgzgqlcsldw1l";
};
});
}
#!/usr/bin/env nix-shell
#!nix-shell -i 'python3.7' -p "python37.withPackages (p: with p; [pandas matplotlib beautifulsoup4 requests])"
from matplotlib import pyplot as plt
import pandas as pd
import requests
import re
from datetime import datetime
from textwrap import wrap
#!/usr/bin/env python3
import i3ipc
i3 = i3ipc.Connection()
def main():
windows = i3.get_tree().find_focused().workspace().leaves()
for window in windows:
if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then
echo "starting sway"
LOGFILE=/tmp/sway_$(date +"%Y-%m-%dT%H:%M:%S").log
exec sway | unbuffer -p tee $LOGFILE
fi
exec fish
these derivations will be built:
/nix/store/py5jm1i3pg5yaxs05lspvrza80dvw8bq-dejavu-fonts-full-2.37-armv7l-unknown-linux-gnueabi.drv
/nix/store/yr4zlmwc29vm6kvpzg11ippd95q2piwm-dejavu-fonts-minimal-2.37-armv7l-unknown-linux-gnueabi.drv
/nix/store/ndva6xs37fzkifhl37c2ai7pf1mfnk9m-dejavu-fonts-2.37-armv7l-unknown-linux-gnueabi.drv
building '/nix/store/py5jm1i3pg5yaxs05lspvrza80dvw8bq-dejavu-fonts-full-2.37-armv7l-unknown-linux-gnueabi.drv'...
unpacking sources
unpacking source archive /nix/store/v7wik3xar8rkap69d5smm047rfcigq4p-source
source root is source
patching sources
updateAutotoolsGnuConfigScriptsPhase
commit f1f1476d457e232faa35670a1950b7963737042d
Author: Patrick Hilhorst <[email protected]>
Date: Sun May 19 12:50:21 2019 +0200
Remove version checks
diff --git a/setup.py b/setup.py
index 7bdf25f..ea31a0b 100644
--- a/setup.py
+++ b/setup.py
let
home-manager-repo = builtins.fetchTarball "https://github.com/rycee/home-manager/archive/master.tar.gz";
in
{ ... }:
{
imports = [ "${home-manager-repo}/nixos" ];
programs.home-manager.enable = true;
}