-
Notifications
You must be signed in to change notification settings - Fork 35
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/wrong colors status labels & nix buildingShell devShell not allowing to build cartero due to missing dependencies #84
Merged
danirod
merged 3 commits into
danirod:trunk
from
AlphaTechnolog:fix/wrong-colors-status-labels
Oct 22, 2024
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a somehow unrelated question here.
What's the difference between default.nix and flake.nix? I remember that some dependencies were added to default.nix back in #44.
Learning Nix is still on my to do list, but are there some cases where default.nix is preferred over flake.nix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well yeah it all depends on how you structure the nix implementation for your project, for cartero i tried to do it in a way similar to how i've seen in anothers projects ppl already did it, which is, using a flake.nix to create dev shells (environments where you get automatically all the dependencies for building your project), and exposing packages (so ppl can do in their terminal per example,
nix run github:danirod/cartero
and it will run cartero by downloading everything in one command (this actually works btw)) so the thing here is that im adding those dependencies aswell for the dev shell, so i get an environment to be able to build cartero manually by usingmeson setup build -Dprofile=development
myselfThe thing is that for some reason i had forgotten to add these aswell here before when i packaged this for nix? idk lmao but in any case this will do the trick
so in resume for this project
runHook meson
line) which automates it a little bit.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There're also others ways to packages nix projects without flakes (which is starting to be the preferred way) over nix channels, which is the older way... you may wonder why nix flakes over nix channels? nix channels requires user intervention for managing them, they'll define an upstream url and the user should manage them manually to switch to nixpkgs unstable or nixpkgs stable when the project requires it, with nix flakes you can define as the project maintainer which one to use, and which one your nix dependencies (third party projects) should follow, either it's unstable, stable, or even a nixpkgs fork
The legacy packaging usually used to look somehow like this
Inside mkShell it's basically the same as i did in the flake.nix, in fact i could make a legacy dev shell and then import it in my flake.nix so we get support for both legacy dev shells, and flakes based shells. Note that the
? import <nixpkgs> {}
expr, means that thepkgs
parameter, if not passed by no one, it will default to the result of importing nixpkgs (and around <> means from a nix channel)... this is similar to the expression i did in flake.nix that looks like thispkgs = import nixpkgs {inherit system overlays;}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am totally taking notes of this.
(I think that if I just get an Ethernet cable and a wired connection I could skip the "can't learn NixOS because can't setup the wifi on the NixOS I've just installed" phase)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@danirod how's that? have you got a weird wifi driver or something like that? i remember having such issue with a wifi dongle which didn't support in some older kernels, but in fact if you just enable
networking.networkmanager.enable = true
when installing nixos, it will add wifi support for the system when installing it, that ofc if the kernel has the drivers for wifi support on your system. If using calamares i am not sure tho, but you could follow the manual installation instructions via /mnt/etc/nixos/configuration.nix file and the nixos-install cli tool inside the livecd.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still don't know the reason. Naively I think that using NetworkManager is cheating, because then the network config would not be declarative. (It's fair to say that a declarative wifi config could be unsafe if not done properly, specially because PSK keys.) However, it seems to ignore me when I rebuild the system. Further research is still needed.