Skip to content

fix(configuration): use dirname for configuration if path is to a direct file#87

Merged
water-sucks merged 1 commit intonix-community:mainfrom
water-sucks:use-correct-directory-for-legacy-configs
Jul 7, 2025
Merged

fix(configuration): use dirname for configuration if path is to a direct file#87
water-sucks merged 1 commit intonix-community:mainfrom
water-sucks:use-correct-directory-for-legacy-configs

Conversation

@water-sucks
Copy link
Copy Markdown
Collaborator

Previously, the LegacyConfiguration instantiation was provided a ConfigDirname that was an exact copy of the nixos-config entry in the NIX_PATH. However, this can sometimes point to a file like /etc/nixos/configuration.nix, rather than a directory.

If this is the case, use the directory that this file is located in as the configuration location.

Closes #82.

@water-sucks water-sucks merged commit 3387bcb into nix-community:main Jul 7, 2025
1 check passed
@water-sucks water-sucks deleted the use-correct-directory-for-legacy-configs branch July 7, 2025 06:52
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.

Setting use_git_commit_msg not working with "legacy" import (no flakes)

1 participant