Nix-Config Workflow Recipes Using Just

  Рет қаралды 1,981

EmergentMind

EmergentMind

Күн бұрын

A quck video explaing how I use the 'just' utility to streamline working with my nix-config. Check out the links below for related content and the repos mentioned in this video.
OUTLINE
0:00 Introduction
0:31 Installation in nix-config
0:42 Example justfile
0:58 My nix-config justfile
1:20 Listing recipes with a default recipe
1:33 Flake rebuild related recipes (rebuild, rebuild-full, rebuild-pre, and rebuild-post)
2:32 Example of a common oversight: rebuilding with an unstaged .nix file. This is mitigated by using the justfile recipes
3:04 sops secrets related recipes
4:02 rebuild-trace
4:19 update and rebuild-update
4:39 addition sops secrets recipes
5:00 reference to my secrets management series
5:09 recipes related to my upcoming series on automating remote install and config boostrapping
5:22 example output of 'just iso'
5:29 questions and thanks
5:45 500+ subs!
SUPPORT
ko-fi.com/unmovedcentre
RELATED VIDEOS
- Structural anatomy of my nix-config: • Anatomy of a NixOS Con...
- Sops and secrets management in NixOS: • NixOS Secrets Manageme...
CONNECT
- Subscribe to this KZbin channel
- My website: www.unmovedcentre.com
- X / Twitter: / emergent_mind
- GitHub: github.com/EmergentMind
- GitLab: gitlab.com/emergentmind
EXTERNAL REFERENCES
- the official 'just' repository: github.com/casey/just
- My nix-config justfile: github.com/EmergentMind/nix-c...

Пікірлер: 18
@MrPezetko
@MrPezetko Күн бұрын
You can specify pre/post dependencies on the command itself like this: rebuild: rebuild-pre && rebuild-post Will run "rebuild-pre", "rebuild" and "rebuild-post" in this order.
@Emergent_Mind
@Emergent_Mind Күн бұрын
Thanks for this! So much to learn :)
@Peter1215
@Peter1215 24 күн бұрын
Just is really cool, I'm using it it almost every project (mostly infra/k8s focused). One thing I found very useful is combining just recipes with direnv variables if you have sensitive data somewhere. I also found that inlining the scripts is more readable than referencing them via separate files, the just file is bigger, but everything is more accessible. On the nix side, I tried to dive into it a few times but was always put off by the quirky syntax and just overall complexity, but maybe with justfile I might give it another try.
@Emergent_Mind
@Emergent_Mind 23 күн бұрын
Combining with direnv is a cool idea! Nix is a bit daunting given it's differences from the 'norm'. The declarative aspect is what ultimately sold me on diving into it. Let me know how it goes if you do give it another try :) Thanks for watching!
@khwpp5943
@khwpp5943 25 күн бұрын
Some recipes may be shortened by using specific syntax. You might want to take a look at the examples/ dir at the project's GH page. This is a great tool I've been using lately, simpler than Makefile as well. Have you taken a look at the "NH" nix helper?
@Emergent_Mind
@Emergent_Mind 25 күн бұрын
Thanks for the suggestion, I'll look into that. I have looked briefly at NH but haven't tried it out yet. It's on the list to explore though :)
@brentonbills5946
@brentonbills5946 25 күн бұрын
Looking forward to the new series. Just looks like Make?
@Emergent_Mind
@Emergent_Mind 23 күн бұрын
Glad to hear. It's been an interesting set of problems to solve. Just syntax was inspired by Make, but the tool itself is much simpler. Thanks for watching!
@jahanson
@jahanson 24 күн бұрын
Do you only need to stage and not commit? I thought you had to commit.
@khwpp5943
@khwpp5943 24 күн бұрын
stage only; git add'ing suffices.
@ttrss
@ttrss 24 күн бұрын
for your use case is this not literally just make? I don't see the difference
@khwpp5943
@khwpp5943 24 күн бұрын
it's Make, but simpler. just is designed as a command runner rather than a build system which in consequence avoids many complexities from Make.
@Emergent_Mind
@Emergent_Mind 23 күн бұрын
My current use case isn't much different but, as @khwpp5943 mentioned, expanding the recipes in the future will keep things simple. Thanks for watching!
@anonymouscommentator
@anonymouscommentator 21 күн бұрын
i dont quite get how this is any different to calling a shell script
@Emergent_Mind
@Emergent_Mind 19 күн бұрын
In some ways they are not much different and there is certainly overlap in basic utility. However, just (and make for that matter) are declaritve in nature whereas bash scripts are imperative. Granted, my examples and use case at the moment don't really demonstrate that. Thanks for watching and commenting!
@anonymouscommentator
@anonymouscommentator 19 күн бұрын
@@Emergent_Mind thanks for the clarification!
My Neovim & Tmux Terminal Dev Workflow As A Principal Engineer
9:22
DevOps Toolbox
Рет қаралды 33 М.
We can now write scripts using these languages, but is it worth it?
8:28
When someone reclines their seat ✈️
00:21
Adam W
Рет қаралды 17 МЛН
ONE MORE SUBSCRIBER FOR 6 MILLION!
00:38
Horror Skunx
Рет қаралды 15 МЛН
NixOS Automated Remote Bootstrapping with Secrets - Part 1
9:41
ᵗªⁱᶜʰⁱ
2:19
Fleck
Рет қаралды 1,5 М.
7 Essential Command Line Tools (2022)
9:12
Tech Craft
Рет қаралды 190 М.
NixOS tutorial - Nix Packages
18:30
Why Does Nothing Work
Рет қаралды 1,1 М.
Anatomy of a NixOS Config - Part 1/2
10:22
EmergentMind
Рет қаралды 6 М.
Tmux will SKYROCKET your productivity - here’s how
10:02
typecraft
Рет қаралды 65 М.
Become a shell wizard in ~12 mins
12:25
CODE IS EVERYTHING
Рет қаралды 212 М.
NixOS Secrets Management | SOPS-NIX
6:35
Vimjoyer
Рет қаралды 12 М.
My Bash Prompt
11:39
Chris Titus Tech
Рет қаралды 30 М.
My Forever Dev Workflow
16:02
typecraft
Рет қаралды 63 М.
Carregando telefone com carregador cortado
1:01
Andcarli
Рет қаралды 2,2 МЛН
Не обзор DJI Osmo Pocket 3 Creator Combo
1:00
superfirsthero
Рет қаралды 1,3 МЛН