Merge remote-tracking branch 'gum/master'
This commit is contained in:
commit
3b2b4bdfb9
|
@ -55,7 +55,7 @@ in
|
||||||
|
|
||||||
hardware.pulseaudio = {
|
hardware.pulseaudio = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# systemWide = true;
|
systemWide = true;
|
||||||
};
|
};
|
||||||
services.xserver.displayManager.sessionCommands = let
|
services.xserver.displayManager.sessionCommands = let
|
||||||
xdefaultsfile = pkgs.writeText "Xdefaults" ''
|
xdefaultsfile = pkgs.writeText "Xdefaults" ''
|
||||||
|
|
|
@ -6,7 +6,10 @@
|
||||||
# TODO split generic desktop stuff and laptop-specifics like lidswitching
|
# TODO split generic desktop stuff and laptop-specifics like lidswitching
|
||||||
|
|
||||||
with config.krebs.lib;
|
with config.krebs.lib;
|
||||||
{
|
let
|
||||||
|
window-manager = "awesome";
|
||||||
|
user = config.krebs.build.user.name;
|
||||||
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
./base-gui.nix
|
./base-gui.nix
|
||||||
./fetchWallpaper.nix
|
./fetchWallpaper.nix
|
||||||
|
@ -17,23 +20,32 @@ with config.krebs.lib;
|
||||||
users.users.${config.krebs.build.user.name}.extraGroups = [ "dialout" ];
|
users.users.${config.krebs.build.user.name}.extraGroups = [ "dialout" ];
|
||||||
|
|
||||||
krebs.power-action = let
|
krebs.power-action = let
|
||||||
speak = "${pkgs.espeak}/bin/espeak";
|
#speak = "XDG_RUNTIME_DIR=/run/user/$(id -u) ${pkgs.espeak}/bin/espeak"; # when run as user
|
||||||
whisper = text: ''${pkgs.espeak}/bin/espeak -v +whisper -s 110 "${text}"'';
|
speak = "${pkgs.espeak}/bin/espeak"; # systemwide pulse
|
||||||
note = "${pkgs.libnotify}/bin/notify-send";
|
whisper = text: ''${speak} -v +whisper -s 110 "${text}"'';
|
||||||
|
|
||||||
|
note = pkgs.writeDash "note-as-user" ''
|
||||||
|
eval "export $(egrep -z DBUS_SESSION_BUS_ADDRESS /proc/$(${pkgs.procps}/bin/pgrep -u ${user} ${window-manager})/environ)"
|
||||||
|
${pkgs.libnotify}/bin/notify-send "$@";
|
||||||
|
'';
|
||||||
in {
|
in {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
inherit user;
|
||||||
plans.low-battery = {
|
plans.low-battery = {
|
||||||
upperLimit = 25;
|
upperLimit = 25;
|
||||||
lowerLimit = 15;
|
lowerLimit = 15;
|
||||||
charging = false;
|
charging = false;
|
||||||
action = whisper "power level low, please plug me in";
|
action = pkgs.writeDash "low-speak" ''
|
||||||
|
${whisper "power level low, please plug me in"}
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
plans.nag-harder = {
|
plans.nag-harder = {
|
||||||
upperLimit = 15;
|
upperLimit = 15;
|
||||||
lowerLimit = 5;
|
lowerLimit = 5;
|
||||||
|
charging = false;
|
||||||
action = pkgs.writeDash "crit-speak" ''
|
action = pkgs.writeDash "crit-speak" ''
|
||||||
|
${note} Battery -u critical -t 60000 "Power level critical, do something!"
|
||||||
${whisper "Power level critical, do something"}
|
${whisper "Power level critical, do something"}
|
||||||
${note} Battery -u critical -t 600000 "Power level critical, do something!"
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
plans.last-chance = {
|
plans.last-chance = {
|
||||||
|
@ -52,8 +64,7 @@ with config.krebs.lib;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
users.users.power-action.extraGroups = [ "audio" ];
|
security.sudo.extraConfig = "${config.krebs.power-action.user} ALL= (root) NOPASSWD: ${pkgs.systemd}/bin/systemctl suspend";
|
||||||
security.sudo.extraConfig = "${config.krebs.power-action.user.name} ALL= (root) NOPASSWD: ${pkgs.systemd}/bin/systemctl suspend";
|
|
||||||
|
|
||||||
services.redshift = {
|
services.redshift = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -11,6 +11,7 @@ in
|
||||||
awesomecfg = callPackage ./awesomecfg {};
|
awesomecfg = callPackage ./awesomecfg {};
|
||||||
bintray-upload = callPackage ./bintray-upload {};
|
bintray-upload = callPackage ./bintray-upload {};
|
||||||
inherit (callPackage ./devpi {}) devpi-web devpi-server;
|
inherit (callPackage ./devpi {}) devpi-web devpi-server;
|
||||||
|
f3 = callPackage ./f3 {};
|
||||||
farpd = callPackage ./farpd {};
|
farpd = callPackage ./farpd {};
|
||||||
git-xlsx-textconv = callPackage ./git-xlsx-textconv {};
|
git-xlsx-textconv = callPackage ./git-xlsx-textconv {};
|
||||||
mergerfs = callPackage ./mergerfs {};
|
mergerfs = callPackage ./mergerfs {};
|
||||||
|
|
26
makefu/5pkgs/f3/default.nix
Normal file
26
makefu/5pkgs/f3/default.nix
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
{ stdenv, fetchFromGitHub }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
name = "f3-${version}";
|
||||||
|
version = "6.0";
|
||||||
|
|
||||||
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "AltraMayor";
|
||||||
|
repo = "f3";
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "1azi10ba0h9z7m0gmfnyymmfqb8380k9za8hn1rrw1s442hzgnz2";
|
||||||
|
};
|
||||||
|
|
||||||
|
makeFlags = [ "PREFIX=$(out)" ];
|
||||||
|
patchPhase = "sed -i 's/-oroot -groot//' Makefile";
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Fight Flash Fraud";
|
||||||
|
homepage = http://oss.digirati.com.br/f3/;
|
||||||
|
license = stdenv.lib.licenses.gpl2;
|
||||||
|
platforms = stdenv.lib.platforms.linux;
|
||||||
|
maintainers = with stdenv.lib.maintainers; [ makefu ];
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue