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

fix: x86_64 template #556

Merged
merged 1 commit into from
Apr 11, 2024
Merged

fix: x86_64 template #556

merged 1 commit into from
Apr 11, 2024

Conversation

vilvo
Copy link
Contributor

@vilvo vilvo commented Apr 11, 2024

Description of changes

Checklist for things done

  • Summary of the proposed changes in the PR description
  • More detailed description in the commit message(s)
  • Commits are squashed into relevant entities - avoid a lot of minimal dev time commits in the PR
  • Contribution guidelines followed
  • Ghaf documentation updated with the commit - https://tiiuae.github.io/ghaf/
  • PR linked to architecture documentation and requirement(s) (ticket id)
  • Test procedure described (or includes tests). Select one or more:
    • Tested on Lenovo X1 x86_64
    • Tested on Jetson Orin NX or AGX aarch64
    • Tested on Polarfire riscv64
    • Tested on generic x86_64 template
  • Author has run nix flake check --accept-flake-config and it passes
  • All automatic Github Action checks pass - see actions
  • Author has added reviewers and removed PR draft status

Testing

$ nix flake new --template github:vilvo/ghaf/issue_555#target-x86_64-generic ~/test-ghaf-downstream-fix
cd test-ghaf-downstream-fix/
nix flake show

@vilvo vilvo temporarily deployed to internal-build-workflow April 11, 2024 06:29 — with GitHub Actions Inactive
@vilvo

This comment was marked as resolved.

@remimimimimi
Copy link
Contributor

nix fmt breaks the template by forcing the removal of nixos-hardware

nix fmt
git status
...
	modified:   templates/targets/x86_64/generic/flake.nix
git diff
diff --git a/templates/targets/x86_64/generic/flake.nix b/templates/targets/x86_64/generic/flake.nix
index ff2606f..61dd35c 100644
--- a/templates/targets/x86_64/generic/flake.nix
+++ b/templates/targets/x86_64/generic/flake.nix
@@ -43,7 +43,6 @@
     ghaf,
     nixpkgs,
     flake-utils,
-    nixos-hardware,
   }: let
     systems = with flake-utils.lib.system; [
       x86_64-linux

Any ideas to resolve this @henrirosten @Mic92 @mikatammi ?

@vilvo You can disable this by stating explicitly that you don't want deadnix to delete this part of code.

- fixes tiiuae#555

Signed-off-by: Ville Ilvonen <ville.ilvonen@unikie.com>
@brianmcgillion
Copy link
Collaborator

Overall I think that we need to really fix up all these templates, to be more inline with Ghaf and use the exported ghaf modules more. Also I think that the structure introduced by flake-parts is a cleaner starting point that the lib.recursive listed in these templates, so I am not sure if I would encourage anyone to use these templates as is.

@brianmcgillion brianmcgillion merged commit a210132 into tiiuae:main Apr 11, 2024
13 checks passed
@Mic92
Copy link
Collaborator

Mic92 commented Apr 11, 2024

I guess one can have both. For users that just have nixos configurations, not having to understand flake-parts might make things easier as people often struggle with having to deal with two module systems (the one of flake-parts and the nixos one). But as soon you got packages or manage many hosts, that complexity is worth it.

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.

Template(s) broken
4 participants