File manager - Edit - /opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/__pycache__/nix.cpython-310.pyc
Back
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&