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

Re-structure flake #13

Merged
merged 3 commits into from
Nov 9, 2023
Merged

Conversation

brianmcgee
Copy link
Contributor

  • introduces flake.parts for a modular approach to composing the flake outputs
  • configures treefmt for nix fmt which enables the following:
  • exposes user, service and host NixOS modules in the nixosModules flake output
  • uses self references to the aforementioned NixOS modules when composing NixOS configurations
  • adds reuse-lint to check for copyright header issues when running nix flake check
  • adds flake-compat to ensure non-flake users can work with the repo and moves the devshell definition into the flake devShells.default output
  • adds a .envrc file for direnv users to automatically drop into the default dev shell when cd'ing into the repo
nix flake show
git+file:///home/brian/Development/github.com/tiiuae/ghaf-infra?ref=refs%2fheads%2ffeat%2fre-structure-flake&rev=60b187f064847e65a0471fe4ced9c4fcec8337f5
├───apps
│   ├───aarch64-darwin
│   ├───aarch64-linux
│   ├───x86_64-darwin
│   └───x86_64-linux
├───checks
│   ├───aarch64-darwin
│   │   ├───reuse: derivation 'reuse-lint'
│   │   └───treefmt: derivation 'treefmt-check'
│   ├───aarch64-linux
│   │   ├───reuse: derivation 'reuse-lint'
│   │   └───treefmt: derivation 'treefmt-check'
│   ├───x86_64-darwin
│   │   ├───reuse: derivation 'reuse-lint'
│   │   └───treefmt: derivation 'treefmt-check'
│   └───x86_64-linux
│       ├───reuse: derivation 'reuse-lint'
│       └───treefmt: derivation 'treefmt-check'
├───devShells
│   ├───aarch64-darwin
│   │   └───default: development environment 'nix-shell'
│   ├───aarch64-linux
│   │   └───default: development environment 'nix-shell'
│   ├───x86_64-darwin
│   │   └───default: development environment 'nix-shell'
│   └───x86_64-linux
│       └───default: development environment 'nix-shell'
├───formatter
│   ├───aarch64-darwin: package 'treefmt'
│   ├───aarch64-linux: package 'treefmt'
│   ├───x86_64-darwin: package 'treefmt'
│   └───x86_64-linux: package 'treefmt'
├───legacyPackages
│   ├───aarch64-darwin omitted (use '--legacy' to show)
│   ├───aarch64-linux omitted (use '--legacy' to show)
│   ├───x86_64-darwin omitted (use '--legacy' to show)
│   └───x86_64-linux omitted (use '--legacy' to show)
├───nixosConfigurations
│   ├───build01: NixOS configuration
│   └───ghafhydra: NixOS configuration
├───nixosModules
│   ├───azure-common: NixOS module
│   ├───common: NixOS module
│   ├───generic-disk-config: NixOS module
│   ├───host-build01: NixOS module
│   ├───host-ghafhydra: NixOS module
│   ├───service-binary-cache: NixOS module
│   ├───service-hydra: NixOS module
│   ├───service-nginx: NixOS module
│   ├───service-openssh: NixOS module
│   ├───user-bmg: NixOS module
│   ├───user-builder: NixOS module
│   ├───user-hrosten: NixOS module
│   └───user-tester: NixOS module
├───overlays
└───packages
    ├───aarch64-darwin
    ├───aarch64-linux
    ├───x86_64-darwin
    └───x86_64-linux

Signed-off-by: Brian McGee <[email protected]>
It's better maintained than Eelco's.

Signed-off-by: Brian McGee <[email protected]>
Adds origin in `default.nix` and `shell.nix` as they
were copied from samples.

Signed-off-by: Brian McGee <[email protected]>
@henrirosten henrirosten self-requested a review November 9, 2023 13:18
@henrirosten henrirosten merged commit f071822 into tiiuae:main Nov 9, 2023
1 check passed
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.

2 participants