framapiaf.org est l'un des nombreux serveurs Mastodon indépendants que vous pouvez utiliser pour participer au fédiverse.
Un service Mastodon fourni par l'association d’éducation populaire Framasoft.

Administré par :

Statistiques du serveur :

1,4K
comptes actifs

#flakes

1 message1 participant0 message aujourd’hui

Ok #NixOS people who love #flakes .. can I put my flake.nix in a non standard location? I have a git repo I have all my nix modules in.

```
[mkelly@garage:~/Projects/nix]$ ls
cheatsheet cinnamon common flake.nix gnome hacks helix hyprland kde nvim sway wallpapers

[mkelly@garage:~/Projects/nix]$ sudo nixos-rebuild switch --flake ~/Projects/nix
error: path '/nix/store/h6j33x98r8v6pzvb09yxbsxj6jiiargz-source/flake.nix' does not exist
```

A répondu dans un fil de discussion

@jakehamilton This is part of why it's still experimental. Some of the bad decisions are not feasible to support indefinitely.

A clear benefit of doing more in "user space" is that you get to change your mind about how composition and extension work, without a backcompat nightmare or losing compatibility (and making reproducibility moot).

We're making good progress on fetching, although we did underestimate it at first.
2.27 will have Git LFS and proper submodules support.
Also a bit of locking: 2.26 had a significant fix for relative path flakes (in-repo flake inputs).
More locking, as well as composability and extension/configurability will come.

Suite du fil

I would like to have something similar to #nix' #flakes and overlays.

This way you can have two revisions of guix living along, one for operating-systems of deployments and one for development/application environment, which can be later added to operating system as well.

Guix'es versions will be controlled/locked with one explicit well-defined mechanism. You get fully-compatible packages instead of hacky inferior-package.

Unfortunately, not possible without human-years of [re-]work of guix.

Just my 2ct, but why can't I specify a tag in a #nix #flakes input?

Not like in the URL tho (in my flake.nix) but rather in the lockfile? So that I can update the git dependency via `nix flake update`?
Not that I want it to update automatically, but I would like to see something like

```
$ nix flake update
# Warning: Not updating github:foo/bar from 1.0.0, available versions: 1.0.0, 1.1.0, 2.0.0
```

And then I would

`nix flake update github:foo/bar --version 2.0.0` or something like this.

Having tags in my flake.nix is tedious, because I have to think about updating it.

I'm doing some reading about #NixOS and I'm trying to get my head around #Nix #Flakes. The concept seems ok but one thing I'm not understanding:

Step 1) You enable flakes in the /etc/nixos/configuration.nix file.

Step 2) You then create a /etc/nixos/flake.nix file that imports the configuration.nix file.

Can someone explain this as it seems like a cyclic dependency?