From 9493ecc2a40eabc9a371c536b285ae5f0adeb9d3 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 11 Aug 2009 21:16:59 +0000 Subject: [PATCH] * Use the hal-info package. svn path=/nixos/trunk/; revision=16693 --- modules/services/hardware/hal.nix | 35 +++++++++++------------- modules/services/x11/xserver/default.nix | 12 ++++---- 2 files changed, 21 insertions(+), 26 deletions(-) diff --git a/modules/services/hardware/hal.nix b/modules/services/hardware/hal.nix index c1390dd6eee..b8d858faa92 100644 --- a/modules/services/hardware/hal.nix +++ b/modules/services/hardware/hal.nix @@ -9,15 +9,11 @@ let inherit (pkgs) hal; - fdi = - if cfg.extraFdi == [] then - "${hal}/share/hal/fdi" - else - pkgs.buildEnv { - name = "hal-fdi"; - pathsToLink = [ "/preprobe" "/information" "/policy" ]; - paths = [ "${hal}/share/hal/fdi" ] ++ cfg.extraFdi; - }; + fdi = pkgs.buildEnv { + name = "hal-fdi"; + pathsToLink = [ "/share/hal/fdi" ]; + paths = cfg.packages; + }; in @@ -31,17 +27,16 @@ in enable = mkOption { default = true; - description = " + description = '' Whether to start the HAL daemon. - "; + ''; }; - extraFdi = mkOption { + packages = mkOption { default = []; - example = [ "/nix/store/.../fdi" ]; - description = " - Extend HAL daemon configuration with additionnal paths. - "; + description = '' + Packages containing additional HAL configuration data. + ''; }; }; @@ -55,6 +50,8 @@ in environment.systemPackages = [hal]; + services.hal.packages = [hal pkgs.hal_info]; + users.extraUsers = singleton { name = "haldaemon"; uid = config.ids.uids.haldaemon; @@ -79,9 +76,9 @@ in # !!! HACK? These environment variables manipulated inside # 'src'/hald/mmap_cache.c are used for testing the daemon environment = - { HAL_FDI_SOURCE_PREPROBE = "${fdi}/preprobe"; - HAL_FDI_SOURCE_INFORMATION = "${fdi}/information"; - HAL_FDI_SOURCE_POLICY = "${fdi}/policy"; + { HAL_FDI_SOURCE_PREPROBE = "${fdi}/share/hal/fdi/preprobe"; + HAL_FDI_SOURCE_INFORMATION = "${fdi}/share/hal/fdi/information"; + HAL_FDI_SOURCE_POLICY = "${fdi}/share/hal/fdi/policy"; }; preStart = diff --git a/modules/services/x11/xserver/default.nix b/modules/services/x11/xserver/default.nix index 5c5301ecf32..9845a7536bc 100644 --- a/modules/services/x11/xserver/default.nix +++ b/modules/services/x11/xserver/default.nix @@ -359,10 +359,10 @@ let ]; - halConfigFiles = [ + halConfigFiles = singleton (pkgs.writeTextFile { name = "hal-policy-keymap"; - destination = "/policy/30-keymap.fdi"; + destination = "/share/hal/fdi/policy/30-keymap.fdi"; text = '' @@ -380,9 +380,9 @@ let ''; - }) - ]; + }); + configFile = stdenv.mkDerivation { name = "xserver.conf"; src = ./xserver.conf; @@ -618,9 +618,7 @@ mkIf cfg.enable { }; }; - hal = { - extraFdi = halConfigFiles; - }; + hal.packages = halConfigFiles; extraJobs = [{ name = "xserver";