Easiest Way To Write Nix | Code Editor Setup

Easiest Way To Write Nix | Code Editor Setup

Vimjoyer

2 месяца назад

13,009 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@quiet_owo
@quiet_owo - 20.11.2024 11:49

the goat

Ответить
@aloufin
@aloufin - 19.11.2024 03:40

this caught me up for a while, accidentally leaving 'pkgs.<item>' on the item... (I liked seeing the word pkgs... lol)

# autocomplete DOESNT WORK HERE
environment.systemPackages = [
pkgs.home-manager
pkgs.cowsay
]

but switching to

environment.systemPackages = with pkgs; [
home-manager
cowsay
]

works.....

Ответить
@willem6161
@willem6161 - 06.11.2024 21:44

You hit 20k subs, congrats🎉

Ответить
@robindeboer7568
@robindeboer7568 - 05.11.2024 06:14

Still waiting for nixd to give autocomplete and descriptions for builtins.... currently I use nixd only, but then I end up needing to do some actual logic and then suddenly I REALLY miss the docs for the builtins and start nil lsp manually....

nixd is amazing and has gotten a TON better. But yeah I would like complete/docs for builtins, and grabbing the comments for the lib function as hover docs would be really nice as well.

Ответить
@Soliprem
@Soliprem - 04.11.2024 21:09

nvf

Ответить
@HirschyKiss
@HirschyKiss - 02.11.2024 00:46

I'd love to see a video on how to set up deploy-rs

Ответить
@la_elucian
@la_elucian - 30.10.2024 00:36

Doing a quick search in the comments, I didn't see any mention of helix (another modal TUI editor akin to neovim).
The current unstable version in nixpkgs has nil support built-in (just make sure that nil is installed), and the helix flake includes nixd integration as well.

If you don't want to use the flake and you use home manager, you can still connect nixd to helix using the languages config (copying the nixd section in helix's github repo's languages config is a nice place to start).

Ответить
@willem6161
@willem6161 - 28.10.2024 23:36

I really appreciate the video, just the first 4 mins already helped my vscode setup a lot, but I have a question.
Would this be correct if my configuration.nix and home.nix files are both stored in /etc/nixos and if my host name is nix-host?
"options": {

"nixos": {
"expr": "(builtins.getFlake \"/etc/nixos\").nixosConfigurations.nix-host.options"
},
"home_manager": {
"expr": "(builtins.getFlake \"/etc/nixos\").homeConfigurations.nix-host.options"
},
},
Or should I have (builtins.getFlake \"/etc/nixos/flake.nix\") and (builtins.getFlake \"/etc/nixos/home.nix\")?

Ответить
@RazzaDazza0
@RazzaDazza0 - 28.10.2024 08:20

Thanks again for the great work you really helped us all with this guide plus all your other amazing and helpful work. Are you planning on making a video going over utilizing everything you've done so far to make a homelab setup? So implementing a VPN (wireguard maybe), jellyfin, secured remote connection, special editors, firefox, maybe flakes, maybe nextcloud, automated backups and automated updates, using sops too, etc?

Ответить
@TobiasFrei
@TobiasFrei - 26.10.2024 08:05

Oh my, of course most of us rolled our own over time. Me for instance using nil-ls. But now trying a newer nixd than I first encountered. Being so grateful again 🤓

Ответить
@bulldoser2610
@bulldoser2610 - 25.10.2024 17:54

What is the colour bars on your neovim?

Ответить
@JonasS-i8k
@JonasS-i8k - 25.10.2024 10:51

Thanks for the video, works great for me.
One thing i wonder: nixd autocompletes all options (NixOS/Home-Manager/Custom) in any nix module.
So in my Home-Manager modules, it will suggest NixOS options and vice-versa.
I guess there is no way for nixd to figure out if a certain module is used either by Home-Manager or NixOS?

Ответить
@needMoreInput
@needMoreInput - 25.10.2024 05:11

No nixvim? So much non nix raw code going one here.

Ответить
@zakuciael
@zakuciael - 25.10.2024 01:18

Awesome video, finally my VS Code setup can be useful for writing NixOS config. Thank you.

Ответить
@humanperson8418
@humanperson8418 - 25.10.2024 00:15

On your github, the formatting is under
nix.serverSettings: {nixd: {formatting}}
Why is this different to the video?

Ответить
@broggl
@broggl - 24.10.2024 23:20

the journalistic integrity is crazy, bro shows how to install on the emacs when he clearly is a vim lover, brings a tear to my eye 😢

Ответить
@xorgo92
@xorgo92 - 24.10.2024 13:43

Does nixd work for nixvim expressions?

Ответить
@connyholm
@connyholm - 24.10.2024 13:03

Works like a charm. Thank you!

Ответить
@jmartjonesy
@jmartjonesy - 24.10.2024 06:37

How would i setup the nixpkgs and options using Nixvim? I figured out how to use conform to setup nixd and the formatter using Nixvim but not sure how to configure the other options.

Ответить
@jahanson
@jahanson - 24.10.2024 04:23

nixfmt for me, can't handle the let being treated like a curly brace and I hate the pre-commas lol

Ответить
@bastiana3611
@bastiana3611 - 24.10.2024 03:16

Okay this is pretty sick. But how about options for a home manager setup embedded in a NixOS configuration?

Ответить
@borisoid
@borisoid - 24.10.2024 01:35

Yeah, when I have to record a 3 min loom for work, it takes me 30 mins, I hate it. Luckily, I only have to do it a couple times a year and there are almost no expectations.
But your videos are so good, i easily believe that voice-over alone takes that much time.

Hell, my comment about character thing you might remember, i was sitting there at night composing it for 40 minutes. Things you do for public are hard, man

Ответить
@borisoid
@borisoid - 24.10.2024 01:18

Huh, I didn't think good nix lsps existed. I only knew about rnix-lsp which is deprecated (if i remember correctly).
Thank you so much!

Ответить
@enesbala5195
@enesbala5195 - 24.10.2024 00:57

Thank you for this - small note to everyone, it may take a VS Code restart before the nixd LSP is recognized after installation.

Ответить
@bigr2904
@bigr2904 - 24.10.2024 00:13

As someone new to learning nix and that’s been just hammering away in neovim this will be immensely useful! Thank you!

One question I’m still unsure of; if you’re adding nixd as a package in home manager, then how would you get home manager to set those options in settings.json that you mentioned? Or will you always have to go and manually specify them afterwards?

Ответить
@techno_steve24
@techno_steve24 - 23.10.2024 23:10

Hey i really enjoy your videos, I started my nixos journey (switching from arch btw😉) from your videos and it has been great.I would really appreciate if you could make a video on how to setup distrobox and docker on nixos

Ответить
@dingus4138
@dingus4138 - 23.10.2024 22:43

Never heard of nixd. nills has been good but this seems even better, will have to give it a try.

Ответить
@AlexeyVakhrenev
@AlexeyVakhrenev - 23.10.2024 21:40

Was surprised to learn that nixpkgs-fmt repo was archived 3 months ago. I still use it everywhere.

Ответить
@Redstonewilli
@Redstonewilli - 23.10.2024 21:34

Thanks I will try it out right away! I've been using NixOS for a while now but without any LSP, which really annoyed me

Ответить
@kylejamesross
@kylejamesross - 23.10.2024 21:08

Go to definition did not seem to work correctly for nixd. I am probably going to continue using nil-ls for the time being until that is fixed.

Ответить
@qwfp
@qwfp - 23.10.2024 21:02

Ok, this is epic. It makes writing nix soooo much easier. Thank you! ❤

Ответить
@edhyjoxenbyl1409
@edhyjoxenbyl1409 - 23.10.2024 20:52

The newer official nixokgs formatter is `nixfmt-rfc-style` and is already enforced by nixpkgs CI (not a fan of it tho, as it makes increase file vertically a lot)

Ответить
@1234minecraft5678
@1234minecraft5678 - 23.10.2024 20:40

alejandra + nixd just awesome

Ответить
@ononaokisama
@ononaokisama - 23.10.2024 20:31

I don’t understand nix ricing I feel as if there is enough configuration just for terminal.

Ответить
@termitori
@termitori - 23.10.2024 20:27

how to set the "tabulation" to 4 spaces ?

Ответить
@inithinx
@inithinx - 23.10.2024 20:25

Your nix videos have made my nix journey so much easier and faster. Thank you.

Ответить
@v3rm1n
@v3rm1n - 23.10.2024 20:23

For me every option except nix.serverPath and nix.enableLanguageServer is greyed out

Ответить
@NeoAemaeth
@NeoAemaeth - 23.10.2024 20:20

I struggled to get the option completion working with nixd. These instructions made it very straightforward. Thanks!

Ответить
@Folvin-x1o
@Folvin-x1o - 23.10.2024 20:17

тудоо тудоо тудоо тудо тудо

Ответить
@Containerrd
@Containerrd - 23.10.2024 20:08

I miss the animated vimjoyer from last video.
How great this video comes right when I'm configuring my nixvim in a flake, have configured most of it, just have to configure LSP and integrate the flake in my flake.nix.

Ответить
@nanoyaki
@nanoyaki - 23.10.2024 20:06

Amazing video! Instantly switched to nixd haha

Ответить
@kokomema
@kokomema - 23.10.2024 19:56

I'm edging to your videos

Ответить
@___xdesna___4345
@___xdesna___4345 - 23.10.2024 19:55

Nice video my guy

Ответить
@xorlop
@xorlop - 23.10.2024 19:54

I think we can all agree that the nixpkgs-fmt style is 🤢:). And omg!! I had no idea the nix tooling has gotten so good. Excited to try this soon. This will make programming nix loads easier. 💗
I also am loving the new video animations and graphics. They look very nice.

Ответить
@slim5782
@slim5782 - 23.10.2024 19:52

I'll be re-switching to nixd apparently. I did find nil_ls a bit lackluster, perhaps because of the lack of configuring it.

Ответить
@starving207
@starving207 - 23.10.2024 19:52

👍

Ответить