Skip to content

Instantly share code, notes, and snippets.

View NWuensche's full-sized avatar

NWuensche NWuensche

View GitHub Profile
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;
programs.zsh = {
enable = true;
ohMyZsh = let
packages = [
{
owner = "nwuensche";
repo = "dotFiles";
rev = "1.0";
sha256 = "0n8xagqilkw13h20knb6by6ycpqjrx0qdjnpiaizbfkj8j5p4nyj";
}
...
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";
}))
@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; };
@NWuensche
NWuensche / SearchWithStreams.java
Last active July 24, 2021 05:30
DFS and BFS in Java 8 style
import com.sun.istack.internal.NotNull;
import com.sun.istack.internal.Nullable;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import java.util.function.Predicate;
import java.util.stream.Collectors;
/**
* @author Niklas Wünsche