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

[Merged by Bors] - treewide cleanups and refactoring for initial tests #157

Closed
wants to merge 12 commits into from

Conversation

nrdxp
Copy link
Collaborator

@nrdxp nrdxp commented Mar 11, 2021

  • refactor lib into separate files, similar to NixOS/nixpkgs/lib.
  • refactor ci to automatically generate derivations from flake outputs
  • remove cluttered indirection statements throughout the codebase
  • refactor hosts to allow for upcoming integration tests
  • improve ambiguity in the existing docs
  • add BORS support
  • add initial integration test
  • write tests documentation
  • test lib
  • improve version string generation, and do so automatically for pkgs/flake.nix sources

Clean up the codebase as best we can in preparation for #152 and add tests. From now on, all PRs will be merged with BORS.

@nrdxp nrdxp requested a review from blaggacao March 11, 2021 22:26
nrdxp added 3 commits March 11, 2021 23:10
Lay the groundwork for easily testing profiles and modules via
`pkgs.nixosTest` and the new `testModule`.
@nrdxp nrdxp changed the title refactor lib and misc cleanups treewide cleanups and refactoring Mar 12, 2021
@nrdxp nrdxp changed the title treewide cleanups and refactoring treewide cleanups, refactoring and initial tests Mar 13, 2021
@nrdxp nrdxp requested a review from Pacman99 March 13, 2021 01:58
@nrdxp
Copy link
Collaborator Author

nrdxp commented Mar 13, 2021

bors ping

@bors
Copy link
Contributor

bors bot commented Mar 13, 2021

pong

@nrdxp
Copy link
Collaborator Author

nrdxp commented Mar 13, 2021

bors try

@bors
Copy link
Contributor

bors bot commented Mar 13, 2021

try

Configuration problem:
bors.toml: syntax error

@nrdxp
Copy link
Collaborator Author

nrdxp commented Mar 13, 2021

bors try

bors bot added a commit that referenced this pull request Mar 13, 2021
@bors
Copy link
Contributor

bors bot commented Mar 13, 2021

try

Build succeeded:

networking.wireless.iwd.enable = lib.mkForce false;
})
];
})).config;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated, I can submit a seperate PR for this. It turns out home-manager.useUserPackages has to be set to false with home-manager only configurations, so I added a hmConfig for hm-only configs.

hmConfig = (nixosSystem
            (args // {
              modules = modules ++ [
                ({ ... }: {
                  home-manager.useUserPackages = mkForce false;
                })
              ];
            })).config;

nrdxp added 2 commits March 13, 2021 00:05
Test whether a system containing all available profiles reaches a
successfully running state with no failed systemd services.
Reloading on every Nix file change is a bit too aggressive, causing
unnecessary reloads.
@nrdxp nrdxp added the enhancement New feature or request label Mar 13, 2021
@nrdxp nrdxp changed the title treewide cleanups, refactoring and initial tests treewide cleanups and refactoring for initial tests Mar 13, 2021
@nrdxp nrdxp self-assigned this Mar 13, 2021
Copy link
Contributor

@blaggacao blaggacao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lib looks a lot more organized and becomes easier to reason about.

Add sophistication to the version generation function, and use it
automatically on package sources pulled from pkgs/flake.nix. Also
remove it from lib, as it is no longer general purpose.
@nrdxp
Copy link
Collaborator Author

nrdxp commented Mar 14, 2021

bors r+

@bors
Copy link
Contributor

bors bot commented Mar 14, 2021

👎 Rejected by too few up-to-date approved reviews (some of the PR reviews are stale)

@nrdxp
Copy link
Collaborator Author

nrdxp commented Mar 14, 2021

bors r+

bors bot pushed a commit that referenced this pull request Mar 14, 2021
- [x] refactor lib into separate files, similar to NixOS/nixpkgs/lib.
- [x] refactor ci to automatically generate derivations from flake outputs
- [x] remove cluttered indirection statements throughout the codebase
- [x] refactor hosts to allow for upcoming integration tests
- [x] improve ambiguity in the existing docs 
- [x] add [BORS](https://bors.tech) support
- [x] add initial integration test
- [x] write tests documentation
- [x] test lib
- [x] improve version string generation, and do so automatically for pkgs/flake.nix sources

Clean up the codebase as best we can in preparation for #152 and add tests. From now on, all PRs will be merged with BORS.
@bors
Copy link
Contributor

bors bot commented Mar 14, 2021

Pull request successfully merged into core.

Build succeeded:

@bors bors bot changed the title treewide cleanups and refactoring for initial tests [Merged by Bors] - treewide cleanups and refactoring for initial tests Mar 14, 2021
@bors bors bot closed this Mar 14, 2021
@bors bors bot deleted the cleanup branch March 14, 2021 07:11
@Pacman99 Pacman99 mentioned this pull request Mar 23, 2021
bors bot added a commit that referenced this pull request Mar 23, 2021
210: hosts: add cachix r=nrdxp a=Pacman99

fixes #208 

I think it was dropped during #157. It used to be added to nixosModules, but I think its better added to hosts, I don't see a reason to export the cachix module as an output.

Co-authored-by: Pacman99 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants