24 Jul 2021 |
David Arnold (blaggacao) | bud is a functor. | 16:32:26 |
@yusdacra:nixos.dev | In reply to @blaggacao:matrix.org
bud is a functor. I see | 16:32:45 |
David Arnold (blaggacao) | 😇 | 16:32:44 |
@yusdacra:nixos.dev | Thanks for the help | 16:32:55 |
David Arnold (blaggacao) | Haha, I think that breaks a few tacit downstream assumptions 😁 | 16:33:24 |
David Arnold (blaggacao) | nickel 🙏 | 16:33:33 |
@timdeh:matrix.org | I just realized that I should add a module option containing a list of branch names that don't get deleted by quick-nix-registry even if they don't exist upstream. Would be a good way to make your own branches containing PR patches rebased ontop of the latest unstable or release 🤔 | 16:39:41 |
@timdeh:matrix.org | then you could just refer to them in your flake as nixpkgs/my-super-cool-branch | 16:40:10 |
David Arnold (blaggacao) | Inputs Patching Light (TM) | 16:40:34 |
@timdeh:matrix.org | basically yeah 😆 | 16:40:47 |
25 Jul 2021 |
fufexan | is there any way in fup to remove a channel? | 17:03:51 |
fufexan | a devshell channel is autogenerated because of legacyPackages | 17:04:10 |
fufexan | should I fetchFromGithub in a separate file then point the revision and sha to flake.lock ? | 17:04:38 |
h4rdstyl3z | Hey everyone! I have recently decided to give devos a try and started converting my pre-existing NixOS configuration to its format and I have a couple of doubts that I couldn't solve through the documentation and I'd like to confirm with you:
- Is it possible to remove inputs from the main
flake.nix ? Specifically, I'd like to remove nixos-hardware , since I won't use it (as there's nothing relevant there for my use case). Is it just a matter of removing the input itself or is there a more involved process?
- From nxdxp's config I gathered that it's possible to split option declarations throughout different files and it all gets merged (for instance, several
environment.systemPackages declarations in different files), but does this apply everywhere? Are there any special considerations to be had (exceptions, edge cases, etc. that I need to be wary of)?
Thanks in advance for the work put into this project!
| 20:34:18 |
Pacman99 | Hii! I'm glad your trying devos out.
- Yes removing inputs is pretty simple, you remove the line in the inputs at the top and the line where the input is used. For nixos-hardware, its actually not used anywhere in devos by default(I think) so you should just be able to remove the input line.
- Thats actually a feature of the nixpkgs module system. options can be defined in multiple files - the technical term is different modules - and they get merged. options that are list, like systemPackages, will get appended. You can learn more about nixos module system in it's manual.
| 20:37:49 |
Pacman99 | * Hii! I'm glad your trying devos out.
- Yes removing inputs is pretty simple, you remove the line in the inputs at the top and the line where the input is used. For nixos-hardware, its actually not used anywhere in devos by default(I think) so you should just be able to remove the input line.
- Thats actually a feature of the nixpkgs module system. options can be defined in multiple files - the technical term is module - and they get merged. options that are list, like systemPackages, will get appended. You can learn more about nixos module system in it's manual.
| 20:38:11 |
h4rdstyl3z | Oh, thanks for the clarification. Strangely, I wasn't aware that Nix's modules actually worked like that out of the box and thought it was something added by devos . It is a good thing to know though. I was thinking that one definition would override the others, like a variable assignment in a programming language. Maybe I should read the manual more often 😅. | 20:40:54 |
Pacman99 | Yeah to be clear its specific to NixOS, and uses of the nixpkgs module system. But a simple // would cause lists to be overridden. | 20:42:01 |
@timdeh:matrix.org | relevant? 😆
| 21:22:34 |
@timdeh:matrix.org |  Download image.png | 21:22:38 |
26 Jul 2021 |
@gytis-ivaskevicius:matrix.org | In reply to @fufexan:matrix.org is there any way in fup to remove a channel? Ideally need for something like this would not exist at all. but I don't think there is a way 😕 I need to look into it and implement it somehow | 02:52:22 |
@kraftnix:matrix.org | what's the current suggested way for adding new packages which are already defined in some external flake?
the docs in develop for pkgs seem to be out of date, but the nvfetcher docs seem to suggest adding it to sources.toml then defining an overlay as is done with manix , to override pname , version and src
I tried doing this with rnix-lsp , which I can build fine if I separately clone it, but if I just follow the same override syntax as manix I get a cargoSha256 error.
I'm guessing this is overall not the correct way to do this, does anyone have some suggestions?
| 11:58:37 |
@gytis-ivaskevicius:matrix.org | have any of you guys heard of some sort of deprecation policy? | 15:41:35 |
@gytis-ivaskevicius:matrix.org | like i'd love to remove python2 shitties but can i straight up just remove stuff that is unused? | 15:42:03 |
David Arnold (blaggacao) | In reply to @kraftnix:matrix.org
what's the current suggested way for adding new packages which are already defined in some external flake?
the docs in develop for pkgs seem to be out of date, but the nvfetcher docs seem to suggest adding it to sources.toml then defining an overlay as is done with manix , to override pname , version and src
I tried doing this with rnix-lsp , which I can build fine if I separately clone it, but if I just follow the same override syntax as manix I get a cargoSha256 error.
I'm guessing this is overall not the correct way to do this, does anyone have some suggestions?
There are two ways: nixpkgs's overlays or flake's follows . With the follows -way you bet on memoizing the nixpkgs evaluation that a certain package requires to build. Memoization works if the import call signature of nixpkgs is equal, for example import nixpkgs { config = {}; overlays = [];} With the overlays way, you "patch" external instructions into the pkgs namespace. This is why pkgs.addOVerlay or pkgs.extend do a full re-evaluation of the entire pkgs namespace to calculate a new fixed-point (taking into account the added packages).
sources , on the other hand is itself an overlay that adds the pkgs.sources namespace that holds reference to a source's package name, sourcecode and version information.
| 16:16:03 |
David Arnold (blaggacao) | You can reuse a nixpkgs build instruction and just override those parameters, as done with manix or you can add your own build instructions to the ./pkgs folder as an alterantive. | 16:16:57 |
David Arnold (blaggacao) | The error you experience is probably due to the way module dependencies are handled in rust, but also go, etc.: a source (autonomously, outside of nvfetcher's knowledge) fetches submodules according to the language source distribution mechanism (eg. Cargo.lock ). | 16:18:25 |
David Arnold (blaggacao) | Those submodules are "pinned" in `nixpkgs's build instrucations (the one you reuse) to the sha of those modules as per the original source. | 16:19:01 |
David Arnold (blaggacao) | Probably also overriding this "pinned" valued with the one that you experience, might get you one step further. Alternative redoing the building instructions within ./pgs should always work. | 16:20:01 |
David Arnold (blaggacao) | * Probably also overriding this "pinned" valued with the one that you experience, might get you one step further. Alternative redoing the building instructions within ./pkgs should always work. | 16:20:17 |