!SgYlXivkogarTVcnZO:nixos.org

Nix Flakes

877 Members
180 Servers

Load older messages


SenderMessageTime
12 Aug 2021
@elonsroadster:matrix.orgelonsroadsterbecause remember, flakes actually use git to decide which files get included when it is constructing the flake07:07:36
@mewp:nurupo.plmewpyes, but only which files07:07:50
@mewp:nurupo.plmewpnot which revisions07:07:55
@mewp:nurupo.plmewpyou can have local modifications07:08:03
@elonsroadster:matrix.orgelonsroadstersure so yes, you dont have to commit hte file07:08:06
@elonsroadster:matrix.orgelonsroadsterbut its annoying that you have to git add it07:08:12
@mewp:nurupo.plmewpnot really07:08:23
@elonsroadster:matrix.orgelonsroadsterokay well its annoying TO ME07:08:36
@mewp:nurupo.plmewpadd an empty file, commit it abd add ut to gitignore07:08:39
@mewp:nurupo.plmewp* add an empty file, commit it and add ut to gitignore07:08:46
@elonsroadster:matrix.orgelonsroadsteradding it to git ignore if you commit it is not very useful07:09:11
@elonsroadster:matrix.orgelonsroadsterand if you commit the file, its not much better than just going in and modifying the flake in place, right?07:09:30
@elonsroadster:matrix.orgelonsroadsterI'm just trying to avoid constantly needing to e.g. stash my modifications for my shell07:09:48
@elonsroadster:matrix.orgelonsroadsterevery time i switch branches07:09:52
@elonsroadster:matrix.orgelonsroadsterthat is what i was previously doing07:09:59
@elonsroadster:matrix.orgelonsroadsterbut then that starts to conflict with other peoples changes07:10:09
@elonsroadster:matrix.orgelonsroadsterits just not really a tidy solution07:10:19
@mewp:nurupo.plmewpI'll be in front of a computer in a minute, and I'll elaborate07:10:53
@b:chreekat.netchreekat
In reply to @elonsroadster:matrix.org
adding it to git ignore if you commit it is not very useful
How is it not useful?
07:11:05
@b:chreekat.netchreekat(off hand I forget what effect it has to ignore a tracked file. I'd actually expect it to not work, so looking for confirmation there)07:12:11
@jez:petrichor.meJez (he/him) Could you use https://github.com/edolstra/flake-compat in a shell.nix and use nix-shell instead of nix develop? 07:13:18
@elonsroadster:matrix.orgelonsroadster
In reply to @jez:petrichor.me
Could you use https://github.com/edolstra/flake-compat in a shell.nix and use nix-shell instead of nix develop?
right I suggested that above
07:13:35
@elonsroadster:matrix.orgelonsroadsterseems like probably the best solution07:13:47
@mewp:nurupo.plmewpAll right, so.07:14:09
@elonsroadster:matrix.orgelonsroadsterits just such a general problem that I've had with most flakes I encountered that it seems like maybe there should be a nix native solution to me07:14:20
@mewp:nurupo.plmewpIf you have a commited file in gitignore, your local changes won't be tracked07:14:22
@mewp:nurupo.plmewpand so, you don't have to stash anything07:14:30
@mewp:nurupo.plmewpand yet, the flake should see your version with local changes, because while it sees only paths that are in the repository, it reads the contents from the checkout (i.e. your local files)07:15:16
@mewp:nurupo.plmewpI am not 100% sure that this will work, as I have not tested that, but I see no reason why it would not07:15:41
@elonsroadster:matrix.orgelonsroadsteryou mean the working tree07:15:42

Show newer messages


Back to Room ListRoom Version: 6