Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Add NixOS support. #80

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,13 @@ def get_package_manager():
config.SUPERUSER_COMMAND = "doas"

# Check for package manager and associated packages
if shutil.which('apt') is not None: # debian, ubuntu
if config.OS_NAME == 'nixos':
config.PACKAGE_MANAGER_COMMAND_INSTALL = ""
config.PACKAGE_MANAGER_COMMAND_REMOVE = ""
config.PACKAGE_MANAGER_COMMAND_QUERY = ""
config.PACKAGES = ""
config.BADPACKAGES = ""
elif shutil.which('apt') is not None: # debian, ubuntu
config.PACKAGE_MANAGER_COMMAND_INSTALL = "apt install -y"
config.PACKAGE_MANAGER_COMMAND_REMOVE = "apt remove -y"
config.PACKAGE_MANAGER_COMMAND_QUERY = "dpkg -l | grep -E '^.i '" # IDEA: Switch to Python APT library? See https://github.com/FaithLife-Community/LogosLinuxInstaller/pull/33#discussion_r1443623996
Expand Down