!SgYlXivkogarTVcnZO:nixos.org

Nix Flakes

873 Members
175 Servers

Load older messages


SenderMessageTime
12 Aug 2021
@elonsroadster:matrix.orgelonsroadster mewp: I mean thats sort of what I'm looking for, but generally, I want to be able to use nix develop but override aspects of the devShell. makeOverrideable, only makes it so that if I somehow am able to import the flake that I can then further modify it 07:00:09
@elonsroadster:matrix.orgelonsroadsterI believe that most of the functions that create shells probably already have makeOverridable applied07:00:39
@mewp:nurupo.plmewpall right but override how? as in, not what you want to change, but how would you like to change it?07:01:59
@elonsroadster:matrix.orgelonsroadsterso the primary use case I have is adding certain developer tools, which may not be of use to everybody07:02:19
@elonsroadster:matrix.orgelonsroadsterso like07:02:22
@elonsroadster:matrix.orgelonsroadsterI'd like to add say an lsp server to the devShell07:02:40
@elonsroadster:matrix.orgelonsroadsterhaving the lsp server in e.g. my profile, or installed globally in any way is not a good solution. Between diff projects I will need diff versions, and the version of the language server should depend on how things are set up for that particular project07:03:48
@elonsroadster:matrix.orgelonsroadsterso I guess one thought is that I know that there is a compat library that eelco wrote (https://github.com/edolstra/flake-compat/blob/master/default.nix)07:04:38
@mewp:nurupo.plmewpah, so if I understand correctly, you want to have personal customizations to a devShell?07:04:56
@elonsroadster:matrix.orgelonsroadsterright exactly07:05:07
@elonsroadster:matrix.orgelonsroadster this seems like it would be a pretty common thing, and something that nix develop should generally support 07:05:25
@elonsroadster:matrix.orgelonsroadsterbut yeah I guess I could do something like what flake-compat does to make shell.nix work and add the customizations there07:05:51
@mewp:nurupo.plmewpall right then, I'd import a customization.nix07:05:55
@elonsroadster:matrix.orgelonsroadsteryou mean in the flake07:06:15
@mewp:nurupo.plmewpthat would be an empty attrset in the repo, and added to gitignore07:06:18
@mewp:nurupo.plmewpyes07:06:20
@mewp:nurupo.plmewpand just change the filr07:06:28
@mewp:nurupo.plmewp* and just change the file07:06:32
@elonsroadster:matrix.orgelonsroadsteryeah07:06:37
@elonsroadster:matrix.orgelonsroadsterthats what i did here: https://github.com/xmonad/xmonad-contrib/pull/58907:06:41
@elonsroadster:matrix.orgelonsroadsterthe thing that really sucks about it07:06:46
@elonsroadster:matrix.orgelonsroadsteris that actually the customization file07:06:57
@elonsroadster:matrix.orgelonsroadsteronly works if you git add it07:07:03
@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

Show newer messages


Back to Room ListRoom Version: 6