From 1e5a2bca287f9837d5723b741ca986a211db2f39 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 17 Aug 2012 14:45:43 -0400 Subject: [PATCH] Remove HAL It's obsolete and we no longer use it. --- modules/config/no-x-libs.nix | 3 +- modules/module-list.nix | 1 - modules/services/hardware/hal.nix | 117 ------------------ .../services/x11/desktop-managers/xfce.nix | 1 - 4 files changed, 1 insertion(+), 121 deletions(-) delete mode 100644 modules/services/hardware/hal.nix diff --git a/modules/config/no-x-libs.nix b/modules/config/no-x-libs.nix index 93635aa667fd..f270a3fa431c 100644 --- a/modules/config/no-x-libs.nix +++ b/modules/config/no-x-libs.nix @@ -7,7 +7,7 @@ example = true; description = '' Switch off the options in the default configuration that require X libraries. - Currently this includes: ssh X11 forwarding, dbus, hal, fonts.enableCoreFonts, + Currently this includes: ssh X11 forwarding, dbus, fonts.enableCoreFonts, fonts.enableFontConfig ''; }; @@ -16,7 +16,6 @@ programs.ssh.setXAuthLocation = false; services = { dbus.enable = false; - hal.enable = false; }; fonts = { enableCoreFonts = false; diff --git a/modules/module-list.nix b/modules/module-list.nix index a5eb506fcdd6..9f3fa0d6fc52 100644 --- a/modules/module-list.nix +++ b/modules/module-list.nix @@ -70,7 +70,6 @@ ./services/games/ghost-one.nix ./services/hardware/acpid.nix ./services/hardware/bluetooth.nix - ./services/hardware/hal.nix ./services/hardware/nvidia-optimus.nix ./services/hardware/pcscd.nix ./services/hardware/pommed.nix diff --git a/modules/services/hardware/hal.nix b/modules/services/hardware/hal.nix deleted file mode 100644 index f9fb2dfecef5..000000000000 --- a/modules/services/hardware/hal.nix +++ /dev/null @@ -1,117 +0,0 @@ -# HAL daemon. -{ config, pkgs, ... }: - -with pkgs.lib; - -let - - cfg = config.services.hal; - - inherit (pkgs) hal; - - fdi = pkgs.buildEnv { - name = "hal-fdi"; - pathsToLink = [ "/share/hal/fdi" ]; - paths = cfg.packages; - }; - -in - -{ - - ###### interface - - options = { - - services.hal = { - - enable = mkOption { - default = false; - description = '' - Whether to start the HAL daemon. - ''; - }; - - packages = mkOption { - default = []; - description = '' - Packages containing additional HAL configuration data. - ''; - }; - - }; - - }; - - - ###### implementation - - config = mkIf cfg.enable { - - environment.systemPackages = [ hal ]; - - services.hal.packages = [ hal pkgs.hal_info ]; - - security.policykit.enable = true; - - users.extraUsers = singleton - { name = "haldaemon"; - uid = config.ids.uids.haldaemon; - description = "HAL daemon user"; - }; - - users.extraGroups = singleton - { name = "haldaemon"; - gid = config.ids.gids.haldaemon; - }; - - jobs.hal = - { description = "HAL daemon"; - - startOn = "started dbus" + optionalString config.services.acpid.enable " and started acpid"; - - environment = - { # !!! HACK? These environment variables manipulated inside - # 'src'/hald/mmap_cache.c are used for testing the daemon. - 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"; - - # Stuff needed by the shell scripts run by HAL (in particular pm-utils). - HALD_RUNNER_PATH = concatStringsSep ":" - [ "${pkgs.coreutils}/bin" - "${pkgs.gnugrep}/bin" - "${pkgs.dbus_tools}/bin" - "${pkgs.procps}/bin" - "${pkgs.procps}/sbin" - "${config.system.sbin.modprobe}/sbin" - "${pkgs.module_init_tools}/bin" - "${pkgs.module_init_tools}/sbin" - "${pkgs.kbd}/bin" - ]; - }; - - preStart = - '' - mkdir -m 0755 -p /var/cache/hald - mkdir -m 0755 -p /var/run/hald - - rm -f /var/cache/hald/fdi-cache - ''; - - daemonType = "fork"; - - # The `PATH=' works around a bug in HAL: it concatenates - # its libexec directory to $PATH, but using a 512-byte - # buffer. So if $PATH is too long it fails. - script = "PATH= exec ${hal}/sbin/hald --use-syslog"; - }; - - services.udev.packages = [hal]; - - services.dbus.enable = true; - services.dbus.packages = [hal]; - - }; - -} diff --git a/modules/services/x11/desktop-managers/xfce.nix b/modules/services/x11/desktop-managers/xfce.nix index 753bac476274..3fead2e96cb8 100644 --- a/modules/services/x11/desktop-managers/xfce.nix +++ b/modules/services/x11/desktop-managers/xfce.nix @@ -89,7 +89,6 @@ in ''; # Enable helpful DBus services. - services.hal = mkIf (!isXfce48) { enable = true; }; services.udisks = mkIf isXfce48 { enable = true; }; services.upower = mkIf (isXfce48 && config.powerManagement.enable) { enable = true; };