diff options
Diffstat (limited to 'nixos/modules/config')
-rw-r--r-- | nixos/modules/config/fonts/fontconfig.nix | 2 | ||||
-rw-r--r-- | nixos/modules/config/networking.nix | 2 | ||||
-rw-r--r-- | nixos/modules/config/pulseaudio.nix | 8 | ||||
-rw-r--r-- | nixos/modules/config/system-path.nix | 12 |
4 files changed, 15 insertions, 9 deletions
diff --git a/nixos/modules/config/fonts/fontconfig.nix b/nixos/modules/config/fonts/fontconfig.nix index e078a75b295c..1eaebe4b2bbd 100644 --- a/nixos/modules/config/fonts/fontconfig.nix +++ b/nixos/modules/config/fonts/fontconfig.nix @@ -236,7 +236,7 @@ with lib; # Versioned fontconfig > 2.10. Take shared fonts.conf from fontconfig. # Otherwise specify only font directories. environment.etc."fonts/${pkgs.fontconfig.configVersion}/fonts.conf".source = - "${pkgs.fontconfig}/etc/fonts/fonts.conf"; + "${pkgs.fontconfig.out}/etc/fonts/fonts.conf"; environment.etc."fonts/${pkgs.fontconfig.configVersion}/conf.d/00-nixos.conf".text = let diff --git a/nixos/modules/config/networking.nix b/nixos/modules/config/networking.nix index ca498ca499eb..0c4f4cbfa5c6 100644 --- a/nixos/modules/config/networking.nix +++ b/nixos/modules/config/networking.nix @@ -148,7 +148,7 @@ in "protocols".source = pkgs.iana_etc + "/etc/protocols"; # /etc/rpc: RPC program numbers. - "rpc".source = pkgs.glibc + "/etc/rpc"; + "rpc".source = pkgs.glibc.out + "/etc/rpc"; # /etc/hosts: Hostname-to-IP mappings. "hosts".text = diff --git a/nixos/modules/config/pulseaudio.nix b/nixos/modules/config/pulseaudio.nix index 179e826ba059..334fa1f772c5 100644 --- a/nixos/modules/config/pulseaudio.nix +++ b/nixos/modules/config/pulseaudio.nix @@ -26,7 +26,7 @@ let # are built with PulseAudio support (like KDE). clientConf = writeText "client.conf" '' autospawn=${if nonSystemWide then "yes" else "no"} - ${optionalString nonSystemWide "daemon-binary=${cfg.package}/bin/pulseaudio"} + ${optionalString nonSystemWide "daemon-binary=${cfg.package.out}/bin/pulseaudio"} ''; # Write an /etc/asound.conf that causes all ALSA applications to @@ -130,11 +130,11 @@ in { source = clientConf; }; - hardware.pulseaudio.configFile = mkDefault "${cfg.package}/etc/pulse/default.pa"; + hardware.pulseaudio.configFile = mkDefault "${cfg.package.out}/etc/pulse/default.pa"; } (mkIf cfg.enable { - environment.systemPackages = [ cfg.package ]; + environment.systemPackages = [ cfg.package.out ]; environment.etc = singleton { target = "asound.conf"; @@ -171,7 +171,7 @@ in { before = [ "sound.target" ]; environment.PULSE_RUNTIME_PATH = stateDir; serviceConfig = { - ExecStart = "${cfg.package}/bin/pulseaudio -D --log-level=${cfg.daemon.logLevel} --system --use-pid-file -n --file=${cfg.configFile}"; + ExecStart = "${cfg.package.out}/bin/pulseaudio -D --log-level=${cfg.daemon.logLevel} --system --use-pid-file -n --file=${cfg.configFile}"; PIDFile = "${stateDir}/pid"; }; }; diff --git a/nixos/modules/config/system-path.nix b/nixos/modules/config/system-path.nix index f510b58842e4..3df7d7cdac4f 100644 --- a/nixos/modules/config/system-path.nix +++ b/nixos/modules/config/system-path.nix @@ -75,7 +75,7 @@ in outputsToLink = mkOption { type = types.listOf types.str; - default = []; + default = [ ]; example = [ "doc" ]; description = "List of package outputs to be symlinked into <filename>/run/current-system/sw</filename>."; }; @@ -120,10 +120,16 @@ in "/share/vim-plugins" ]; + environment.outputsToLink = [ "bin" "lib" "out" ]; + system.path = pkgs.buildEnv { name = "system-path"; - paths = config.environment.systemPackages; - inherit (config.environment) pathsToLink outputsToLink; + paths = + lib.filter (drv: drv != null && drv != (drv.dev or null)) + (lib.concatMap (drv: + [ drv ] ++ map (outputName: drv.${outputName}.outPath or null) config.environment.outputsToLink) + config.environment.systemPackages); + inherit (config.environment) pathsToLink; ignoreCollisions = true; # !!! Hacky, should modularise. postBuild = |