!apXxbtexmNGJaAryzM:nixos.org

NixOS on WSL

334 Members
https://github.com/nix-community/NixOS-WSL56 Servers

Load older messages


SenderMessageTime
28 Feb 2025
@k900:0upti.meK900 Why do you need a flake.nix in the first place? 11:36:55
@balanced_design:matrix.orgbalanced_designBecause 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:0upti.meK900That's definitely not the case11:39:49
@k900:0upti.meK900Anything you can do with flakes you can also do without flakes11:39:57
@k900:0upti.meK900Flakes may make some things more convenient, like adding external dependencies11:40:14
@k900:0upti.meK900But I would not recommend starting with them11:40:19
@k900:0upti.meK900Until you're at least somewhat familiar with Nix the language and the NixOS way of doing things11:40:34
@k900:0upti.meK900Because they complicate control flow significantly11:40:41
@balanced_design:matrix.orgbalanced_designOh. 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:matrix.orgbalanced_designThe architecture I work on is already insanely complicated.11:42:42
@balanced_design:matrix.orgbalanced_designWith large VPS program flow diagrams and all.11:43:06
@balanced_design:matrix.orgbalanced_designAlso 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:matrix.orgbalanced_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:0upti.meK900In that case I'd recommend reading https://jade.fyi/blog/flakes-arent-real/11:48:33
@balanced_design:matrix.orgbalanced_designThank you so much for the resource11:49:46
@balanced_design:matrix.orgbalanced_designDo 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:matrix.orgbalanced_design* Thank you so much for the resource ❤️11:52:04
@k900:0upti.meK900 The command would be nixos-rebuild switch --flake path/to/your/flake/directory#nameOfTheOutput 11:52:59
@k900:0upti.meK900But that's not your issue11:53:10
@balanced_design:matrix.orgbalanced_designI 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:matrix.orgbalanced_designAlso doesnt that command use the configuration in etc?11:55:32
@balanced_design:matrix.orgbalanced_designI was trying to craft a command for both being in the home/nixos directory.11:55:59
@k900:0upti.meK900 path/to/your/flake/directory can be any path on any filesystem 11:58:24
@k900:0upti.meK900 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:0upti.meK900 It does not need to be in /etc or in any other specific location, the path can be anything 11:58:59
@balanced_design:matrix.orgbalanced_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:0upti.meK900Yeah that makes no sense12:02:36
@k900:0upti.meK900You either need to provide a configuration.nix or a flake.nix12:02:43
@k900:0upti.meK900You can't have both12:02:48
@balanced_design:matrix.orgbalanced_designMultiple 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

Show newer messages


Back to Room ListRoom Version: 9