| Server IP : 198.38.94.13 / Your IP : 216.73.217.33 Web Server : Apache System : Linux d4744.dxb1.stableserver.net 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64 User : revivere ( 1140) PHP Version : 8.2.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/__pycache__/ |
Upload File : |
o
;j � @ s� d Z ddlZddlZddlZddlZddlZe�e�Z dd� Z
dd� Zdd� Zd d
� Z
dd� Zd
d� Zdd� Zdd� Zdd� Zdd� Zdd� Zd dd�Zdd� Zdd� ZdS )!a�
Work with Nix packages
======================
.. versionadded:: 2017.7.0
Does not require the machine to be Nixos, just have Nix installed and available
to use for the user running this command. Their profile must be located in
their home, under ``$HOME/.nix-profile/``, and the nix store, unless specially
set up, should be in ``/nix``. To easily use this with multiple users or a root
user, set up the `nix-daemon`_.
This module exposes most of the common nix operations. Currently not meant to be run as a ``pkg`` module, but explicitly as ``nix.*``.
For more information on nix, see the `nix documentation`_.
.. _`nix documentation`: https://nixos.org/nix/manual/
.. _`nix-daemon`: https://nixos.org/nix/manual/#ssec-multi-user
� Nc C sX t j�t j�d�td ��d�} tjj�t j�| d��r*tjj�t j�| d��r*dS dS )z6
This only works if we have access to nix-env
�~{}�user�.nix-profile/bin/�nix-env�nix-collect-garbageT)Fz]The `nix` binaries required cannot be found or are not installed. (`nix-store` and `nix-env`)) �os�path�join�
expanduser�format�__opts__�salt�utils�which�Znixhome� r �D/opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/nix.py�__virtual__ s ���r c C s&