Sha256: c00c9622fd1343defd7186b3a8bbe05ea5e4a4ac0ad5a44ec52affa4fdc4950e
Contents?: true
Size: 806 Bytes
Versions: 30
Compression:
Stored size: 806 Bytes
Contents
module SpecInfra module Command class NixOS < Linux def check_enabled(service,level=3) level = "multi-user.target" if level == 3 "systemctl --plain list-dependencies #{escape(level)} | grep '#{escape(service)}.service$'" end def check_installed(package, version=nil) if version "nix-store -q --references /var/run/current-system/sw | grep #{escape(package)}-#{escape(version)}" else "nix-store -q --references /var/run/current-system/sw | grep #{escape(package)}" end end alias :check_installed_by_nix :check_installed def check_running(service) "systemctl is-active #{escape(service)}.service" end def install(package) "nix-env -i #{package}" end end end end
Version data entries
30 entries across 30 versions & 1 rubygems