Skip to content

Instantly share code, notes, and snippets.

View NWuensche's full-sized avatar

NWuensche NWuensche

View GitHub Profile
@NWuensche
NWuensche / configuration.nix
Created August 16, 2017 17:52
Script for light
security.wrappers.light-intel = { source = pkgs.writeScript "light-intel"
''
#!/bin/sh
CURR=$(cat /sys/class/backlight/intel_backlight/brightness)
echo $(($CURR+$1)) | tee /sys/class/backlight/intel_backlight/brightness
'';
owner = "root"; setuid = true; };
...
environment.systemPackages = with pkgs; [
(pkgs.oh-my-zsh.overrideAttrs (oldAttrs: rec {
phases = "installPhase customThemePhase";
srcTheme = fetchurl {
url = "https://raw.githubusercontent.com/NWuensche/dotFiles/master/terminalStuff/agnoster.zsh-theme";
sha256 = "b99455c561bdcf9ec0601669da3d1aa680328ec1836430de22c6e7e32497ea5b";
};
customThemePhase = "sudo cp $srcTheme $outdir/themes/agnoster.zsh-theme";
}))
programs.zsh = {
enable = true;
ohMyZsh = let
packages = [
{
owner = "nwuensche";
repo = "dotFiles";
rev = "1.0";
sha256 = "0n8xagqilkw13h20knb6by6ycpqjrx0qdjnpiaizbfkj8j5p4nyj";
}
systemd.user.services.rfkill-own = {
description = "RFKill-Block WLAN";
serviceConfig = {
Type = "idle";
ExecStart = "/run/current-system/sw/bin/rfkill block wlan";
};
wantedBy = [ "multi-user.target" ];
};
systemd.services.rfkill-own.enable = true;
#! /run/current-system/sw/bin/tcsh
#
# Brother Print filter
# Copyright (C) 2004 Brother. Industries, Ltd.
# Ver0.80
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your option)
# any later version.
{ stdenv, fetchurl, cups, dpkg, ghostscript, patchelf, a2ps, coreutils, gnused, gawk, file, makeWrapper }:
stdenv.mkDerivation rec {
name = "mfcj47dd0dw-cupswrapper-${version}";
version = "3.0.0-1";
src = fetchurl {
url = "http://download.brother.com/welcome/dlf006148/mfc5440cnlpr-1.0.2-1.i386.deb";
sha256 = "ce1c2f3778e4101ddd114d5a6274a8b5a034807f54d68e1b74de42007a616db6";
};
{ stdenv, fetchurl, cups, dpkg, ghostscript, patchelf, a2ps, coreutils, gnused, gawk, file, makeWrapper }:
stdenv.mkDerivation rec {
name = "mfcj47dd0dw-cupswrapper-${version}";
version = "3.0.0-1";
src = fetchurl {
url = "http://download.brother.com/welcome/dlf006148/mfc5440cnlpr-1.0.2-1.i386.deb";
sha256 = "cee1c2f3778e4101ddd114d5a6274a8b5a034807f54d68e1b74de42007a616db6";
};
#! /run/current-system/sw/bin/tcsh
#
# Brother Print filter
# Copyright (C) 2004 Brother. Industries, Ltd.
# Ver0.80
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your option)
# any later version.
[pid 18927] <... brk resumed> ) = 0xa085000
[pid 18929] rt_sigaction(SIGCHLD, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=SA_RESTART}, <unfinished ...>
[pid 18926] rt_sigaction(SIGPIPE, {sa_handler=0x804ad50, sa_mask=[PIPE], sa_flags=SA_RESTART}, <unfinished ...>
[pid 18929] <... rt_sigaction resumed> {sa_handler=0x8089550, sa_mask=[], sa_flags=SA_RESTART}, 8) = 0
[pid 18926] <... rt_sigaction resumed> {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
[pid 18929] rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1], <unfinished ...>
[pid 18908] <... rt_sigaction resumed> {sa_handler=SIG_IGN, sa_mask=[], sa_flags=0}, 8) = 0
[pid 18929] <... rt_sigprocmask resumed> [], 8) = 0
[pid 18927] brk(0xa086000 <unfinished ...>
[pid 18929] rt_sigprocmask(SIG_SETMASK, [], <unfinished ...>
{ stdenv, fetchurl, cups, dpkg, ghostscript, patchelf, a2ps, coreutils, gnused, gawk, file, makeWrapper }:
stdenv.mkDerivation rec {
name = "mfcj47dd0dw-cupswrapper-${version}";
version = "3.0.0-1";
src = fetchurl {
url = "http://download.brother.com/welcome/dlf006148/mfc5440cnlpr-1.0.2-1.i386.deb";
sha256 = "ce1c2f3778e4101ddd114d5a6274a8b5a034807f54d68e1b74de42007a616db6";
};