491 Members
General discussion pertaining to Nix/NixOS. | NixOS: nixos.org | Nix: nixos.org/nix | Freenode IRC: #freenode_#nixos:matrix.org50 Servers

Load older messages

Timestamp Message
5 Dec 2018
17:00:54@stites:matrix.orgstitesRight now I'm having trouble deploying a project on nixos that I'm just trying to run as a one-off: Everything builds correctly, but when provisioning postgres I'm finding that I need it to be running on a socket in the nix-shell environment.
17:06:30@stites:matrix.orgstitesI tried to take the easy way out and run postgres globally as a service, but that didn't work. I'm guessing that there are some devs out there that deploy these kinds of derivations to non-nixos systems, which seems isomorphic to my scenario. Can someone help explain how to do this?
17:08:47@washort:greyface.orgdashyou can just start the postgres daemon directly, that's what i've done in the past
17:15:36@stites:matrix.orgstitesah! of course
17:15:51@stites:matrix.orgstiteshaha, I haven't needed databases in a loooong time
18:50:28@slabity:matrix.orgslabityDoes anyone here have a working Neovim + LanguageClient-neovim + RLS configuration? I'm trying to find out why mine isn't working
19:13:01@slabity:matrix.orgslabityUgh nevermind. I was just stupid and forgot to include rustc

if you need an even lighter-weight solution, you can also just use nix-shell directly: nix-shell -p zlib bundix openssl ruby bundler autoreconfHook postgresql nodejs-8_x was a command I just had to run in order to drop into a shell and run bundix

Sorry, stites , I was AFC. I do know about nix-shell -p ... --run ..., though since nix 2.0 I kinda prefer nix run ... -c ... which doesn't require me to quote the command if it contains options or arguments.

I guess I'll have to have a look at how mkShell is used.

22:50:19@das-g:matrix.orgdas-gAh, yeah, that actually looks much simpler than mkDerivation when I don't need a "real" package: https://nixos.org/nixpkgs/manual/#sec-pkgs-mkShell
6 Dec 2018
00:36:07@stites:matrix.orgstites @das-g cool -- I never new about nix run before!
00:39:08@das-g:matrix.orgdas-g Nix 2.x brought quite some new commands (most for already-existing functionality, but with shorter syntax). See nix --help for a list. (Don't use them in scripts, yet, as they are still subject to change.)
18:57:49@stites:matrix.orgstitesI'm having some trouble pulling down a file from github and am wondering if someone can help
18:58:37@stites:matrix.orgstitesIdeally, I'm trying to do this:

  environment.etc."sb_hosts".text = (builtins.filterSource
    (path: type: path == "hosts" && type == "regular")
    (fetchFromGitHub {
      owner = "StevenBlack";
      repo = "hosts";
      rev = "v2.1.19";
      sha256 = "1wrwlgcy46vwji0n1imnmlci03ln0v4qd27cw8cwpag57w06n4z7";
19:00:21@stites:matrix.orgstites But I'm getting a string '/nix/store/r3xnh6ricqa7lnnbb0ka5vb0h6rw28ap-source' cannot refer to other paths, at /etc/nixos/networking.nix:13:38
19:00:36@stites:matrix.orgstites even when I switch .text to .source
19:01:15@stites:matrix.orgstites For comparison, I can run fetchFromGitHub directly with .source and this pulls down the git repo, as I'd expect
19:02:48@stites:matrix.orgstites I'm having trouble finding the source for builtins.filterSource, which is a bit of a pain, but I've also tried to use... https://github.com/NixOS/nixpkgs/blob/adf41ed942c7cf4e5b172cdf3bc740ebcd442b1c/lib/sources.nix#L35 and access the .outPath to the same effect
19:29:54@stites:matrix.orgstitessolved my question: dodge the whole fetchFromGitHub and just use raw.githubusercontent.com. I thought this was an interesting problem, though, since I thought the above codeblock would work. I've posted it on SO if anyone wants internet points: https://stackoverflow.com/questions/53658303/fetchfromgithub-and-filter-down-and-use-as-environment-etc-file-source

Can you make that question more clear, stites? It has the nixos tag, but the content of the question doesn't explicitly say whether this is about NixOS. (I think it must be NixOS, and not just Nix or nixpkgs, but that's just inferred and I'm not really sure of my conclusion.)

Also, what are you trying to achieve, in big-picture phrasing (ignoring possible implementations)? Have a file in /etc that mirrors a specific file from a GitHub repo? Is this part of a derivation (Nix package) or of your NixOS system configuration? (The error appearing in /etc/nixos/configuration.nix points to the latter.)

8 Dec 2018
07:09:49@ftxqxd:matrix.orgftxqxd joined the room.
21:05:12@oknf:matrix.org@oknf:matrix.org left the room.
9 Dec 2018
16:23:29@-owo-:matrix.org-owo- joined the room.
10 Dec 2018
01:56:36@andrew_chou:matrix.organdrew_chou joined the room.
11 Dec 2018
03:53:48@ldlework:matrix.orgldlework joined the room.
12 Dec 2018
00:14:53@null_radix:matrix.orgnull_radix joined the room.
05:42:12@iaroki:mle.partyiaroki joined the room.
09:17:55@chrismatheson:matrix.orgchrismatheson joined the room.
16:48:47@veloct:matrix.org@veloct:matrix.org joined the room.
16:50:19@veloct:matrix.org@veloct:matrix.org left the room.

There are no newer messages yet.

Back to Room List