Nix Flakes | 890 Members | |
| 179 Servers |
| Sender | Message | Time |
|---|---|---|
| 12 Dec 2023 | ||
| hmm, is there a more elegant solution for adding overlays in a flake than
or is this just how it's done? | 14:33:42 | |
| (sorry, I feel like I'm asking stupid questions, but it feels like flakes+nix together have so many ways of overriding and referencing packages that it's hard to find the "right" way to do something) | 14:35:55 | |
| there are many ways to do overlays - it really depends on what you need to do with them tbh | 15:10:06 | |
if you "just" want to use them in nixos (or nix-darwin), then a module that does {nixpkgs.overlays = [self.inputs.emacs-overlay.overlay];} (where self is the flake, as referenced in the flake's output closure) does the trick; if you need overlays in the pkgs refs that are used inside the flakes, then your thing seems right | 15:11:44 | |
| (and if you use e.g. flake-parts, it's a different thing altogether) | 15:11:54 | |
In reply to @wucke13:matrix.org | 15:18:13 | |
| (as in https://git.sr.ht/~dblsaiko/nix-extras/tree/master/item/flake.nix#L80) | 15:18:36 | |
| but formally packages are system.attr, while hydraJobs is attr.system | 17:25:01 | |
| 21:44:05 | ||
| 13 Dec 2023 | ||
In reply to @wucke13:matrix.orgoh, I guess so, didn't know hydraJobs had any kind of structure | 09:09:12 | |
| hydra itself doesn't care at least :D | 09:09:54 | |
| I see :D | 09:14:33 | |
| 15 Dec 2023 | ||
| 14:22:34 | ||
| So I'm having a hard time grasping flakes and why I should start using them. I am still pretty new to nix os. | 14:23:17 | |
| Can someone please help me to understand? | 14:23:38 | |
In reply to @themountainking:matrix.orgthey try to give you a more ore less defined api of inputs and outputs, kinda like a swagger.json for rest apis in case you are familiar but a lot more vibes and less standard. A output can be anything from a systemConfiguration, to a derivation or function. I don't know if you should start using them that's a kind hard question to answer. a lot of unofficial documentation has support and many times even better support for them because many people feel it's easier learning them. Basically anything you can do with flakes can also be done without them and for some things you need community tools like niv or npins for pinning versions. | 14:34:00 | |
In reply to @janik0:matrix.orgThank you for your input. I understand a little better now. Not sure if they are required for my humble use at this time. Having a solid nix config file seems to be doing the trick. I would like to dabble in impermeance once I better understand that. | 14:41:46 | |
| fyi, there is a #impermanence:nixos.org channel if you start playing with that or have more questions ^^ | 14:42:53 | |
| I just like a nice simple secure OS configured to my exact specifications, use flatpaks for most of my commonly used personal apps, then virtual machines and docker containers for work. | 14:42:55 | |
In reply to @janik0:matrix.orgThanks! I'll check them out. | 14:43:23 | |
| 16 Dec 2023 | ||
In reply to @themountainking:matrix.orgWhat do you find better about flatpaks over nix installed and isolated profiles? Please don't take this as an attack - I just don't quite see the appeal and am genuinely curious. | 13:08:55 | |
| 19 Dec 2023 | ||
| 07:08:56 | ||
| 16:48:09 | ||
| 20 Dec 2023 | ||
| 20:38:38 | ||
| 21 Dec 2023 | ||
| 10:16:15 | ||
| 23 Dec 2023 | ||
In reply to @bryan.bennett:matrix.orgCould be, because I am still new to nixos. Don't know what isolated profiles are. Aside from that the appeal of flatpaks for me are that software sources are often directly published and maintained there. With flatpaks you'll often get the most up to date versions as soon as they are released. | 12:49:26 | |
In reply to @bryan.bennett:matrix.orgCould you please explain why your way is more beneficial? I'd like to understand your viewpoint. | 12:50:42 | |
| flatpaks are good for encapsulation. They have a concept called runtime that are a standard set of libraries that your application builds against. But note that all of this means that your own application or library cannot be re-used by others, they have to build/bundle/distribute it because it is not a part of the blessed "runtime". In Nix there is no blessed runtime, even the dynamic linker. So we take that concept to the extreme to the point where anything you build/distribute can be reused/shared, and won't conflict with anything else either. So if you only have a concern of distributing one application, flatpak might be a better choice. Nix has made a different set of tradeoffs. profiles allow you to group together several packages into a single directory tree. | 22:07:24 | |
| 24 Dec 2023 | ||
| 10:06:36 | ||
| 18:12:55 | ||