commit
eff447b321
@ -56,6 +56,9 @@ let
|
|||||||
# back-compat aliases
|
# back-compat aliases
|
||||||
platforms = systems.doubles;
|
platforms = systems.doubles;
|
||||||
|
|
||||||
|
# linux kernel configuration
|
||||||
|
kernel = callLibs ./kernel.nix;
|
||||||
|
|
||||||
inherit (builtins) add addErrorContext attrNames concatLists
|
inherit (builtins) add addErrorContext attrNames concatLists
|
||||||
deepSeq elem elemAt filter genericClosure genList getAttr
|
deepSeq elem elemAt filter genericClosure genList getAttr
|
||||||
hasAttr head isAttrs isBool isInt isList isString length
|
hasAttr head isAttrs isBool isInt isList isString length
|
||||||
|
@ -1,12 +1,7 @@
|
|||||||
{ lib, version }:
|
{ lib }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
{
|
{
|
||||||
# Common patterns/legacy
|
|
||||||
whenAtLeast = ver: mkIf (versionAtLeast version ver);
|
|
||||||
whenOlder = ver: mkIf (versionOlder version ver);
|
|
||||||
# range is (inclusive, exclusive)
|
|
||||||
whenBetween = verLow: verHigh: mkIf (versionAtLeast version verLow && versionOlder version verHigh);
|
|
||||||
|
|
||||||
|
|
||||||
# Keeping these around in case we decide to change this horrible implementation :)
|
# Keeping these around in case we decide to change this horrible implementation :)
|
||||||
@ -18,4 +13,14 @@ with lib;
|
|||||||
module = { tristate = "m"; };
|
module = { tristate = "m"; };
|
||||||
freeform = x: { freeform = x; };
|
freeform = x: { freeform = x; };
|
||||||
|
|
||||||
|
/*
|
||||||
|
Common patterns/legacy used in common-config/hardened-config.nix
|
||||||
|
*/
|
||||||
|
whenHelpers = version: {
|
||||||
|
whenAtLeast = ver: mkIf (versionAtLeast version ver);
|
||||||
|
whenOlder = ver: mkIf (versionOlder version ver);
|
||||||
|
# range is (inclusive, exclusive)
|
||||||
|
whenBetween = verLow: verHigh: mkIf (versionAtLeast version verLow && versionOlder version verHigh);
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -16,11 +16,12 @@
|
|||||||
}:
|
}:
|
||||||
|
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
|
with stdenv.lib.kernel;
|
||||||
with import ../../../../lib/kernel.nix { inherit (stdenv) lib; inherit version; };
|
with (stdenv.lib.kernel.whenHelpers version);
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
|
|
||||||
# configuration items have to be part of a subattrs
|
# configuration items have to be part of a subattrs
|
||||||
flattenKConf = nested: mapAttrs (_: head) (zipAttrs (attrValues nested));
|
flattenKConf = nested: mapAttrs (_: head) (zipAttrs (attrValues nested));
|
||||||
|
|
||||||
|
@ -11,7 +11,8 @@
|
|||||||
{ stdenv, version }:
|
{ stdenv, version }:
|
||||||
|
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
with import ../../../../lib/kernel.nix { inherit (stdenv) lib; inherit version; };
|
with stdenv.lib.kernel;
|
||||||
|
with (stdenv.lib.kernel.whenHelpers version);
|
||||||
|
|
||||||
assert (versionAtLeast version "4.9");
|
assert (versionAtLeast version "4.9");
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{ stdenv }:
|
{ stdenv }:
|
||||||
with import ../../../../lib/kernel.nix { inherit (stdenv) lib; version = null; };
|
with stdenv.lib.kernel;
|
||||||
{
|
{
|
||||||
# DRM_AMDGPU = yes;
|
# DRM_AMDGPU = yes;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user