| 28 Feb 2025 |
K900 | Why do you need a flake.nix in the first place? | 11:36:55 |
balanced_design | Because when ever Im trying to figure out how to do something I seem to come accross ways to do it with flakes decently more commonly. And because as far as I understand they allow doing many things that configuration.nix files dont that are important to what Im doing. I cant remember exactly, I have it noted down.
I could always be wrong, Nix hasnt been that easy to find info on comparative to other things. | 11:39:32 |
K900 | That's definitely not the case | 11:39:49 |
K900 | Anything you can do with flakes you can also do without flakes | 11:39:57 |
K900 | Flakes may make some things more convenient, like adding external dependencies | 11:40:14 |
K900 | But I would not recommend starting with them | 11:40:19 |
K900 | Until you're at least somewhat familiar with Nix the language and the NixOS way of doing things | 11:40:34 |
K900 | Because they complicate control flow significantly | 11:40:41 |
balanced_design | Oh. Please, I dont want to learn an intermediate thing. I can understand very compilicated things I just need somewhere there are resources. | 11:42:09 |
balanced_design | The architecture I work on is already insanely complicated. | 11:42:42 |
balanced_design | With large VPS program flow diagrams and all. | 11:43:06 |
balanced_design | Also I found a really nice artical on flakes, so Im alot less worried then I otherwise would be:
https://vtimofeenko.com/posts/practical-nix-flake-anatomy-a-guided-tour-of-flake.nix/ | 11:45:57 |
balanced_design | * Oh.
Please, I dont want to learn an intermediate thing. I can understand very compilicated things I just need somewhere there are resources. | 11:48:01 |
K900 | In that case I'd recommend reading https://jade.fyi/blog/flakes-arent-real/ | 11:48:33 |
balanced_design | Thank you so much for the resource | 11:49:46 |
balanced_design | Do you have what the command would be? If not I can look through this is case it answers and otherwise ask elsewhere. | 11:50:34 |
balanced_design | * Thank you so much for the resource ❤️ | 11:52:04 |
K900 | The command would be nixos-rebuild switch --flake path/to/your/flake/directory#nameOfTheOutput | 11:52:59 |
K900 | But that's not your issue | 11:53:10 |
balanced_design | I mean Ive been trying to get a build working with a flake and configuration in the home directory so I can edit them with an external editor using the network shared drive, so I can actually interactively test things I read. | 11:54:58 |
balanced_design | Also doesnt that command use the configuration in etc? | 11:55:32 |
balanced_design | I was trying to craft a command for both being in the home/nixos directory. | 11:55:59 |
K900 | path/to/your/flake/directory can be any path on any filesystem | 11:58:24 |
K900 | Also, if your actual goal is to just have the configuration somewhere you can edit it without being root, you can just nixos-rebuild switch -I nixos-config=path/to/your/configuration.nix | 11:58:48 |
K900 | It does not need to be in /etc or in any other specific location, the path can be anything | 11:58:59 |
balanced_design | Yah the command I was running combined both those functions,
nixos-rebuild switch -I nixos-config=path/to/your/configuration.nix --flake path/to/your/flake/directory#nameOfTheOutput but I couldnt find much online of people actually using both path customizations at the same time so I wasnt sure if that was why I was failing to get a successful rebuild switch. | 12:02:23 |
K900 | Yeah that makes no sense | 12:02:36 |
K900 | You either need to provide a configuration.nix or a flake.nix | 12:02:43 |
K900 | You can't have both | 12:02:48 |
balanced_design | Multiple documentations seemed to imply to me otherwise. But then again Im trying to figure out things from documentation that many times is only a couple sentences for each section. | 12:05:11 |