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

Use default config dir #86

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

mike-lloyd03
Copy link
Contributor

This PR makes the --flake flag optional and uses /etc/system-manager as the default configuration dir. This brings it inline with home-manager switch and nixos-rebuild switch which also use a default dir. This will not be a breaking change for users who are using an alternate location since the --flake flag will still work.

Additionally, this adds an init subcommand which initializes this directory in the default location (or can be manually specified). It will use the example flake.nix provided in the README.md file to create the flake.

If you're okay with these changes, I'll also update the docs to include an example of how to use this.

Thanks.

@mike-lloyd03
Copy link
Contributor Author

@r-vdp, I just saw your comment on #84 (comment).

I think this PR is going to fall afoul of your recommendation there since I chose to put the flake in /etc and will need root permissions to run there. However, I think this is the right place for this file for the following reasons:

  • The user needs to be root in order to use system-manager
  • This tool is a system-wide tool and /etc is a common place for system-level configuration files

If you disagree, I can change the default directory to $XDG_CONFIG_HOME/system-manager.

@zimbatm zimbatm requested a review from r-vdp June 24, 2024 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant