#flake — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #flake, aggregated by home.social.
-
#GitHub down? Nixpkgs can and should in most cases be fetched from channels.nixos.org because that is redistributed world-wide via #fastly with much higher availability and IPv6 support.
E.g. in your #flake use
nixpkgs.url = "https://channels.nixos.org/nixos-26.05-small/nixexprs.tar.zst";
instead of the github-flavored expression. Works for all supported channels.
-
@yisraeldov
Now if we make the flake.nixosModules.somename : {arg1, arg2} = {}
Then we can start composing too.In short: it's a very neat approach to modularize the options which scales better.
Those who are using nix flake-parts and dendritic pattern, feel free to correct me or simplify this please.
#nix #flakes #nixos #homemanager #nixhomemanager #flake-parts #dendritic #dendriticpattern
-
@yisraeldov
Personally in my config :
https://github.com/vivekanandan-ks/ksvnixospcconfigs/blob/main/flakepartsModules/xremap-fp.nixsee here how xremap requires both nixos and homeManager options to work, so I keep both in same file. Now when I don't want xremap, I just need to remove this file from the scene, that's all . No need to go to separate places like nixos module folder and homemanager module folder to delete.
#nix #flake #flake-parts #dendriticpattern
-
@yisraeldov
But in dendritic pattern we wrap option A to F under common top level attribute in same file:
flake.nixosModules.somename = {option A to C here}
flake.homeModules.somerelatedname = {option D to F here}And then we can do like
In nixos:-
imports =
[ self.flake.nixosModules.somename ]
In hm:-
imports = [self.flake.nixosModules.someothername]This way we can declare options of same aspects in same file and the import them later respectively.
#nix #dendritic #flake #flake-parts
-
@yisraeldov
(Follow this thread)
#dendritic nix is the idea of modularising in a very top level option. And #flake-parts is just one tool to achieve that, there are many custom functions that many use personally on their config too.
Eg:
optionA, optionB, optionC are nixos options
optionD, optionE, optionF are home-manager optionsWe use A to C in a nixos module file and D to F in hm module file and we can use both in same file, coz we typically import the whole file as module.
#nix #flake -
@arichtman
Recently started using #dendritic pattern using #flake parts it's really helpful.Earlier: A new module file means I add it to a folder, then import them in my configuration.nix home.nix accordingly.
Now: a module file added to a folder. That's it.
And more awesome is that I can place both a nixos module and home module in the same file to have aspects together🔥 much more benefits
It's worth doing things this way
#nix #nixos #dendriticpattern #config #management #flakeparts
-
So, I gave #devenv a try.
I'm used to work with #nix #flakes but I have to admin the devenv.nix file is less cluttered which lead to a better UX. But this comes at the cost of an extra devenv.yaml file. Why not, not a fan, but it works.
But, while #devenv configs are composable locally, they can't import a remote config as #flake does.
Also, `devenv shell` breaks my #tmux / #nvim setup where my #flake works like a charm.
So, yeah, I'll keep my #flake for now.
At work and at home.CC @Ilygad
-
#DNSCryptProxy2
#nixos #flake #part example (yes, made with Claude Code) made to see how many hoops are needed to be jumped through to not even get remotely close to the privacy that #reticulum provides over #nomadnet
Reticulum is remarkable as compared with the info leaky internet infrastructure we use daily. https://github.com/DNSCrypt/dnscrypt-proxy/discussions/3246 -
see post above:
1) repo of a #nixos #flake with #reticulum tools
2) install reticulum >= 1.3.4 run it with e.g. rnsd -v
3) install #Nomadnet / #meshchatx
4) rns://2348f5d47af0253e773334ed288adae9/public/reticulum_nixos_flake_rngit_mirror
5) 8331ef3af688e4153234a5910608dc30
6) [interfaces]
[[adingbatponder-repos]]
type = TCPClientInterface
interface_enabled = true
target_host = repoducible.net
target_port = 57001
name = adingbatponder-repos
2/3 -
@Pol Thanks. Yes, it should ALL be upstream derivations but the hate campaign against AI generated PRs is so bad I do not do it & make it all local. The flake uses 'parts' so you can pull in just the part/s you want: very handy so you do not need the whole flake & can test before maybe importing/harvesting the nix code The readme is not up to date, sorry. As you can see from the number of commits, even with Claude Code doing the heavy lifting, it is a very long term project to make my #flake.
-
Using a repo like codeberg and #git for managing a #flake for #nixos that applies for all multiple machines of a fleet each, having their own git branch, using the .#<machine_of_fleet> is really hard. Does anyone do this too? Why is it so hard? For example I have stopped using #checkout as a command because it makes no sense to me and leads to confusion, and use switch and restore. Also I have made a mental note not to refer to "main" in any operation other than the one master machine. Tips?
-
@freya I am trying out #ZFS on my "homelab" server but was most surprised that it seems one has to do all the ZFS setup external to the #flake which only lives within the manually made ZFS pool environment. That seems to mean I need a sort of orchestration script like tool to match flake /persist data settings (am using #impermanence lite currently) to the ZFS setup hoo-ha. Works fine but is not declarative #nixos at all really. Any ideas there ?
-
Solution in #nixos #flake for machine ThinkPad #x230 seems to be:
services.xserver.enable = true;
services.displayManager.gdm.enable = true;
services.desktopManager.gnome.enable = true;
services.desktopManager.gnome.flashback.enableMetacity = true;
# At the GDM login screen, click the gear # icon to choose between:
# - "GNOME" (Wayland)
# - "GNOME Flashback (Metacity)" #X11
and
nixos-rebuild boot + reboot is required (not switch) when jumping across major nixpkgs versions -
Could it be that if flake check crashes or freezes your machine then your flake and or your computer are officially silly? Is there a way of using an already extant remote build facility in the actual flake check also? #nixos #flake #flakecheck
-
@stadtkind @edwtjo Thanks for the input. FYI this is my playbook for this #git #nixos #flake synch / reconciliation process when two flakes have deviated and you want to make them the same by using a repo, e.g. codeberg , as the single source of truth. The solution uses the branch main on the main computer which has the main flake that should be up to date always, & a branch on the other machine named after the machine. The other machine will always commit to its branch https://codeberg.org/adingbatponder/reticulum_nixos_flake/src/branch/main/docs/git-flake-reconciliation.md
-
@stadtkind @edwtjo Well I really got into a spin. When doing the above where you
1. pull a new flake down into a directory with a new name /flake-new
2. rename the old /flake directory /flake-old
3. rename /flake-new as /flake and check this out as branch
4. try nixos-rebuild switch --flake .#<machine_name>caused the rebuild command not to switch. It just kept giving me the old generation...because I was doing 4. from previous main but should be done from the new branch #nixos #flake #git
-
Do you have a single #nixos #flake for multiple devices using different #nixosconfigurations in which for each device you have a specified /persist data location as part of an #impermanence setup? I am looking for examples, tips and foot-gun alerts.... cheers.
-
@stiefkind Als langjähriger Tonmeister bei der lit.RUHR muss ich sagen, dass du Recht hast, wenn du Recht hast. Aber jedesmal wenn du nicht Recht hattest war es so unfassbar klasse, dass ich nur ermutigen kann, das Risiko immer mal wieder einzugehen.
#arnogeiger #carolinewahl (okgeschmackssache!) #wolfhaas #frankgoosen #paulmaar #luisaneubauer #marionbrasch #jaroslavrudiš #johnlecarré #maxgoldt #flake ...
-
I was using #claudecode with #claude_sonnet_4_5 to play with #radicle and it became a bit of a mess, to say the least, for what I was trying to do. By accident my radicle server lost power & I had to restart & lost my claude session. So I took the opportunity to #update claude to #claude_opus_4_6 and used https://github.com/ryoppippi/claude-code-overlay too in my #flake . The results were astounding. The updated claude code explained the problem correctly (I had guessed what the issue was) & fixed it in minutes. Super.
-
Anyone using #Radicle to manage a #NixOS #flake “mother flake” across multiple machines?
I’m trying to confirm something: since Radicle is built on #Git, does rad init still leave you with a normal .git working tree that nixos-rebuild switch --flake . is happy with?
Or does Nix require a standard Git repo and can’t treat a rad://… repo as a flake input without an HTTP/SSH Git mirror? If you do this or similar, what’s your actual workflow? -
Er hat 'Tilsiter Lichtspiele' gesagt. https://youtu.be/chTIunrwOTo?si=bBqIh9csoY12Jpwb&t=3380 /via #MissversteheSieMichRichtig #flake #GregorGysi #fhain
-
Also a funny thing, Jujutsu (https://github.com/jj-vcs/jj) indirectly helps working with Nix configuration if it's defined via flake. As you might know, Nix refuses to evaluate the file if it's not tracked by Git, and since Jujutsu tracks all non-ignored files automatically, you can just add a .nix file, and it will evaluate without any problem :)
#nix #NixOs #jujutsu_version_control #jujutsu #flake -
@zer0unplanned This post looks very useful. I made a similar tool (still in beta with errors) to grab screenshots and raw data of manual pages #manpages for #linux commands, in this case #ssh info, and to present the different layers that are the OS, app and nixos settings. The program ssh-key-manager is in my flake https://repoducible.org ( features/security/packages #flake #part can be pulled out into another flake) & bit of a monster. Yours looks ultra compact #nixos
#flakepart #flakeparts -
Wrote my first (working) flake.
I still don't understand most of it, but I managed to successfully modify the template.
I'm still quite confused by what this thing actually does and why things (appear to) have be specified 29485 times instead of once.
But I think this is already good enough as a start. Right?
(Also is there an eta for when flakes are GA and no longer need the experimental features flags?
-
I found the reason, it's because of this:
https://github.com/NixOS/flake-registry?tab=readme-ov-file#flake-inputsLooks like it's available for every nix flake users officially and one can implicitly turn it off by configuring the registry options I guess.
But it's suggested to add inputs explicitly, since u might change ur registry later in ur configs in future.
Unexpected learning🤝
Thanks for pointing out this
@justdudeI didn't even notice. LoL.
#nix #flake #flakes #nixflakes #nixregistry #nixconfig #config