l: turn pkgs into overlay

This commit is contained in:
lassulus 2018-03-03 15:07:00 +01:00
parent 55a156814a
commit 742cda0e22
4 changed files with 45 additions and 37 deletions

View File

@ -2,6 +2,7 @@
with import <stockholm/lib>; with import <stockholm/lib>;
let let
user = config.krebs.build.user; user = config.krebs.build.user;
xmonad-lass = pkgs.callPackage <stockholm/lass/5pkgs/custom/xmonad-lass> { inherit config; };
in { in {
imports = [ imports = [
./mpv.nix ./mpv.nix
@ -84,7 +85,6 @@ in {
powertop powertop
push push
rxvt_unicode_with-plugins rxvt_unicode_with-plugins
screengrab
slock slock
sxiv sxiv
timewarrior timewarrior
@ -137,8 +137,8 @@ in {
}; };
serviceConfig = { serviceConfig = {
SyslogIdentifier = "xmonad"; SyslogIdentifier = "xmonad";
ExecStart = "${pkgs.xmonad-lass}/bin/xmonad"; ExecStart = "${xmonad-lass}/bin/xmonad";
ExecStop = "${pkgs.xmonad-lass}/bin/xmonad --shutdown"; ExecStop = "${xmonad-lass}/bin/xmonad --shutdown";
}; };
restartIfChanged = false; restartIfChanged = false;
}; };

View File

@ -143,12 +143,21 @@ myKeyMap =
, ("M4-d", floatNext True >> spawn "${pkgs.copyq}/bin/copyq show") , ("M4-d", floatNext True >> spawn "${pkgs.copyq}/bin/copyq show")
, ("M4-<F4>", spawn "${pkgs.writeDash "nm-dmenu" ''
export PATH=$PATH:${pkgs.dmenu}/bin:${pkgs.networkmanagerapplet}/bin
exec ${pkgs.networkmanager_dmenu}/bin/networkmanager_dmenu "$@"
''}")
, ("M4-<F5>", spawn "${pkgs.xorg.xbacklight}/bin/xbacklight -set 1") , ("M4-<F5>", spawn "${pkgs.xorg.xbacklight}/bin/xbacklight -set 1")
, ("M4-<F6>", spawn "${pkgs.xorg.xbacklight}/bin/xbacklight -set 10") , ("M4-<F6>", spawn "${pkgs.xorg.xbacklight}/bin/xbacklight -set 10")
, ("M4-<F7>", spawn "${pkgs.xorg.xbacklight}/bin/xbacklight -set 33") , ("M4-<F7>", spawn "${pkgs.xorg.xbacklight}/bin/xbacklight -set 33")
, ("M4-<F8>", spawn "${pkgs.xorg.xbacklight}/bin/xbacklight -set 100") , ("M4-<F8>", spawn "${pkgs.xorg.xbacklight}/bin/xbacklight -set 100")
, ("<Pause>", spawn "${pkgs.xcalib}/bin/xcalib -invert -alter") , ("<Pause>", spawn "${pkgs.xcalib}/bin/xcalib -invert -alter")
--, ("M4-w", screenWorkspace 0 >>= (windows . W.greedyView))
--, ("M4-e", screenWorkspace 1 >>= (windows . W.greedyView))
--, ("M4-r", screenWorkspace 2 >>= (windows . W.greedyView))
] ]
forkFile :: FilePath -> [String] -> Maybe [(String, String)] -> X () forkFile :: FilePath -> [String] -> Maybe [(String, String)] -> X ()

View File

@ -1,40 +1,39 @@
{ config, pkgs, ... }@args: with import <stockholm/lib>;
self: super: let
{ # This callPackage will try to detect obsolete overrides.
nixpkgs.config.packageOverrides = rec { callPackage = path: args: let
acronym = pkgs.callPackage ./acronym/default.nix {}; override = super.callPackage path args;
dpass = pkgs.callPackage ./dpass {}; upstream = optionalAttrs (override ? "name")
firefoxPlugins = { (super.${(parseDrvName override.name).name} or {});
noscript = pkgs.callPackage ./firefoxPlugins/noscript.nix {}; in if upstream ? "name" &&
ublock = pkgs.callPackage ./firefoxPlugins/ublock.nix {}; override ? "name" &&
vimperator = pkgs.callPackage ./firefoxPlugins/vimperator.nix {}; compareVersions upstream.name override.name != -1
}; then
init = pkgs.callPackage ./init/default.nix args; trace
logify = pkgs.callPackage ./logify/default.nix {}; "Upstream `${upstream.name}' gets overridden by `${override.name}'."
mk_sql_pair = pkgs.callPackage ./mk_sql_pair/default.nix {}; override
mpv-poll = pkgs.callPackage ./mpv-poll/default.nix {}; else override;
pop = pkgs.callPackage ./pop/default.nix {};
q = pkgs.callPackage ./q {};
rs = pkgs.callPackage ./rs/default.nix {};
urban = pkgs.callPackage ./urban/default.nix {};
xml2json = pkgs.callPackage ./xml2json/default.nix {};
xmonad-lass = import ./xmonad-lass.nix { inherit config pkgs; };
yt-next = pkgs.callPackage ./yt-next/default.nix {};
bank = pkgs.writeDashBin "bank" '' subdirsOf = path:
mapAttrs (name: _: path + "/${name}")
(filterAttrs (_: eq "directory") (readDir path));
in {
bank = self.writeDashBin "bank" ''
tmp=$(mktemp) tmp=$(mktemp)
${pkgs.pass}/bin/pass show hledger > $tmp ${self.pass}/bin/pass show hledger > $tmp
${pkgs.hledger}/bin/hledger --file=$tmp "$@" ${self.hledger}/bin/hledger --file=$tmp "$@"
${pkgs.pass}/bin/pass show hledger | if ${pkgs.diffutils}/bin/diff $tmp -; then ${self.pass}/bin/pass show hledger | if ${self.diffutils}/bin/diff $tmp -; then
exit 0 exit 0
else else
${pkgs.coreutils}/bin/cat $tmp | ${pkgs.pass}/bin/pass insert -m hledger ${self.coreutils}/bin/cat $tmp | ${self.pass}/bin/pass insert -m hledger
fi fi
${pkgs.coreutils}/bin/rm $tmp ${self.coreutils}/bin/rm $tmp
''; '';
screengrab = pkgs.writeDashBin "screengrab" '' rtl8814au = callPackage ./custom/rtl8814au { kernel = self.linux; };
resolution="$(${pkgs.xorg.xrandr}/bin/xrandr | ${pkgs.gnugrep}/bin/grep '*' | ${pkgs.gawk}/bin/awk '{print $1}')"
${pkgs.ffmpeg}/bin/ffmpeg -f x11grab -r 25 -i :${toString config.services.xserver.display} -s $resolution -c:v huffyuv $1
'';
};
} }
// mapAttrs (_: flip callPackage {})
(filterAttrs (_: dir: pathExists (dir + "/default.nix"))
(subdirsOf ./.))

View File

@ -1,9 +1,9 @@
_: { pkgs, ... }:
{ {
imports = [ imports = [
../krebs ../krebs
./2configs ./2configs
./3modules ./3modules
./5pkgs
]; ];
nixpkgs.config.packageOverrides = import ./5pkgs pkgs;
} }