Тёмный

Nix Flakes - An Overview 

Jake Hamilton
Подписаться 1,4 тыс.
Просмотров 5 тыс.
50% 1

Not sure what a Nix Flake is? You're in the right place! In this video we take a look at the problems that Nix Flakes solve and how to get started using them.
For more detailed information, I recommend reading through this page on the NixOS Wiki:
nixos.wiki/wiki/Flakes
Say hello on Mastodon!
hachyderm.io/@jakehamilton

Опубликовано:

 

1 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 20   
@jakehamiltondev
@jakehamiltondev 4 месяца назад
Corrections: - The command "nix check" should instead be "nix flake check". The former is incorrect and does not exist. I probably confused it with my aliased helper. Oops!
@vimjoyer
@vimjoyer 4 месяца назад
Now this is the best flakes explanation on the internet 👑
@jakehamiltondev
@jakehamiltondev 4 месяца назад
Means a lot coming from you! Thank you!
@jh-devv
@jh-devv 4 месяца назад
Hiiii Vimjoyer!
@Westtixy
@Westtixy 4 месяца назад
Cleanest explanation of flake out there !
@IogaMaster
@IogaMaster 4 месяца назад
Thanks Jake!
@karthikeyanbalasubramanian7305
@karthikeyanbalasubramanian7305 2 месяца назад
can you make a video on nix dev for actual development and packaging end to end
@archieatkinson7502
@archieatkinson7502 4 месяца назад
Glad to see your making videos again, your earlier Nix videos really helped me
@juca8001
@juca8001 4 месяца назад
snowfall-lib works for nixos and home-manager separated too? and modules for old and new gpu with nixgl? deploy-rs deploys only home-manager too? Sry to ask you this questions, but i like how snofall-lib handle things, and im up to build my own configs .
@jakehamiltondev
@jakehamiltondev 4 месяца назад
You can use Home-Manager in both standalone or as a NixOS module when using Snowfall Lib. You won't have to worry about NixGL if you're on NixOS, but on other linux systems you may need to use it to make sure graphics work for some applications. This is unrelated to Snowfall Lib, though :)
@natcafe
@natcafe 4 месяца назад
can you start recording asmr please
@nomoredarts8918
@nomoredarts8918 Месяц назад
Nord?
@anasouardini
@anasouardini 16 дней назад
When is the Nix language going to have a CLI interface like other languages or at least be more versatile like other config languages: - e.g: `node -e "console.log('lksdjf');" - e.g: JSON can be read and modified by almost any language out there, even BASH can use tools like `jq` to manipulate JSON. Why do I have to keep string-manipulating NixOS config files just to do some automation?
@MrVampify
@MrVampify 12 дней назад
it does: nix repl Also json is NOT a configuration language. It's an object expression language. nix is a functional expression language. Because nix is a purely functional language you need to understand the paradigm. There is no "steps" in nix (a log/print function will not help you much). You have declarations that define state and outputs. You can have the following: flake.nix flake.lock home.nix common.nix configuration-home.nix configuraiton-server.nix you can have import expressions and write your own functions to make redundant declarations in many files. the common.nix can have expressions that are used in both home and server configurations. the flake.nix and flake.lock ensure that the inputs are the same every single time your build. the power of nix is that you can have 1 flake manage an entire network of computers, and git track it for time-machine like rollback. You have to remember the goal is reproducability. If you could imperitively change things you would break your state and lose all the powers nix gives you. If you want a config to be able to change, don't declare it in your config, but know that you will lose the reproducability.
@anasouardini
@anasouardini 12 дней назад
@@MrVampify > it does: > nix repl Thanks, man. Why don't NixOS communit on Discord be like you! instead of educating me on silly NixOS topics, the OS is just a tool after all. I just found Repl and Eval. Both are great, tho they don't save data to config files. I need to interface with the config files, not just the OS. > Also json is NOT a configuration language. It's an object expression language. It is, to many people. If not, it could be, what could stop it? What's a config? how complex is your config? what would stop some random string format from being a config language? This never ends, but it's of no good pedantically splitting hairs. However, I only mentioned JSON because of it's versatility, sorry if I caused any confusion! > nix is a functional expression language. > Because nix is a purely functional language you need to understand the paradigm. I like most of the functional programming paradigm, that's never my problem. > There is no "steps" in nix (a log/print function will not help you much). You have declarations that define state and outputs. No idea what you said here, ¯\_(ツ)_/¯. > You can have the following: > flake.nix > flake.lock > home.nix > common.nix > configuration-home.nix > configuraiton-server.nix > you can have import expressions and write your own functions to make redundant declarations in many files. > the common.nix can have expressions that are used in both home and server configurations. > the flake.nix and flake.lock ensure that the inputs are the same every single time your build. > the power of nix is that you can have 1 flake manage an entire network of computers, and git track it for time-machine like rollback. I'm yet to explore that side of it. > You have to remember the goal is reproducability. If you could imperitively change things you would break your state and lose all the powers nix gives you. It doesn't have to be a black-white situation: we could have both, the command could reflect the changes in a config file, or maybe I just want to do some temporary stuff, one command and rebuild to get the old state. The reason I need that interface, because in Installation phase, I needed to have some booting options changed to automate my installation, I wouldn't need it If I found some official config file for installation (I'm planning to learn Disko, althogh many folks in NixOS Discord server advised me not to). > If you want a config to be able to change, don't declare it in your config, but know that you will lose the reproducability. Again, why not have the best of both world? Anyways, I already made some silly installation script and hosted it in my repo. I'll soon add to it the post-installation flakes thingy, and probably won't need to cry about such topic.
@simonlewis6686
@simonlewis6686 2 месяца назад
I still don't get it. Just so abstract
@r2-p2
@r2-p2 4 месяца назад
Still no clue what flakes are. :(
@Telopead
@Telopead 3 месяца назад
think of it as a docker container. Configuration.nix is a giant function in nix language. The first set of {} is parameter list, and second one in which we declare our Nixos environment is return value, a giant data set. It’s just inputs and outputs in flakes. Except in flakes we write it differently, not as function but a data set. We put parameters in inputs and return values in outputs, and that’s it. The only difference between configuration.nix and a flake is that we have much better control over inputs and outputs, particularly inputs(dependencies).
@anasouardini
@anasouardini 12 дней назад
It's another way of configuring the system ¯\_(ツ)_/¯, it'll manage your /etc/nixos/.configuration.nix instead of doing it the traditional way. And home-manager is a configuration that are specific for the home directory. I find these topics really simple, it's just the way they explain it is really unusual, they are unusual people after all! (kidding)
@BraxtonMeyer
@BraxtonMeyer 4 месяца назад
Turn your mic up plz.
Далее
DO NOT Dunk Here ❌🏀
00:20
Просмотров 5 млн
Nix and NeoVim
13:38
Просмотров 120 тыс.
I was WRONG! This is the BEST Package Manager.
10:25
Просмотров 135 тыс.
NixOS Has One BIG Problem
17:48
Просмотров 62 тыс.
NixOS tutorial - Nix Packages
18:30
Просмотров 2,5 тыс.
Intro to Flakes
19:32
Просмотров 20 тыс.
NixOS is Mindblowing
12:02
Просмотров 673 тыс.
NixOS: Everything Everywhere All At Once
15:10
Просмотров 277 тыс.
DO NOT Dunk Here ❌🏀
00:20
Просмотров 5 млн