*: turn 5pkgs into a(n optional) module

This commit is contained in:
tv 2016-02-11 03:47:26 +01:00
parent 8b130a6628
commit 0cf6d065f4
8 changed files with 85 additions and 86 deletions

View File

@ -43,16 +43,12 @@ let stockholm = {
imports = builtins.filter lib.dir.has-default-nix (lib.concatLists [
(map (f: f "2configs") [ lib.upath ])
(map (f: f "3modules") [ lib.kpath lib.upath ])
(map (f: f "5pkgs") [ lib.kpath lib.upath ])
]);
krebs.current.enable = true;
krebs.current.host = config.krebs.hosts.${current-host-name};
krebs.current.user = config.krebs.users.${current-user-name};
nixpkgs.config.packageOverrides = pkgs: let
kpkgs = import (lib.kpath "5pkgs") { inherit lib pkgs; };
upkgs = import (lib.upath "5pkgs") { inherit lib; pkgs = pkgs // kpkgs; };
in kpkgs // upkgs;
};
eval = config: import (lib.npath "nixos/lib/eval-config.nix") {

View File

@ -1,6 +1,7 @@
{ lib, pkgs, ... }@args:
with lib;
{
nixpkgs.config.packageOverrides = pkgs: {
haskellPackages = pkgs.haskellPackages.override {
overrides = self: super:
mapAttrs (name: path: self.callPackage path {})
@ -28,4 +29,5 @@ with lib;
// import ./builders.nix args
// mapAttrs (_: flip pkgs.callPackage {})
(filterAttrs (_: dir.has-default-nix)
(subdirsOf ./.))
(subdirsOf ./.));
}

View File

@ -3,8 +3,8 @@
let
inherit (pkgs) callPackage;
in
rec {
{
nixpkgs.config.packageOverrides = rec {
firefoxPlugins = {
noscript = callPackage ./firefoxPlugins/noscript.nix {};
ublock = callPackage ./firefoxPlugins/ublock.nix {};
@ -14,4 +14,5 @@ rec {
xmonad-lass =
let src = pkgs.writeNixFromCabal "xmonad-lass.nix" ./xmonad-lass; in
pkgs.haskellPackages.callPackage src {};
};
}

View File

@ -4,9 +4,11 @@ let
inherit (pkgs) callPackage;
in
{
nixpkgs.config.packageOverrides = rec {
alsa-hdspmixer = callPackage ./alsa-tools { alsaToolTarget="hdspmixer";};
alsa-hdspconf = callPackage ./alsa-tools { alsaToolTarget="hdspconf";};
alsa-hdsploader = callPackage ./alsa-tools { alsaToolTarget="hdsploader";};
awesomecfg = callPackage ./awesomecfg {};
tw-upload-plugin = callPackage ./tw-upload-plugin {};
};
}

View File

@ -1 +0,0 @@
_:{}

View File

@ -1,7 +1,7 @@
{ pkgs, ... }:
{
# TODO use XDG_RUNTIME_DIR?
nixpkgs.config.packageOverrides = rec {
cr = pkgs.writeScriptBin "cr" ''
#! /bin/sh
set -efu
@ -20,4 +20,5 @@
xmonad-tv =
let src = pkgs.writeNixFromCabal "xmonad-tv.nix" ./xmonad-tv; in
pkgs.haskellPackages.callPackage src {};
};
}

View File

@ -1,5 +0,0 @@
# TODO don't require 5pkgs
_:
{
}

View File

@ -1,6 +1,8 @@
{ pkgs, ... }:
{
nixpkgs.config.packageOverrides = {
# TODO use XDG_RUNTIME_DIR?
cr = pkgs.writeScriptBin "cr" ''
#! /bin/sh
set -efu
@ -19,4 +21,5 @@
xmonad-tv =
let src = pkgs.writeNixFromCabal "xmonad-tv.nix" ./xmonad-tv; in
pkgs.haskellPackages.callPackage src {};
};
}