felixfoertsch has quit [Ping timeout: 245 seconds]
felixfoertsch has joined #nixos
mexisme has quit [Ping timeout: 268 seconds]
<iqubic>
Anyone have a nice and simple shell.nix that pulls OpenJDK into scope?
<iqubic>
Or can someone help me create such a thing?
<clever>
iqubic: buildInputs = [ openjdk ];
wfranzini has quit [Remote host closed the connection]
wfranzini has joined #nixos
fnords has quit [*.net *.split]
Taneb has quit [*.net *.split]
chkno has quit [*.net *.split]
swflint has quit [*.net *.split]
shlevy has quit [*.net *.split]
awygle has quit [*.net *.split]
fadenb has quit [*.net *.split]
pointfree has quit [*.net *.split]
bwe has quit [*.net *.split]
nikola has quit [*.net *.split]
markasoftware has quit [*.net *.split]
craige has quit [*.net *.split]
<gyroninja>
Has anyone got Kotlin and gradle working together? When I try doing it I get.
<gyroninja>
Kotlin could not find the required JDK tools in the Java installation '/nix/store/ldkrvy6ahac04pnjwg6227pw6yzcjx9k-openjdk-8u222-ga-jre/lib/openjdk/jre' used by Gradle. Make sure Gradle is running on a JDK, not JRE
<gyroninja>
I'm not sure how to get it to use the jdk instead of that jre which the that path points to
<gyroninja>
the gradle wrapper set uses and sets JAVA_HOME to the jdk
<gyroninja>
actually it might be kotlin that is using the jre
Taneb has joined #nixos
nikola has joined #nixos
craige has joined #nixos
markasoftware has joined #nixos
shlevy has joined #nixos
fadenb has joined #nixos
bwe has joined #nixos
awygle has joined #nixos
pointfree has joined #nixos
swflint has joined #nixos
chkno has joined #nixos
fnords has joined #nixos
growpotk- has quit [Ping timeout: 240 seconds]
Emiller88 has quit [Ping timeout: 245 seconds]
evanjs has quit [Ping timeout: 268 seconds]
nexgen has joined #nixos
<iqubic>
clever: Thanks, but I'm not sure what the format of the entire shell.nix should be.
<clever>
iqubic: with import <nixpkgs> {}; stdenv.mkDerivation { name = "name"; buildInputs = [ openjdk ]; }
<clever>
though thats identical to just plain `nix-shell -p openjdk`
jgt has joined #nixos
<gyroninja>
okay overriding kotlin to use jdk instead of jre got me closer "Kotlin could not find the required JDK tools in the Java installation '/nix/store/hb006fvpnqhnnwa9g57cmad04qyga906-openjdk-8u222-ga/lib/openjdk/jre' used by Gradle. Make sure Gradle is running on a JDK, not JRE."
<gyroninja>
Maybe it's not compatible with openjdk?
<clever>
gyroninja: does it say which jdk tools its looking for?
tgamblin4 has quit [Remote host closed the connection]
iqubic` has joined #nixos
jgt has quit [Ping timeout: 264 seconds]
iqubic` has quit [Remote host closed the connection]
iqubic has quit [Ping timeout: 264 seconds]
drakonis_ has joined #nixos
iqubic has joined #nixos
<iqubic>
Why is it that most Java applications don't run properly in Tiling WMs?
Myhlamaeus3 has quit [Read error: Connection reset by peer]
drakonis has quit [Quit: WeeChat 2.4]
lambda-11235 has quit [Max SendQ exceeded]
<iqubic>
Because basically, this isn't working in the way that I want it too.
wfranzini has quit [Remote host closed the connection]
lambda-11235 has joined #nixos
jlv has quit [Ping timeout: 260 seconds]
<iqubic>
Is there a way to set an environment variable from my shell.nix? Specifically I want to set an environment variable whose first character is an underscore.
liberiga has joined #nixos
<clever>
iqubic: every attribute you pass to mkDerivation becomes an env var
<iqubic>
I see.
<iqubic>
How would I pass in an attribute whose name begins with an underscore?
<clever>
iqubic: _foo = "bar";
ajs124 has quit [Quit: Gateway shutdown]
<iqubic>
I thought underscores were treated differently.
<clever>
i dont think they are
<iqubic>
They aren't.
<iqubic>
I only thought that because my syntax highlighter wasn't coloring the underscore in the same color as the rest of the attribute.
<clever>
id say thats a bug in the syntax highlighter then
ddellacosta has quit [Ping timeout: 276 seconds]
<iqubic>
So, my Java program wasn't working properly on this Window Manager.
<iqubic>
I searched online and found that I need to set this variable:
<iqubic>
_JAVA_AWT_WM_NONREPARENTING=1
<iqubic>
I did that. And now everything seems to be working.
<clever>
_JAVA_AWT_WM_NONREPARENTING = true; in the nix should do that
<clever>
`true` behaves a bit oddly in nix
<iqubic>
Actually, I'm going to want this flag set for all programs being run in this WM, because I do run a large number of Java programs as it turns out.
<iqubic>
Now, lets see if OpenJDK is working properly. Time to write a hello world program.
<iqubic>
Nope.
<iqubic>
Time to debug.
Rusty1 has quit [Quit: Konversation terminated!]
abathur has quit [Ping timeout: 265 seconds]
<iqubic>
Is there a standard guide for how one should go about making a default.nix builder for a particular pice of software they want to install?
felixfoertsch has quit [Quit: ZNC 1.7.3 - https://znc.in]
<clever>
iqubic: i usually start with: with import <nixpkgs> {}; stdenv.mkDerivation { name = "name"; buildInputs = [ openjdk ]; }
felixfoertsch has joined #nixos
<clever>
and maybe add src = ./.;
<iqubic>
I see.
<iqubic>
Because it turns out that I actually need to compile this program from the source in order to get it to work.
<notgne2>
17:52 <clever> notgne2: can you pastebin the nix expr?
<notgne2>
it's a bit big, since as it turns out NixOS expects itself to be an OS and I had to override a lot of stuff, which is also why it's harder to narrow down the test case since so many modules are dependent on eachother
knupfer has joined #nixos
<notgne2>
small optimizations like this wouldn't be so necessary though if I knew how to clean up the images' nix store, as most of the packages are only used for the NixOS activation, which in the case of my docker system, only runs once when the image is generated
<iqubic>
mainly what I want is a list of all the possible phases that I can add to stdenv.mkDerivation and also I'd like to know what makeWrapper does.
<clever>
notgne2: let me check my gists...
<clever>
iqubic: that should all be in the nixpkgs manual
jgt has joined #nixos
<iqubic>
clever: I've looked for it there, but I can't seem to find it.
<notgne2>
I tried adding `nix-collect-garbage --store $PWD` to extraCommands in dockerTools.buildImage thinking that might do the trick, but the directory in that stage of the generation does not have a nix/store
<clever>
notgne2: and a GC wouldnt help, nix only copies the things you depend on into the image
<clever>
notgne2: so nothing will be garbage
<notgne2>
perl though, should only be needed by the script I have in `/init` (and dont believe is anywhere else) which I remove after execution in runAsRoot
<iqubic>
And what does makeWrapper do, and how do I use it?
<clever>
notgne2: runAsRoot is typically costly, and will harm performance, its best to not use it
<clever>
notgne2: runAsRoot also generates a new layer, so anything you delete wont be deleted, as it will persist in previously layers
<clever>
iqubic: are you sure you checked the manual?
jgt has quit [Ping timeout: 276 seconds]
das_j has quit [Remote host closed the connection]
das_j has joined #nixos
<iqubic>
I looked through the nix manual for these things.
<clever>
iqubic: makeWrapper and phases are part of nixpkgs, so they will be in the nixpkgs manual, not the nix manual
<iqubic>
Right. I realize that now.
<clever>
nix is just builtins.whatever, the basic syntax, and the shell commands
<iqubic>
There are three distict, but related manuals that we have. NixOS, Nix and Nixpkgs.
<clever>
anything involving pkgs, lib, or the stdenv, is part of nixpkgs
hmpffff has joined #nixos
<clever>
4 if you count nixops
<iqubic>
I see.
hmpffff has quit [Client Quit]
<iqubic>
I hate it when programs hard code the locations of paths.
<iqubic>
This build script I'm looking at assumes that things are installed in /bin/...
<notgne2>
clever: I'm mostly aiming to get something as compatible as possible with NixOS, so I'd prefer something that runs .build.toplevel/init somehow, since I'll then have the luxury of things like passwd generation etc
<notgne2>
is there a way to maybe run that in a chroot or something to avoid the costs of runAsRoot, which I can then maybe just pass to `contents`?
<clever>
notgne2: i dont think chroot can be used in the nix sandbox, runAsRoot gets around that by booting qemu with the docker image mounted
<notgne2>
well, if I could do the same method that would probably be just as helpful, because then I'll get an opportunity to reduce the amount of stuff in the nix store
<clever>
notgne2: but i believe nix is generating a new layer when doing that qemu stuff, so GC wont help
mjrosenb has quit [Ping timeout: 268 seconds]
<notgne2>
yeah I did notice an issue where if a `/nix` even gets created it results in broken docker images too, since as reading the code reveals it just appends the files
<iqubic>
So, this program wants to be installed with: './configure && ./Make.sh' However, the configure script sets 'ac_default_prefix=/usr/local' I'm not sure if that's the right setting for that when using nix.
<clever>
iqubic: that is the *default* prefix, --prefix=$out will fix that, which nixpkgs does automatically
<iqubic>
Oh. Nice. I'm fine with that.
<clever>
iqubic: you just want `buildPhase = "./Make.sh";` and the default configurePhase will deal with configure
<clever>
also, read Make.sh, and see what its doing, it may be something you want to bypass
<clever>
notgne2: what are you generating in runAsRoot?
<iqubic>
I'm just going through this build script (both configure and Make.sh) to see if there are any changes I need to tell nixos to make.
<notgne2>
I just have `${sys.build.toplevel}/init`, which adds all the dependencies of that init script to the store (some are pretty big), and unfortunately they indefinitely stay there
<etu>
oooh, {^_^} is more alive today than yesterday :)
<notgne2>
I think at one point I explicitly put it into place with contents and removed it after execution, but that worked even less (don't remember the exact issue)
<clever>
notgne2: init is responsible for running systemd, so it needs to be present at all times
<clever>
if you want to run systemd
<notgne2>
I modified stage-2-init.sh to remove the systemd call
<notgne2>
so it can just be used to set up the image, then not ran again (have docker handle the entrypoint)
<clever>
notgne2: what parts of the setup are you relying in?
<notgne2>
currently just users, but that being the first thing I tested leads me to believe there is likely more "runtime" activated things in the system
kzvi[m] is now known as kzvi[m]1
<clever>
notgne2: you could eval system.activationScripts.users, but that is the very thing that depends on perl
<clever>
notgne2: de-perl'ing and de-systemd'ing is what i started not-os for
knupfer has quit [Quit: knupfer]
knupfer has joined #nixos
knupfer has quit [Client Quit]
<notgne2>
I did go over that codebase (that's where I got the paths for the first few modules I needed to enable) but it struck me as having some more incompatibilities, and seemed still just as tied to having an init system, kernel, hardware, etc
<clever>
notgne2: the gist i linked above, is a docker-specific case, where i translate all systemd.services entries, over to runit services, then tell docker to run runit
<clever>
notgne2: i could also add a thing to map over users.users, and auto-gen users
<clever>
that (mostly) seamlessly lets existing nixos modules work in docker
<notgne2>
Well, I wouldn't mind writing that, I was more just concerned there would be other things that need patching in like that
<clever>
the main issue (oh perl), is that i'm using the systemd.services.whatever.runner attr, which is a dynamically generated perl script
kzvi[m]1 has left #nixos ["User left"]
<clever>
that is meant for testing systemd things
<clever>
it doesnt escape " right, so any " in the ExecStart breaks things
<notgne2>
I'm happy with or without a service manager for my purposes, one way means more modules work out of the box, and the other means less runtime bloat. If I used contents instead of runasroot with the init script, and made a passwd generator would that be all that's needed to get everything essential working?
endformationage has quit [Ping timeout: 258 seconds]
<clever>
notgne2: probably
rauno has quit [Ping timeout: 245 seconds]
<iqubic>
So, I may have just done a silly thing.
<iqubic>
I just loaded up a nix-shell with gcc as a build input. I then ran './configure && ./Make.sh
<iqubic>
It used the default AC prefix.
<iqubic>
I'm not sure if this is good or bad to be honest.
<iqubic>
clever: I'm not sure what this did, but I highly doubt it was the right thing to do here.
justanotheruser has joined #nixos
<clever>
iqubic: only the default configurePhase does --prefix for you, if you manually ./configure, that wont happen
<iqubic>
I know.
<iqubic>
So, I ran the Make.sh, created by configure, without the prefix argument.
<iqubic>
By mistake.
<iqubic>
I didn't get any errors of any kind.
justbeingglad has joined #nixos
justbeingglad has left #nixos [#nixos]
philr has joined #nixos
<iqubic>
clever: How do I tell nixpkgs to use './configure && ./Make.sh' to build my software here?
<clever>
2019-09-17 02:16:45 < clever> iqubic: you just want `buildPhase = "./Make.sh";` and the default configurePhase will deal with configure
<iqubic>
I don't need to add ac to the list of build inputs?
<iqubic>
Do I need to add gcc to list of build inputs?
<clever>
gcc is always provided
<iqubic>
Cool.
<clever>
if configure exists, then you dont need ac
<iqubic>
How do IDEs like eclipse make sure that the JDK is on $PATH when they are running?
<iqubic>
Sorry if that's a bit of a tangent.
<clever>
eclipse itself is written in java, so there must be a makeWrapper call handling that
jgt has joined #nixos
<iqubic>
I see. Makes sense.
palo has quit [Ping timeout: 265 seconds]
palo1 is now known as palo
<iqubic>
What's the most appropriate place to put a call to makeWrapper?
<clever>
iqubic: installPhase or postInstall
<iqubic>
And those happen after the build and configure phases?
ntsrtoh^ has quit [Ping timeout: 245 seconds]
jgt has quit [Ping timeout: 246 seconds]
<etu>
yes
ntsrtoh^ has joined #nixos
ntsrtoh^ has quit [Max SendQ exceeded]
ntsrtoh^ has joined #nixos
ntsrtoh^ has quit [Max SendQ exceeded]
ntsrtoh^ has joined #nixos
ntsrtoh^ has quit [Max SendQ exceeded]
ntsrtoh^ has joined #nixos
ntsrtoh^ has quit [Max SendQ exceeded]
ntsrtoh^ has joined #nixos
ntsrtoh^ has quit [Max SendQ exceeded]
ntsrtoh^ has joined #nixos
ntsrtoh^ has quit [Max SendQ exceeded]
ntsrtoh^ has joined #nixos
ntsrtoh^ has quit [Max SendQ exceeded]
ntsrtoh^ has joined #nixos
ntsrtoh^ has quit [Max SendQ exceeded]
dermetfan has joined #nixos
ntsrtoh^ has joined #nixos
ntsrtoh^ has quit [Max SendQ exceeded]
<iqubic>
Are the build inputs in the path when the configure phase is run?
ntsrtoh^ has joined #nixos
ntsrtoh^ has quit [Max SendQ exceeded]
<clever>
iqubic: the buildInputs are present for every phase
ntsrtoh^ has joined #nixos
ntsrtoh^ has quit [Max SendQ exceeded]
<iqubic>
My configure file here is checking to see if some optional libraries are available, and I want to make sure that they can be found.
<iqubic>
Alright. Cool. This works.
<iqubic>
I think I can use 'nix-build' to build this, right?
knupfer has joined #nixos
<clever>
iqubic: yes
<iqubic>
Alright. Everything seems to have worked.
aanderse-znc has joined #nixos
aanderse has quit [Ping timeout: 264 seconds]
dermetfan has quit [Ping timeout: 240 seconds]
gyroninja has quit [Quit: WeeChat 2.5]
Ariakenom has joined #nixos
<iqubic>
error: cannot auto-call a function that has an argument without a default value ('stdenv')
<iqubic>
What?!?!
<clever>
,callPackage iqubic
<{^_^}>
iqubic: If a Nix file foo.nix starts with something like `{ stdenv, cmake }:`, you can build it with `nix-build -E '(import <nixpkgs> {}).callPackage ./foo.nix {}'`
<clever>
thats why the example i gave started as `with import <nixpkgs> {};` instead, so it doesnt need callPackage
<iqubic>
Ah. I see.
<iqubic>
clever: what makes building a derivation, still with nix-build, that exists in my local checkout of nixpkgs different?
<clever>
you want to run `nix-build -A foo` in the root of the checkout
<clever>
which will use the callPackage in pkgs/top-level/all-packages.nix
<iqubic>
Ah. I see.
<iqubic>
I don't want do that actually.
<clever>
why not?
<iqubic>
I want to keep the build script with the src.
<iqubic>
Because I have the source downloaded locally.
<clever>
then use `with import <nixpkgs> {};` and `src = ./.;`
<iqubic>
I suppose I could change 'src = ./src' to 'src = fetchzip {...}' if I truely needed too.
<clever>
that will load nixpkgs, grab the hello attr, then change the src to the current dir
<clever>
so you can use the expr in nixpkgs, but the local src
<iqubic>
Right but I don't want that.
<iqubic>
I know. I know.
knupfer has quit [Quit: knupfer]
knupfer has joined #nixos
knupfer has quit [Client Quit]
knupfer has joined #nixos
knupfer has quit [Client Quit]
knupfer has joined #nixos
hyper_ch2 has joined #nixos
sigmundv has joined #nixos
aanderse-znc has quit [Ping timeout: 240 seconds]
hienergy[m] has joined #nixos
<{^_^}>
[nixpkgs] @peti opened pull request #68950 → nixos: improve the example that shows how to include nvidia_x11 in boot.extraModulePackages → https://git.io/JeOu8
aanderse has joined #nixos
Ariakenom has quit [Ping timeout: 268 seconds]
rauno has joined #nixos
Ariakenom has joined #nixos
jgt has joined #nixos
jgt has quit [Ping timeout: 250 seconds]
rsoeldner has quit [Remote host closed the connection]
hyper_ch2 has quit [Remote host closed the connection]
ng0_ has quit [Quit: Alexa, when is the end of world?]
o1lo01ol1o has joined #nixos
orivej has joined #nixos
ajs124 has joined #nixos
sigmundv has quit [Ping timeout: 240 seconds]
knupfer has quit [Ping timeout: 245 seconds]
bahamas has joined #nixos
<bahamas>
hello. I'm using nixops to deploy a machine to virtualbox. the problem is that it gets stuck when it tries to connect through ssh to the box. it keeps timing out. anyone know what's wrong?
<clever>
sb0: ive also had a different problem, where my router has lately just been refusing to route v6 packets, even with all the right flags set
hyper_ch2 has quit [Remote host closed the connection]
orivej has quit [Ping timeout: 265 seconds]
FRidh has joined #nixos
Jackneill has joined #nixos
Tucky has joined #nixos
jgeerds has joined #nixos
jasom has quit [Ping timeout: 246 seconds]
thc202 has joined #nixos
<teto>
bahamas: I have a similar issue with sshd taking half an hour to come up, maybe just wait a bit
Vikingman has quit [Remote host closed the connection]
civodul has joined #nixos
<bahamas>
teto: do you always have to wait for half an hour?
<teto>
bahamas: I am trying to fix it but haven't been too successful yet
<teto>
I had a run where 4 minutes were enough
Zer0xp has joined #nixos
<teto>
This is only on the first deploy though, while it calls ssh-keygen
dermetfan has joined #nixos
<bahamas>
teto: I'd rather not use nixops at all in that case
Makaveli7 has joined #nixos
ng0 has quit [Ping timeout: 260 seconds]
philr has quit [Quit: WeeChat 2.6]
veske has joined #nixos
jgt has joined #nixos
Ariakenom has quit [Ping timeout: 265 seconds]
boogiewoogie has joined #nixos
jgeerds has quit [Ping timeout: 240 seconds]
nakkle has joined #nixos
ng0 has joined #nixos
<li_matrix>
on nixos-containers: there doesnt seem to be a way to create startup dependencies. am I right?
__monty__ has joined #nixos
Fendor has joined #nixos
jgt has quit [Ping timeout: 246 seconds]
jgt has joined #nixos
<boogiewoogie>
hey, my wine package is defined as (wineWow = pkgs.wine.override { wineBuild = "wineWow"; };) which as I understand should provide both 32 and 64 bit wine, yet using wine64 gives `/nix/store/z28gysh5sx35fz4xqm0n8fk26a9hlvg1-wine-wow-4.2-staging/bin/wine: not an ELF binary... don't know how to load it`. is there a way to fix or work around this?
hmpffff has joined #nixos
mexisme has joined #nixos
nexgen has quit [Quit: Leaving]
nexgen has joined #nixos
fusion809 has joined #nixos
<clever>
boogiewoogie: what does `file` say about that path? how big is the file?
m0rphism has joined #nixos
Ariakenom has joined #nixos
hyper_ch2 has joined #nixos
Okinan has joined #nixos
logzet has joined #nixos
hyper_ch2 has quit [Remote host closed the connection]
<{^_^}>
[nixops] @domenkozar pushed commit from @disassembler to hercules-ci « use pkgs.nixosOptionsDoc if available for docbook »: https://git.io/JeOzw
lewo` has joined #nixos
dansho has quit [Ping timeout: 258 seconds]
<{^_^}>
[nixpkgs] @arianvp opened pull request #68953 → nixos/boot: Make sure interfaces are renamed in stage-1 → https://git.io/JeOzK
<boogiewoogie>
oh and just for the record, it's the same with both wine and wine-staging
<{^_^}>
[nixpkgs] @Ma27 pushed commit from @grahamc to release-19.09 « alacritty: fix path to xdg-open »: https://git.io/JeOzN
Okinan has joined #nixos
justanotheruser has quit [Ping timeout: 265 seconds]
sigmundv has joined #nixos
Zer0xp has joined #nixos
zupo has joined #nixos
Makaveli7 has joined #nixos
Synthetica has joined #nixos
Neo-- has quit [Ping timeout: 245 seconds]
liberiga has quit [Ping timeout: 260 seconds]
boogiewoogie has quit [Remote host closed the connection]
justanotheruser has joined #nixos
ubert has joined #nixos
Zer0xp has quit [Ping timeout: 276 seconds]
phloris has quit [Ping timeout: 240 seconds]
<{^_^}>
[nixops] @domenkozar pushed to master « fix manual build on nixpkgs 19.09 »: https://git.io/JeOgc
Ariakenom has quit [Ping timeout: 258 seconds]
bahamas has quit [Ping timeout: 240 seconds]
nspin has joined #nixos
Ariakenom has joined #nixos
baum has joined #nixos
<baum>
i'd like to incorporate a PR which was merged into the master (on a system deployed via Nixops), how would i handle this correctly? fork nixpkgs and merge it? or would it be prefered to overwrite the changes in an overlay?
o1lo01ol1o has quit [Remote host closed the connection]
<teto>
baum: that's up to you I would say. I find it easier to cherry pick than do the changes in the overlay. Some things may not even be possible from the overlay
<{^_^}>
[nixpkgs] @peti pushed 21 commits to haskell-updates: https://git.io/JeOgP
<eyJhb>
baum: if it is merged into master, then just cherry pick it from there? :)
MrCCoffee has joined #nixos
Makaveli7 has joined #nixos
<baum>
eyJhb: means assuming i'd run multiple systems i'd end up with multiple copies of nixpkgs? (e.g. 19.03-sys1)
<baum>
(in order to manage dependencies on a per-server/project level, rather than globally)
<teto>
having the overlay work across the different versions could be difficult too. You can use different work trees/ or fetch from different branches with builtins.fetchGit
mkoenig has quit [Remote host closed the connection]
<baum>
teto: good point, thanks, i'll give it a try
<teto>
I typically have 3 worktrees, the main one and the other 2 being WIP PRs
<baum>
teto: where do you fetch the correct one in nixops? within the function in a let expression?
<teto>
baum: I have a basic usage of nixps so I just run it with -I nixpkgs=$HOME/nixpkgs
gxt has quit [Ping timeout: 260 seconds]
<baum>
teto: that way you can only use the currenlty checked-out branch right?
o1lo01ol1o has joined #nixos
o1lo01ol1o has quit [Remote host closed the connection]
o1lo01ol1o has joined #nixos
<teto>
correct but then I can checkout the wanted branch in one of my worktress e.g., -I nixpkgs=$HOME/nixpkgs3
marsel has joined #nixos
<baum>
alright, thanks
marsel has left #nixos ["ERC (IRC client for Emacs 26.2)"]
<tyrion-mx>
Still trying to run mailspring, I am almost there. Only problem is that it requires gnome-keyring to be available. What should I do? Run that in the chroot environment as well?
<baum>
arianvp: thanks for making it! i'm kinda wondering on how people were working without it (since without useACMEHost i'm hitting the ratelimit, and with security.acme.certs it just fails)
knupfer has joined #nixos
<arianvp>
baum: I'm still running into ratelimits
<arianvp>
sometimes
<arianvp>
emily: are you the emily with the network renaming problems?
<emily>
yep, hi
<arianvp>
so if I understand correctly, you also fail to get the network renamed in stage-2?
<arianvp>
or does it eventually rename?
<emily>
it never renames, ip(8) reports it as eth0
<arianvp>
do you have a nixos config that you could share?
<arianvp>
I'll put int some time this weekend during the systemd hackathon in Berlin to see if I can get this fixed
tvorog has joined #nixos
<arianvp>
I can reproduce the stage-1 part but not the stage-2 failing-to-rename part
<emily>
*nod* my config is a bit of a mess but I suspect the initrd network use is responsible for that
<emily>
I have this nasty hack to let me enter a ZFS password over ssh at boot:
<emily>
mid-way through surgery to rename the device to test this
<etu>
yeah, I haven't ran into issues with renaming interfaces though, but for a bit I wouldn't reboot correctly. I had to powercycle it properly. But had no way to get the display output...
sigmundv has quit [Ping timeout: 240 seconds]
<etu>
or wait, it's actually named eth0 :D
knupfer has quit [Ping timeout: 268 seconds]
<emily>
yeah, most likely the `usePredictableInterfaceNames = true` default is broken for you and you just haven't noticed :)
<arianvp>
emily: yeh I think systemd is slowly trying move more and more out of udev
<arianvp>
but without telling us that they're doing that
<arianvp>
and then stuff randomly breaks if you dont keep up with upstream
<arianvp>
=)
<tyrion-mx>
Hello, I am having troubles running programs inside the chroot, because they require dbus services that are installed inside the chroot, but since dbus is run outside it cannot find them. Should run dbus inside the chroot as well? I am not sure how this stuff works
<emily>
I feel like the sustainable thing would be to use the same systemd setup in stage-1.
<emily>
rather than the minimal-hence-broken system it uses now
<emily>
big change though
<arianvp>
emily: a systemd-based stage-1 has been on my list for a while; but it's a big change
<arianvp>
I would prefer if we could just re-use dracut or something, and make dracut understand NixOS
<arianvp>
instead of having to roll it ourselves
<arianvp>
lots of choices to make here :P
bahamas has joined #nixos
<emily>
*nod*
<emily>
my stopgap solution is to just turn off predictable interface names. but it'd be nice if they could be made to work consistently
<emily>
AIUI there's been some hesitation about merging predictable interface names for stage-1 because they could break people's config
<arianvp>
well it's more broken currently then the breakage that would introduce
<emily>
worst-case they reference eth0 for something like the ZFS decryption key like I do and it breaks their boot
<arianvp>
so I'm going to ignore people's opinion there
<emily>
*nod* agreed :p
tmaekawa has joined #nixos
<arianvp>
and it's easily disabled by setting net.ifnames=0
<arianvp>
thanks for the links emily . I'll consume some beer tonight at the nixos meetup and see if I can reproduce this stuff
boogiewoogie has joined #nixos
noudle has joined #nixos
<arianvp>
preferably I can turn it into a NixOS regression test so we dont run into this stuff in the future
<__monty__>
#exploitingthebalmerpeaksince'09 : )
<arianvp>
(If you happen to be bored, and can create a smaller reproducer nixos config, please ping me, so im not doing double work tonight)
iyzsong has joined #nixos
<emily>
arianvp: *nods* I might have time to try -- I suspect all it needs is to keep some connection open as stage-2 starts
<emily>
the main problem is that this is on my server and oversimplifying risks bricking the boot and making me file for a KVM slot...
lunik1 has quit [Quit: :x]
sigmundv has joined #nixos
<emily>
arianvp: btw, the existing PR I linked in the thread has some tests to test stage-1 gets the right device names at least
<emily>
so those could probably be imported wholesale
<arianvp>
Cool
lunik1 has joined #nixos
<arianvp>
emily: systemd 243 has some cool goodies for that . It can automatically rollback a boot if it doesn't come up correctly (for some predefined health check)
<arianvp>
But only works on uefi so basically useless for most servers I have
<emily>
ah, cool
<emily>
I do actually use UEFI boot so I might be able to play with that ^^
<arianvp>
But we don't package it in NixOS yet I think
<emily>
I do really wonder why we have to have the kernel naming a device eth0 and then udev renaming it to enp4s0. I guess the answer is "systemd people can't get the kernel to change its upstream device naming scheme" but it feels like such a flaky opportunity for errors...
<emily>
it'd be nice if devices just came with predictable names by default
<exarkun>
"Could not create directory '/home/exarkun/.ssh'." what? why do you want to create that directory?
<exarkun>
and yet it clearly managed to check something out immediately prior to that
<exarkun>
are submodules unsupported?
<maralorn>
exarkun: fetchFromGithub uses http by default but ssh if you set fetchSubmodules = true;
<exarkun>
I'm using fetchgit because fetchFromGithub doesn't actually do a git clone?
<exarkun>
now I see that this doesn't help because fetchgit deletes the .git directory ...
<adisbladis>
exarkun: You can pass leaveDotGit
<maralorn>
exarkun: Why do you need the .git?
<exarkun>
because crappy python packaging crap
<exarkun>
"setuptools_scm"
<adisbladis>
maralorn: Typically there are some packages getting version info from .git
<adisbladis>
And mostly the correct solution is to patch those bits out of the package instead
<exarkun>
with `fetchSubmodules = false` the checkout completes successfully but even with `leaveDotGit = true` setup.py fails :(
<exarkun>
guess I will patch out setuptools_scm
<exarkun>
if I want to add some more patches to an existing derivation then ... `overrideAttrs`, right?
ixxie has quit [Read error: Connection reset by peer]
Ariakenom has quit [Ping timeout: 268 seconds]
knupfer has joined #nixos
rauno has quit [Ping timeout: 268 seconds]
<{^_^}>
[nixpkgs] @vyorkin opened pull request #68958 → ocamlPackages.ppx_deriving_rpc: init at 5.9.0 → https://git.io/JeOVy
gloaming has joined #nixos
Fendor has quit [Ping timeout: 265 seconds]
mkoenig has quit [Remote host closed the connection]
bahamas has quit [Quit: Lost terminal]
phreedom_ has quit [Remote host closed the connection]
<{^_^}>
[nixpkgs] @romildo opened pull request #68959 → papirus-maia-icon-theme: init at 2019-07-26 → https://git.io/JeOwJ
<__monty__>
I'm trying to make any and all haskell packages get built remotely. I figured a requiredSystemFeature would do the trick: http://ix.io/1VxH The derivation is still getting built locally.
<__monty__>
(I'm trying to get 32bit taskell on a 32bit box that's not powerful enough to run GHC regularly(/at all?).
phreedom has joined #nixos
Fendor has joined #nixos
<{^_^}>
[nixpkgs] @B4dM4n opened pull request #68960 → boringtun: fix darwin build → https://git.io/JeOwt
<infinisil>
__monty__: your parens aren't around the arguments
<infinisil>
How you have it now the derivation call doesn't get the new argument
mkoenig has joined #nixos
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
domogled has joined #nixos
<__monty__>
infinisil: Yeah, but it shouldn't be an arg to the haskell mkDerivation. That didn't work. It figured this way it'd end up in the resulting derivation.
<infinisil>
Oh that's haskell's mkDerivation, I see
<tobiasBora>
I'd like to be able to move to 19.09 channel, and keep nixpkgs-unstable channel for some package that do not compile un 19.09 channel (k2pdfopt in my case). I tried to put in my configuration.nix file a "let nixpkgsUnstable = import <nixpkgs-unstable/pkgs> {};" after making sure I ran "nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixpkgs-unstable"
<tobiasBora>
unfortunately, it does not work.
<{^_^}>
[nixpkgs] @eraserhd opened pull request #68961 → plan9port: do not use which in builder.sh → https://git.io/JeOwO
<tobiasBora>
Can I call a non-default channel from configuration.file?
<gloaming>
tobiasBora: I don't think you want the "/pkgs" part
<tobiasBora>
gloaming: even without the /pkgs it fails.
rnhmjoj has joined #nixos
rnhmjoj has quit [Changing host]
rnhmjoj has joined #nixos
drakonis has joined #nixos
<tobiasBora>
oh, maybe I've an idea
<gloaming>
tobiasBora: Did you add the channel as root?
<tobiasBora>
gloaming: yes, but I think I forgot to update
<{^_^}>
[nixpkgs] @vyorkin opened pull request #68962 → ocamlPackages.protoc: init at 1.2.0 → https://git.io/JeOwZ
Ariakenom has joined #nixos
<tobiasBora>
seems to work, thanks gloaming !
<gloaming>
tobiasBora: np
<tobiasBora>
I'm wondering, when you fetch two channels being two branches of the same repo, does nix use only one repo, or is it using two repositories?
drakonis1 has quit [Ping timeout: 250 seconds]
<__monty__>
Why are extra-subtituters/binary-caches specified in nix.conf untrusted? And how do I make them trusted?
<symphorien>
on nixos, control on binary-cache can be used to gain root access
<{^_^}>
[nixpkgs] @B4dM4n opened pull request #68963 → bullet: fix darwin build → https://git.io/JeOwC
<symphorien>
because you can provide a specially crafted binary cache for sudo for example
<infinisil>
tobiasBora: Just cherry-picked a fix for k2pdfopt to 19.09 btw :)
Ilya_G has joined #nixos
mkoenig has quit [Remote host closed the connection]
<__monty__>
So I can trust them by adding two config options rather than one, in the same file. Somehow that seems to make the security argument quite weak.
<__monty__>
Especially because specifying a substiter but not trusting it doesn't seem to bring any benefit whatsoever?
<Ilya_G>
Hello, could someone advise me on how to add a homegrown service to nix-bild configuration? I have a buildPythonApplication derivation working that produces the service as a deployed Python package and then it places the output to proper service folder.
mkoenig has joined #nixos
<Ilya_G>
I added resulting package to `environment.systemPackages` which makes it a part of our VM qcow2 image build
<gloaming>
__monty__: Yeah, it seems pretty weird. I think it's just because it doesn't treat the config options any different to commandline options
<Ilya_G>
However as expected when I spin up a VM from that image I need to go through manual steps `nix-env -i <package_path>` to make it available to the system and then have to mess with systemctl for it to pick up the package configuration
drakonis_ has joined #nixos
<mdash>
Ilya_G: mmm, if it's in systemPackages it should show up in /run/current-system/sw
<Ilya_G>
mdash what does that do if it shows up there?
<symphorien>
otherwise systemd will not pick it up
<mdash>
ah, systemd service, right
domogled has quit [Quit: domogled]
drakonis has quit [Ping timeout: 246 seconds]
<Ilya_G>
mdash correct and it does show up in the floder you mentioned
<Ilya_G>
I did run install with `nix-env -i <package-folder>`
<Ilya_G>
so not sure if it was there from the get go
<gloaming>
__monty__: Also, you can trust a cache without using it by default, then users can opt to use it
<Ilya_G>
I can dump the vm and reload it from fresh image to see, but would that help?
<gloaming>
Ilya_G: Did you see symphorien's message?
<__monty__>
Hmm, adding trusted-substituters to nix.conf doesn't seem to have made a difference? Is the ~/.config/nix/nix.conf irrelevant and I should change these in configuration.nix?
<Ilya_G>
Nope thanks for pointing it out let me check.
<symphorien>
__monty__: only configuration.nix if you are not a trusted user, for the security reasons mentioned above
<__monty__>
symphorien: Things are slowly starting to coalesce and make sense : )
<symphorien>
(and if changed do not have effect, restart the nix-daemon)
mkoenig has quit [Remote host closed the connection]
init_6 has joined #nixos
Ilya_G has quit [Remote host closed the connection]
nexgen has quit [Remote host closed the connection]
FRidh has joined #nixos
<jtojnar>
symphorien: I think you might need make clean for the docs before running make
<boogiewoogie>
is there anyone here playing retail WoW on nixos? i got talked into trying out classic and wanna give it a shot, but wine doesn't seem to play nice here
mkoenig has joined #nixos
<symphorien>
jtojnar: thanks, now I get an error in what I wrote !
<eraserhd>
Is there an easy way to say in a module, "if package A is supported on this platform"?
Fendor has quit [Ping timeout: 265 seconds]
suzanne_ has joined #nixos
<mdash>
eraserhd: "supported" is kind of a flexible concept, what's your situation
orivej has joined #nixos
<eraserhd>
mdash: I'm writing a module in my dotfiles repo which is included for a nixos system and nix-darwin system that, on nix-darwin, needs to install an OSX-specific program. I often use pkgs.stdenv.isDarwin, but it seems better to say "if package is supported".
tilpner has quit [Quit: WeeChat 2.4]
<mdash>
maybe, but 'isDarwin' is all over nixpkgs, it's the common way to do it
<Ilya_G>
symphorien: Your suggestion worked, thank you. The only problem is the service is not automatically running on startup. Is it something I need to add to NixOS config or is it a *.service file flag
minall has joined #nixos
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<minall>
Hello nixos!
<minall>
I'm planning on installing nixos, but I have some questions
<infinisil>
Hi there :)
<minall>
Is posible to install something from source?
<symphorien>
Ilya_G: I guess it needs a wantedBy multi-user.target or something like that
<minall>
Can I add gnome, kde, mate and others to the system configuration?
endformationage has joined #nixos
<minall>
How 'active' is the comumunity of nixos?
<infinisil>
Minall: You mean you want to use the latest git master version of something or the likes?
<minall>
I've tried guix, so I have a brief understanding of the goods of having nixos, since I can roll back in the case something happends
<infinisil>
(I recommend asking one question after another)
<minall>
Does nixos has every version of every package so I can rollback?
<minall>
Oh, sorry about that
<minall>
jej
hmpffff has quit [Quit: nchrrrr…]
<minall>
I mean, for example, If I find a package that nixos doesn't have or a new package I want to try, can I install it from source?
<minall>
Just to try it?
tilpner has quit [Quit: installing logbook]
<Ilya_G>
symphorien: could you give me a code line example?
iyzsong has quit [Read error: Connection reset by peer]
<Shell>
Minall: you can build a package for it in about 20 minutes in most cases.
<infinisil>
Minall: Generally no, it takes some work to be able to run packages on NixOS due to its purity guarantees, which aren't enforced at all on conventional distros
<symphorien>
Ilya_G: sorry not now
cinimod has joined #nixos
<infinisil>
And if you just start out with Nix/NixOS, it will take you more than just 20 minutes to package something for it
<minall>
infinisil can you give me an example of this 'purity'
<Ilya_G>
symphorien: NP thanks for al your help
<minall>
?
<minall>
20 minutos doesn't seem a lot though
<cinimod>
colemickens: woohoo
<cinimod>
[sundials@testVM:~]$ uname -a
<cinimod>
Linux testVM 4.19.72 #1-NixOS SMP Tue Sep 10 09:33:54 UTC 2019 x86_64 GNU/Linux
<infinisil>
Minall: An example is how binaries refer to dynamic libraries by paths like /nix/store/6yaj6n8l925xxfbcd65gzqx3dz7idrnn-glibc-2.27/lib/libc.so.6
<Ilya_G>
symphorien: looks like I have that in configuration already. I'll keep looking.
<infinisil>
Minall: And this path has a hash that took all inputs into account
<infinisil>
Minall: Meaning it's different whenever you change anything
<minall>
Even a space, of course
<infinisil>
Minall: In conventional distros, this would be something like /usr/bin/lib/libc.so or so
<minall>
Yes, that's why nixos doesn't have /usr/
Soo_Slow has quit [Remote host closed the connection]
drakonis has joined #nixos
<cinimod>
huh? - I am running nixos so I assumed `nix-shell -p emacs` would just work (TM)
<cinimod>
error: build of '/nix/store/bs3dn2i5rd1cpyn9m53wpmsrvlaxvdq0-emacs-26.1.drv', '/nix/store/n92pgp5f6a7i2531f0x4kx1fkb504l22-stdenv-linux.drv' failed
<cinimod>
Oh I see the problem
<infinisil>
Minall: (it does have /usr/bin/env as a single file in /usr), but yeah that's why
<cinimod>
Sorry for the noise
<minall>
I see...
<minall>
That's why you can roll back of course...
<minall>
Ok, another question...
<infinisil>
Indeed
nexgen has joined #nixos
<minall>
Does nixos have all the package version of all its packages?
<minall>
I question since in guixSD I have the possibility to roll-back too, but I didn't had a 'package definition' for openjdk8, so I couldn't install it
<infinisil>
Minall: No but yes
<infinisil>
Minall: A single nixpkgs version (the package repository) usually only contains the latest and maybe some other versions
<infinisil>
Minall: However, due to how Nix works, you can use *previous* nixpkgs versions as well
<infinisil>
So I could e.g. get a nixpkgs version from 2010 and build some package that was the latest version back then
<minall>
Mhh...
<infinisil>
There are some minor problems that can occur, but this generally works well
<minall>
Couldn't been easier to have all the versions in latter updates?
<minall>
Yes, that's a good possibility
<infinisil>
Build servers need to build all packages to see if they work
<infinisil>
If we kept every version this would be a huge amount of even-increasing work
drakonis has quit [Ping timeout: 245 seconds]
drakonis has joined #nixos
<infinisil>
And this also limits the version combinations possible
<infinisil>
It would be a pain if we had to make packages work for 10 different versions of some dependency
<infinisil>
And this is exponentially worse the more dependencies there are
lally has joined #nixos
<minall>
Wow
<minall>
Totally right
<mdash>
Minall: When it's particularly valuable to keep multiple versions of something around, it's kept in nixpkgs under a different name
<minall>
Nice professor I have here
<mdash>
there's multiple kernel versions, gcc versions, java versions, etc available in nixpkgs
<minall>
Ok...
<mdash>
but most version changes just replace the previous one
<minall>
All clear!, next question...
<minall>
Of course, errors in newer versions are unlikely
<minall>
How many desktop environments or windows managers does nixos has?
<minall>
All of them?
<minall>
In guixSD there's not KDE, they are working on it of course
oida has joined #nixos
<minall>
Welp, but nixos does have KDE, but does it has for example, gnome, awesome, mate, fxde, lxde, and others?
<Shell>
most of them. KDE and GNOME are definitely there, as are a bunch of smaller ones.
<infinisil>
Minall: awesome is a window manager however, so you'll find it under services.xserver.windowManager
<minall>
Does NixOS uses Xorg o Wayland by default?, and which one should I choose? (the latter is a general one, no need for response If you don't want to)
<minall>
Nice!
tilpner has joined #nixos
<infinisil>
By default nothing
<infinisil>
You'll have to choose yourself :)
<minall>
Mh...
<minall>
Ok
<infinisil>
Most are using xorg, but I hear some people are enjoying sway or gnome (which I think uses wayland by default now)
<tilpner>
Minall: For every distribution, there are always times when the packages versions are behind the released versions
<qyliss>
Minall: if you run NixOS unstable, you can get the latest versions of packages as soon as somebody updates them in the Nixpkgs repo and a few tests to make sure systems still work have been run.
drakonis has quit [Remote host closed the connection]
<qyliss>
Minall: if you run stable, you won't get newer versions unless they're just patch versions like security updates
<{^_^}>
#68608 (by hedning, 4 days ago, open): Gnome 3.34
<qyliss>
Minall: that probably wouldn't work, because often packages in unstable haven't made it into stable at all yet, or NixOS options have been refactored between the two, so your configuration might well not work with both.
<Yaniel>
well you could have two nixos installs, no?
<Yaniel>
which potentially share a /nix/store
<Yaniel>
I guess that would make garbage collection problematic though :/
<hyperfekt>
Is there any way to quote a Nix expression to get it as a string?
<infinisil>
Yaniel: Minall: There is the possibility of using child configurations through `nesting.children`, which since #45345 are available to boot from in grub
<minall>
That's nice that, they're working on gnome right now, that was fast!
<infinisil>
This probably answers your other question: The nixpkgs/NixOS community is pretty active :)
<minall>
Ok...
<minall>
Yes, I see that now!
<minall>
I didn't had to answer again lol
logzet has quit [Ping timeout: 264 seconds]
<minall>
How 'stable' is the stable version of NixOS?, like Debian stable?
<qyliss>
Minall: to give you another example, Linux 5.3 came out yesterday, and the updated package has already been merged. It's not available to unstable users just yet, because we have a failing test we need to fix, but still.
<tilpner>
Oooh, I like boot.binfmt.emulatedSystems
<qyliss>
Minall: the goal is to be pretty close to that level of stability. In practice, we don't always manage, of course.
<aanderse>
what? we aim to be debian stable?!
<qyliss>
We'll generally upgrade patch releases in stable, for example, whereas Debian just backports the patch.
<tilpner>
<3 matthewbauer
<{^_^}>
matthewbauer's karma got increased to 4
<minall>
Lol!
<aanderse>
debian stable is like ~2 year release cycle stable
<qyliss>
yeah I didn't mean that
<minall>
Yes...
<aanderse>
i'm opposed to that level of "stability"
<aanderse>
:)
<ShaRose>
centos level stable
<ShaRose>
lol
<qyliss>
Just that, for the lifetime of a release, things shouldn't break
<aanderse>
ah, ok
<minall>
So: NixOS is just the 'stable' version of the packages, and the unstable the 'newer' ones?
<aanderse>
well... debians policy means that things do break
<mdash>
more like debian stale
<aanderse>
debian 9 ships php 7.0 because of their "stability" policy
<aanderse>
</rant>
<infinisil>
Minall: You can use the stable or unstable version of NixOS
<tilpner>
infinisil: I thought of nesting.children too, but there's no easy way to use it to install the same config for multiple channels IINM
<qyliss>
Minall: NixOS 19.03 is the stable version, NixOS unstable is the unstable one
<qyliss>
You get a choice when you download the installer, although the stable version is more prominent.
<infinisil>
tilpner: Yeah it probably needs some hacky stuff to make it work..
jasom has joined #nixos
<minall>
O
<minall>
Ok...
<minall>
This a stupid question but, the only reason why nixOS stable is different from unstable is the packages versions?
<infinisil>
Minall: NixOS is basically a whole bunch of packages, and NixOS modules that tie everything together nicely while allowing easy customization with NixOS options
<infinisil>
On unstable both parts can be unstable
<infinisil>
Meaning options can break, modules can change behavior in breaking ways, stuff like that
<minall>
Mh...
<minall>
So it's not jsut the packages
<minall>
That's awesome!
<minall>
COol
<infinisil>
Indeed, I think the most interesting part on NixOS are the modules
<infinisil>
s/on/of
<__monty__>
Is vim_configurable the right way to get a vim with +lua?
<minall>
So I can have different systems with different desktop environments and such, but... Can I have different workflows? like for example: in one configuration, I have emacs, gnome or other, and on other configuration I have steam, xfce for gaming?
waleee-cl has joined #nixos
<mdash>
Minall: yes
<evanjs>
Is the result of mkAliasDefinitions set/write-only?
<infinisil>
Iirc you can configure multiple different xsessions per user
<minall>
Really?, can I just do a 'switch' to another reconfigure where I can find all steam and such?
evanjs has joined #nixos
<minall>
And when 'switching' to my work environment can I find just emacs and such, with steam not showing?
Ariakenom has quit [Ping timeout: 240 seconds]
Ariakenom has joined #nixos
<infinisil>
Minall: While you could do this with a nixos switch, I wouldn't recommend it
<infinisil>
Minall: I'm pretty sure now that if you configure multiple desktop managers that a fitting display manager lets you choose which one to start
<infinisil>
So to switch it you'd just log out and choose the other one
<{^_^}>
[nixpkgs] @dbalan opened pull request #68968 → idid: init at 2.1.0 → https://git.io/JeOoP
Soo_Slow has quit [Remote host closed the connection]
<infinisil>
However with that you would still see all packages from the other workflow..
<infinisil>
If you did this with a nixos switch way this wouldn't be
jgt has quit [Ping timeout: 245 seconds]
Chiliparrot has joined #nixos
<infinisil>
I guess a nixos switch wouldn't be that bad actually
<infinisil>
(followed by a relog, because NixOS doesn't automatically terminate your xsession)
<mdash>
lightdm, gdm etc all have a menu for picking which xsession you want to start when you login
<minall>
Mh--- yes
<minall>
I know I can just change my desktop environment, but I mean the packages and all
<minall>
That can be a cool project, but it isn't necessary
<mdash>
Minall: sure, you could
<minall>
I thing you opened a new world, I didn't knew of sway
<tilpner>
Minall: It would be much easier to create two users
<mdash>
i'm not clear wahat the benefit would be
<infinisil>
Yeah you can do that with a nixos-rebuild switch (with two fitting configs)
<minall>
Yes, I or the users of coures
<minall>
Nice...
<Ariakenom>
I (somehow) have a nixos.org/channels/nixos-version entry in nix-channels --list that I tried to remove with nix-channels --remove. please advice.
<minall>
Maybe the users would be much better..
<Ariakenom>
... and it didnt work. ofc
<__monty__>
Hmm, I'm having trouble resolving cache.nixos.org : /
<infinisil>
evanjs: mkAliasDefinitions just transfers the definitions of one option to another
<infinisil>
evanjs: It doesn't declare any optino
eraserhd has quit [Ping timeout: 245 seconds]
<minall>
Can I have the stable version but installing the gnome from the unstable version?
<Ilya_G>
helped me to get general grasp of things in a big way.
<kraem>
Ariakenom: are you using a declarative setup with a 'configuration.nix' file or are you installing all packages with nix-env? the declarative approach uses the channels provided with your root account, the other uses the channels provided with your normal user
<infinisil>
Ilya_G: Eh, sorry but I wouldn't recommend the pills for starting out with Nix, they're way too indepth imo
<infinisil>
And others share the same opinion
<evanjs>
+1 on the pills being a little too verbose
<Ariakenom>
kraem: I use a bunch of nix-env. but my user channel list is empty now
<evanjs>
infinisil: for a smallest reproducable case: `nixos-option mine.xUserConfig.services` gives me "error: The option `mine.xUserConfig.services' defined in `/home/evanjs/src/nixos_cfg/config/personal' does not exist."
<infinisil>
Oh I'm not surprised at all that nixos-option doesn't work
<minall>
I see, thanks!
<minall>
Last question:
<infinisil>
evanjs: It does some fancy stuff to extract options
<minall>
Who designed such beautiful logo?
<infinisil>
fancy but unreliable
<minall>
I'm interested guyx, thank you for your answers!, I'll totally check it
<infinisil>
evanjs: Well it may not be unreliable, I take that back, but it does some fancy stuff
<Ilya_G>
Nix Pills were perfect for me. They point out nuances of the language and how it resolves into the effect that mix of nix files and shell scripts have on each other.
<infinisil>
Minall: Nice :D
veske has joined #nixos
<kraem>
Ariakenom: i'm not sure if it falls back to your channel which is set for your root account actually. Someone else might have a definitive answer for you but it seems like it does.
bigvalen has quit [Ping timeout: 240 seconds]
<Ariakenom>
kraem: I seem to be able to install things so I can't imagine what else it would do. thanks!
bigvalen has joined #nixos
emptyflask has joined #nixos
<evanjs>
infinisil: The most recent case where I found it was unusable was when I tried to use mine.xUserConfig.xsession.windowManager.command instead of home-manager.users.evanjs.xsession.windowManager.command
<evanjs>
I guess it doesn
Fendor has quit [Remote host closed the connection]
<evanjs>
doesn't _really_ matter in this case too much, as xUserConfig isn't generated for root, though...
Fendor has joined #nixos
<Ariakenom>
if I want to change to newer stable nix channels on nixos are the two things i need to change what is in nix-channels --list and configuration.nix?
gagbo has quit [Ping timeout: 265 seconds]
fendor_ has joined #nixos
domogled has joined #nixos
<exarkun>
what do you think you need to change in configuration.nix?
<mdash>
Ariakenom: if you're using channels, that's all you hve to change
<evanjs>
Ariakenom: what mdash said. Just change whatever the nixos channel points to
hmpffff has quit [Quit: nchrrrr…]
<evanjs>
If you're pinning, I can see configuration.nix needing to be changed, but not if you're just using channels
gagbo has joined #nixos
<evanjs>
s/channels/nix-channels/
<{^_^}>
[nixpkgs] @teto opened pull request #68970 → qemu-guest: allow to override security.rngd → https://git.io/JeOKu
fendor__ has joined #nixos
veske has quit [Quit: This computer has gone to sleep]
Fendor has quit [Ping timeout: 240 seconds]
domogled has quit [Remote host closed the connection]
minall has left #nixos ["ERC (IRC client for Emacs 26.3)"]
<Ariakenom>
mdash: thanks. oh but what upgrade commands do I need to run. Both nixos-rebuild and nix-env commands?
<__monty__>
Ariakenom: nix-channel --update, nixos-rebuild switch should be enough unless you've installed things using nix-env or use home-manager.
growpotkin has joined #nixos
<__monty__>
Or nix-darwin.
<kraem>
for `nix-channel --update && nixos-rebuild switch` you can use the shorthand version `nixos-rebuild switch -u` which updates the channels before the switch :)
alex`` has joined #nixos
fendor__ is now known as fendor
<Ariakenom>
__monty__: ok so I will need nix-env too
ardumont has quit [Ping timeout: 246 seconds]
<kraem>
i believe the command for nix-env is `nix-env -u`
<__monty__>
Ariakenom: Or take the opportunity to put all of those into configuration.nix : )
<waleee-cl>
kraem: does nixos-rebuild switch -u really update channels other than the nixos one?
<Ariakenom>
I like the idea of user local installs though
zacts has joined #nixos
<kraem>
waleee-cl: didn't think about that.. maybe one needs to update the channels with nix-channel if one has several different
nexgen has quit [Quit: Leaving]
<waleee-cl>
kraem: yeah, I had some pretty old stuff from unstable before I realized I needed to update the channels manually
<exarkun>
in-repo, it builds fine. what am I doing wrong trying to use it from elsewhere?
nakkle has quit [Quit: Leaving.]
<exarkun>
it's true /nix/store/mqqjh2490x4igk2q8d9lc9im0rmn6rc1-4m0hwizgrmhs12ziab46z98cmvivzhyx-privacypass-f74b371/challenge-bypass-ristretto-ffi/src doesn't exist. challenge-bypass-ristretto-ffi is an empty directory. it's supposed to be a submodule. it seems like fetchFromGitHub should fetch submodules.
<gloaming>
exarkun: Ah, you need to pass fetchSubmodules = true
eraserhd has quit [Quit: WeeChat 2.6]
<exarkun>
ah :/ I confused myself, thought that was the default for fetchFromGitHub, but I see it is off by default there and on by default for fetchgit
<gloaming>
exarkun: Also, just "callPackage src {}" should work
Ariakenom has quit [Remote host closed the connection]
<exarkun>
but not sure passing fetchSubmodules is working
<exarkun>
still fails, output looks pretty much the same
gagbo has quit [Ping timeout: 276 seconds]
gagbo has joined #nixos
<exarkun>
fetchSubmodules should be part of the derivation so changing it would lead to a different store object, right? (ie, I'm not getting a cached fetchSubmodules=false object even though I'm passing fetchSubmodules=true now?)
<gloaming>
exarkun: Did you change the hash?
<exarkun>
oh. nooo.
<gloaming>
:D
<gloaming>
Yeah, I hate that
<evanjs>
Thoughts on what might be causing Unable to locate the Javac Compiler in: /nix/store/hb006fvpnqhnnwa9g57cmad04qyga906-openjdk-8u222-ga/lib/openjdk/jre/../lib/tools.jar?
<exarkun>
and nix-prefetch-github doesn't have any kind of --fetch-submodules option
wfranzini has quit [Remote host closed the connection]
<evanjs>
programs.java.enable is true, maven is in my systemPackages, etc
eraserhd has joined #nixos
Chiliparrot has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<{^_^}>
[nixpkgs] @worldofpeace pushed 31 commits to staging: https://git.io/JeO6o
<exarkun>
ah right
drakonis has quit [Ping timeout: 250 seconds]
<devalot>
A SSH URL will require keys that nix-build won't have.
<exarkun>
it uses a `git@github:...` url
<devalot>
Yup, you need to change that.
<exarkun>
crummy. I assume my ~/.gitconfig is an impure input ...
<devalot>
nix-build won't use anything in ~/
<exarkun>
I can't change the actual submodule configuration, it's someone else's repo. So I have to change it locally. With local git config or ... ?
boogiewoogie has quit [Quit: Leaving]
<devalot>
I'd fork the repo, fix the URL, and submit a PR. And in the meantime, use your fork.
Ariakenom has quit [Read error: Connection reset by peer]
evanjs- has quit [Client Quit]
<exarkun>
hope upstream agrees :)
asymptotically has joined #nixos
drakonis has joined #nixos
<devalot>
I *think* you could also write a derivation that clones the main repo without submodules, then add more source entries for the submodules. I've not done that and I'm not sure the `src' attribute can be a list.
Heirlung has joined #nixos
Heirlung has quit [Max SendQ exceeded]
<devalot>
Submodules suck in almost all use cases.
evanjs- has joined #nixos
<__monty__>
Does anyone use the pdnsd service?
Ariakenom has joined #nixos
<__monty__>
I can't figure out how to clear its cache.
<gloaming>
devalot: I think you have to write unpackPhase manually in that case
<devalot>
exarkun: Another idea: if the submodules are just dependencies that the package needs to be installed, then treat them like real dependencies and provide them to the main repo sans submodules.
<exarkun>
They totally are but the packaging is really gnarly and untangling the submodule proved more difficult than I wanted to deal with
<devalot>
Right. Most uses of submodules that I've seen are to trick Git into being a package manager. Nix does a much better job.
jgt has joined #nixos
<gloaming>
exarkun: Ah, so this is born of cowardice? :D
<teto>
devalot: fetchGit can
tjg1 has quit [Quit: if i commit suicide, at least a real nigga killed me]
<teto>
(use things in ~/)
<exarkun>
gloaming: maybe exhaustion
<gloaming>
exarkun: If the privacypass derivation has to build the dependency, won't you have to deal with the same pain but worse?
<gloaming>
Haha
<gloaming>
I know that feeling for sure
<exarkun>
okay here's something I don't understand
<devalot>
teto: But ~/ isn't what you expect, right? Since it's running as a nixbld?
<exarkun>
the privacypass derivation _does_ split off the submodule and then provide it in a nix-friendly way
<teto>
`builtins.listToAttrs [{}]` looks fine in the repl but not once I run the code from my nixpkgs (complains about missing 'name')
<exarkun>
but for some reason that fails when I invoke the privacypass expression from my repo
drakonis_ has quit [Ping timeout: 276 seconds]
<exarkun>
that's the problem I felt too tired to try solving today
<teto>
devalot: I know fetchGit can use my ssh keys and the config in ~/.ssh/config, not sure how it works though.
<exarkun>
also I've just realized the submodule is not defined by upstream, it's a repo I can get changed into easily
tjg1 has joined #nixos
ng0 has quit [Remote host closed the connection]
zeta_0 has joined #nixos
<teto>
maybe it fetches deps as a trusted user first
ng0 has joined #nixos
jgt has quit [Ping timeout: 245 seconds]
<zeta_0>
can i install nixos on something like a rasberry pi?
nspin has quit [Ping timeout: 260 seconds]
<devalot>
zeta_0: Yes. There's a SD card image you can flash. Just search for it. (I can't remember where it lives.)
<Phillemann>
Hm, nixos-unstable is 8 days old now.
ddellacosta has quit [Ping timeout: 276 seconds]
fendor has quit [Ping timeout: 245 seconds]
<misuzu>
zeta_0: only aarch64
jgt has joined #nixos
<Phillemann>
No space left on device - oh.
<locallycompact>
Hi, I'm using nix-build to build things which require access to tarballs from private npm repository, how can I authorise nix-build to discover these?
<misuzu>
armhf is not usable
<locallycompact>
Which is usually done by npm login
<zeta_0>
misuzu: `aarch64`?
ddellacosta has joined #nixos
<exarkun>
zeta_0: approximately rpi3 or newer
civodul has joined #nixos
Ariakenom has quit [Remote host closed the connection]
Ariakenom has joined #nixos
jgt has quit [Ping timeout: 246 seconds]
inkbottle has quit [Ping timeout: 245 seconds]
inkbottle has joined #nixos
Ariakenom has quit [Read error: Connection reset by peer]
<chpatrick>
hi, has anyone had any luck using a bluetooth a2dp headset (with GDM)?
<{^_^}>
[nixpkgs] @worldofpeace pushed commit from @romildo to release-19.09 « mate.atril: 1.22.1 -> 1.22.2 »: https://git.io/JeOiJ
<chpatrick>
I'm using the commit that uses the fedora pulseaudio configuration for gdm which is supposed to make it work, and I've done everything in the bluetooth manual page
<chpatrick>
but I still get "a2dp-sink profile connect failed for ...: Protocol not available"
shibboleth has joined #nixos
cinimod has quit [Remote host closed the connection]
cinimod has joined #nixos
<manveru>
chpatrick: not sure what you mean with gdm
<chpatrick>
manveru: there's an issue with gdm where it takes control of bluetooth, or something like that
knupfer has joined #nixos
<manveru>
i'm using a2dp for headphones and speakers fine
<chpatrick>
00972dc89ce01a025efe3e33b116b4722fc4ce4b is meant to fix it
<chpatrick>
manveru: did you have to do any extra configuration? I'm using package = pkgs.pulseaudioFull etc
<manveru>
atm i'm trying to figure out how to make the damn hdmi audio module blacklisted :P
romildo has joined #nixos
srl295 has joined #nixos
<manveru>
well, i have my user in `pulseaudio` group, and `hardware.pulseaudio = { enable = true; package = pkgs.pulseaudioFull; support32Bit = true; }`
<manveru>
also `hardware.bluetooth.enable = true;`
<manveru>
then i run blueman and pavucontrol to select which output i want
<__monty__>
Hmm, vim_configurable builds nixos-vimrc. Will this keep vim from reading ~/.vim?
<manveru>
__monty__: jup
<manveru>
it'll make a wrapper that uses `-u whateverconfigfile`
<__monty__>
manveru: Oh, I can just pass a path? I don't have to nixify my vim config?
<{^_^}>
[nixpkgs] @worldofpeace pushed 2 commits to staging: https://git.io/JeOio
<{^_^}>
[nixpkgs] @worldofpeace pushed commit from @dtzWill to staging-19.09 « openconnect: 8.04 -> 8.05 (security!) »: https://git.io/JeOi6
cinimod has quit [Ping timeout: 268 seconds]
ixxie has quit [Ping timeout: 258 seconds]
<zeta_0>
misuzu: ok, thanks for the heads up
<zeta_0>
misuzu++
<{^_^}>
misuzu's karma got increased to 1
<romildo>
Currently mate updates is blocked in r-ryantm. Is it possible to enable updating mate inside the same stable version? The current stable version is 1.22.X. For instance, mate.atril has just been updated manually from 1.22.1 to 1.22.2. When only X varies in the version number, the automatic update would succeed most of the time.
<{^_^}>
[nixpkgs] @worldofpeace pushed 2 commits to staging: https://git.io/JeOPx
andrewrk has joined #nixos
<andrewrk>
do I need to do something in my nixos config to get xfce 4.14? if I look at xfce4-about, it says 4.12. but I'm on 19.09pre192418.e19054ab3cd which looks like it should have xfce 4.14 in it
<rycee>
infinisil: No worries :-) The NUR repo auto update finished ok.
knupfer has joined #nixos
fendor has joined #nixos
batzy has joined #nixos
<batzy>
Has anyone here used cool-retro-term? It seems I cannot load a custom theme for it.
<batzy>
I'm a bit new to nixos so I have no idea where the stuff would be stored etc
gagbo has quit [Ping timeout: 245 seconds]
xephyr1288 has quit [Remote host closed the connection]
gagbo has joined #nixos
<batzy>
some of the errors I get include: file:///nix/store/7054ihm9wn1ci3prr6d7s031cihgkamy-system-path/lib/qt-5.12/qml/QtQuick/Dialogs/DefaultFileDialog.qml:102:33: QML Settings: Failed to initialize QSettings instance. Status code is: 1
<sphalerite>
The other day, I restarted my tinc daemon, and for some reason that seems to have stopped a completely unrelated bridge interface. Does anyone have any idea how I can debug that and find out why that happened?
gxt has quit [Ping timeout: 260 seconds]
<lordcirth_>
sphalerite, anything in journalctl?
qqlq has joined #nixos
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<batzy>
:(
<sphalerite>
lordcirth_: yes, that's how I first determined that the bridge going down coincided with stopping tinc
<lordcirth_>
sphalerite, if you up the bridge, and restart tinc again, does it go down again?
zupo has joined #nixos
<sphalerite>
lordcirth_: nope…
<adisbladis>
Batzy: Which channel?
<batzy>
adisbladis, what do you mean?
<adisbladis>
Batzy: Which channel are you on right now?
<batzy>
nixos.
<batzy>
#nixos, why
fendor has quit [Quit: Leaving]
<adisbladis>
Batzy: I meant nixpkgs channel
<batzy>
ha
<batzy>
19.03
<batzy>
adisbladis,
polman has quit [Ping timeout: 240 seconds]
<adisbladis>
Batzy: Ah ok. It works on unstable.
<batzy>
is there a way I could switch..?
<adisbladis>
And ime cool-retro-term is one of those packages where the stars need to align for things to work...
<adisbladis>
Batzy: Sure you can change, you could even pull just that package from unstable
<adisbladis>
But I have to run off now
<batzy>
adisbladis, okay I added the unstable channel
<batzy>
how do i install for a specific channel
<batzy>
ahhh
<{^_^}>
[nixpkgs] @bjornfor pushed to master « ntopng: mark as broken »: https://git.io/JeOXb
<qyliss>
Batzy: in your environment.systemPackages list, add `((import <unstable> {}).cool-retro-term)`, assuming your unstable channel is named "unstable"
octor has joined #nixos
<arcnmx>
are there any notable conventions/reasons around the use of pkgs.fetchurl vs builtins.fetchurl vs <nix/fetchurl.nix>?
<qyliss>
arcnmx: always use pkgs.fetchurl unless you have an extremely good reason not to
sigmundv has joined #nixos
cinimod has joined #nixos
octor has quit [Remote host closed the connection]
polman has joined #nixos
selfsymmetric-mu has quit [Remote host closed the connection]
zupo has quit [Ping timeout: 265 seconds]
<arcnmx>
qyliss: hm, my main reason for asking is mostly that the use of curl makes the fancy nix 2 cli progress indicators much less impressive/useful ><
<arcnmx>
though I guess that's maybe just a deficiency of nixpkgs or nix or some combination of the two
<qyliss>
Does it? Those indicators work fine for me with fetchurl?
Myhlamaeus3 has quit [Read error: Connection reset by peer]
<arcnmx>
hm, maybe there's some logic that decides internally whether it should use the explicit builder that calls curl or can delegate to builtin when it can?
<qyliss>
I don't know.
vika_nezrimaya has quit [Read error: Connection reset by peer]
vika_nezrimaya has joined #nixos
Myhlamaeus3 has joined #nixos
zacts has joined #nixos
ris has joined #nixos
<batzy>
qyliss, this didnt fix the problem really
Myhlamaeus3 has quit [Read error: Connection reset by peer]
Myhlamaeus4 has joined #nixos
dansho has joined #nixos
<batzy>
does anyone know how to load a theme on cool-retro-term?
<batzy>
because cool-retro-term -p theme.json does not work
zupo has joined #nixos
o1lo01ol1o has quit [Remote host closed the connection]
cinimod has quit [Ping timeout: 240 seconds]
psyanticy has quit [Quit: Connection closed for inactivity]
turtlerabbit has joined #nixos
phreedom has quit [Ping timeout: 260 seconds]
<turtlerabbit>
How can I reference files in <nixpkgs> from within an overlay file?
<batzy>
I also get the error QObject::connect: No such slot Konsole::TerminalDisplay_QML_140::close()
<samueldr>
anyone can tell me where is the source for the travis ci integration for nix? I cna't seem to find it
<arcnmx>
turtlerabbit: you may want to try something like callPackage (self.path + "/pkgs/applications/window-managers/xmonad/wrapper.nix")
xkapastel has joined #nixos
<arcnmx>
(though specifically that error is because the proper syntax would be <nixpkgs/pkgs/applications/etc>... but you probably don't want to be using <nixpkgs> in an overlay anyway so)
<turtlerabbit>
Why not?
<arcnmx>
I don't know if I could explain it with the appropriate nuance but the tldr is maybe that global variables/context are bad?
alex`` has quit [Ping timeout: 276 seconds]
<turtlerabbit>
Ok, I get it, in the sense that the overlay could be on something else besides nixpkgs
<turtlerabbit>
So this works. Everyone can critique my overlay's "nixonicness" (or whatever you call it :P) https://pastebin.com/mQ8hLfFs
batzy has quit [Ping timeout: 268 seconds]
alex`` has joined #nixos
<arcnmx>
Well, it will be on "nixpkgs"... but it could be applied to a different version/checkout of nixpkgs than the one that happens to be in the NIX_PATH environment variable! (or -I or whatever)
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<sphalerite>
tilpner: where was your syncoid/sanoid package again?
<turtlerabbit>
It really bothers me that the documentation of overlays is descriptive instead of usecase based. I never knew about self.path
siel has joined #nixos
bitmapper has quit [Ping timeout: 245 seconds]
<arcnmx>
Though I'm being a bit uncertain here because I'm not sure if .path is considered the right way to do it, or if non-exported files/functions aren't considered part of nixpkgs "public api", or if super.path instead would be slightly more efficient, etc...
growpotkin has joined #nixos
zupo has joined #nixos
turtlerabbit has quit [Remote host closed the connection]
selfsymmetric-mu has joined #nixos
swapgs has quit [Ping timeout: 258 seconds]
laerling has joined #nixos
klntsky has quit [Remote host closed the connection]
selfsymmetric-mu has quit [Remote host closed the connection]
klntsky has joined #nixos
swapgs has joined #nixos
swapgs has joined #nixos
swapgs has quit [Changing host]
FRidh has quit [Quit: Konversation terminated!]
Emiller88 has quit [Ping timeout: 264 seconds]
<laerling>
Hello. I'm running a live instance of NixOS on a VM of german cloud server provider Hetzner, and I don't seem to be able to ping any server on the internet. Is this a known problem?
<{^_^}>
[nixpkgs] @peti pushed 2 commits to haskell-updates: https://git.io/JeO1w
<arianvp>
emily: i've been trying to set up some nixos tests but all the nixos tests on master currentl kernel panic for me
<arianvp>
:(
<Shell>
laerling: if they don't do dhcp, you'll need to configure your ip+subnet+gateway manually from the settings Hetzner give you.
zupo has quit [Ping timeout: 265 seconds]
<Shell>
(and I am guessing that don't do dhcp, that'd be silly.)
<laerling>
Nah, they seem to do dhcp, because I have an IP and gateways and default routes. And I can ping the gateways, but not e. g. 8.8.8.8
<laerling>
I guess the problem is with Hetzner
<Shell>
huh, weird
gagbo has quit [Ping timeout: 258 seconds]
<laerling>
Indeed.
gagbo has joined #nixos
<laerling>
Also, what can I use for manual domain resolution on live nixos? resolvectl fails because dbus-org.freedesktop.resolve1.service is not available.
<andrewrk>
ivan, yes I just upgraded and yes it shows settings
<emily>
right now I just use `eth0` and disable the predictable names, which is about as gross and works too
<arianvp>
it's not what you're looking for but I think it's the easiest way to have the same broken behaviour we had before
<ivan>
andrewrk: thanks
<arianvp>
instead of being a bit more broken than before
<arianvp>
we can then worry about fixing this proper in 20.03 instead of stressing about it now
mexisme has quit [Ping timeout: 276 seconds]
<arianvp>
which I think is the more healthy thing to do
<philipp[m]>
Is there a reason why `php` doesn't have that awesome `.withPackages` like other scripting languages?
<andrewrk>
ivan, I have a pretty minimal conf
o1lo01ol1o has quit [Remote host closed the connection]
<emily>
arianvp: oh, certainly I'm not in any rush for a solution
<__monty__>
Seem to be having some issues setting up a remote builder. Nix complains about the local host not supporting feature "haskell". I added that feature to the remote host's definition though.
<emily>
it'd just be nice to get consistency eventually; I run -unstable so the release cycle doesn't mean too much to me
<arianvp>
cool
<__monty__>
How can I test whether a remote builder works?
<arianvp>
emily: could you try if this patch works for you?
<emily>
arianvp: will try to tomorrow
<arianvp>
cool
<emily>
"bringing up" is strange wording for teardown though :)
Myhlamaeus has quit [Ping timeout: 246 seconds]
mexisme has joined #nixos
o1lo01ol1o has joined #nixos
o1lo01ol1o has quit [Remote host closed the connection]
o1lo01ol1o has joined #nixos
srl295 has quit [Quit: Connection closed for inactivity]
<o1lo01ol1o>
Is there any current best practices for sharing nixops statefiles among a team?
fendor has quit [Read error: Connection reset by peer]
<{^_^}>
[nixpkgs] @zimbatm opened pull request #68981 → coz-profiler: init at 0.2.0 → https://git.io/JeOD5
<infinisil>
o1lo01ol1o: Three solutions I can think of: Write a wrapper for nixops that manages the state file, use NFS or Samba to have the state file on a single machine or to commit the state file into git (this file needs to be kept secret though!)
<infinisil>
I'd go for the first one since it's the most flexible and you'll probably end up with a wrapper script eventually anyways
<o1lo01ol1o>
infinisil: right, are there any public tools of the sort available?
<{^_^}>
[nixpkgs] @symphorien opened pull request #68982 → paperwork: include setuptools to fix startup → https://git.io/JeODb
jgt1 has joined #nixos
<infinisil>
For managing the state file? Not that I know of, but should be fairly simple with some bash
<o1lo01ol1o>
Yes, but I just wanted to learn from someone's previous experience.
<o1lo01ol1o>
thanks for the info
jgt has quit [Ping timeout: 276 seconds]
gxt has joined #nixos
<infinisil>
Oh, another alternative is to just not use nixops, but something like nix-deploy instead
<infinisil>
There's another tool starting with "k" that can do that but I forgot its name
erasmas has quit [Read error: Connection reset by peer]
<tyrion-mx>
Hello, I managed to make mailspring run using `buildFHSUserEnv`, but I think it would be nice to package it properly. I tried with node2nix but failed miserably. I think it shouldn't be too hard to do it at least by using the chroot. Would somebody be willing to give me some advice?
<infinisil>
gchristensen would be a guy to tell you more about why this is interesting (I think it allows eventual terraform integration)
<o1lo01ol1o>
I saw that PR when I was trying to find an answer to my issue
<o1lo01ol1o>
looks to step in the direction of this solution
emptyflask has quit [Ping timeout: 276 seconds]
<{^_^}>
tyrion-mx: Please expand your question to include more information, this will help us help you :)
dermetfan has quit [Ping timeout: 276 seconds]
emptyflask has joined #nixos
knupfer has quit [Ping timeout: 245 seconds]
kleisli has joined #nixos
<kleisli>
is it possible to declaratively install packages from different channels on nixos?
<tyrion-mx>
sure, I was wondering: is it a way to have a build environment where I can run npm install and have all the shared libraries necessary for build, and then an other one which depends on the output of the previous one with the runtime dependencies installed?
dupadotont has quit [Remote host closed the connection]
<tyrion-mx>
Right now I am using a single chroot with everything installed (build time and run time stuff) and I managed to make `npm install` work from the Mailspring I cloned in my home directory
waleee-cl has quit [Quit: Connection closed for inactivity]
jgt1 has quit [Ping timeout: 246 seconds]
<turtlerabbit>
Did NixOS drop the support for 32 bit binaries? I'm trying to run a 32 bit precompiled package, but ldd says it is "not a dynamic executable"
<tyrion-mx>
infinisil, I know, I tried but the tool just crashed immediately. I spent two days trying to make it work and in the end I managed with the chroot. I know it is not the best, but it would be already something to have ti packaged. Unfortunately I cannot afford to spend too much time on it at the moment, but maybe if we package it even not in the best way, it could benefit other people
<{^_^}>
svanderburg/node2nix#154 (by tyrion, 3 hours ago, open): ENOENT when using lock file
<infinisil>
tyrion-mx: Ah, maybe you just want to wrap the final executable with some env vars to make it work in the final result?
v0|d has joined #nixos
<infinisil>
If the build is already working
wfranzini has quit [Remote host closed the connection]
<tyrion-mx>
nono, wait, the point is that I ran the installation manually in the chroot. I am not sure how to do it in the install script
hmpffff has quit [Quit: nchrrrr…]
nixnothing has joined #nixos
<infinisil>
Oh, I see, buildFHSUserEnv is usually not used to actually build packages
<infinisil>
I think
<infinisil>
Wait
nixnothing has quit [Client Quit]
<tyrion-mx>
I tried with `extraBuildCommands` and `extraInstallCommands` but I got all sorts of errors, that stuff is readonly
<infinisil>
What doesn't work specifically?
<infinisil>
With e.g. extraInstallCommands
mexisme has quit [Ping timeout: 245 seconds]
dbyte has quit [Read error: Connection reset by peer]
dbyte has joined #nixos
<tyrion-mx>
basically, if I put stuff in `extraBuildCommands` I run before the chroot is created, so it is not good. Same thing with `extraInstallCommands` but at least there the chroot should have been built
<tyrion-mx>
so maybe I just need to figure out how to run a bunch of commands inside the chroot from extraInstallCommands
troydm has joined #nixos
<tyrion-mx>
and to copy the $src inside a writable directory maybe /opt . So, yeah, I remember that at the beginning I thought "first let me try to copy the repo ($src) inside the chroot using extraBuildCommands, and I tried with /opt but had some problems". If you tell me that should work, I can try again and tell you what was wrong
__monty__ has quit [Quit: leaving]
<infinisil>
Hm I see
<infinisil>
Yeah so now I'm pretty convinced that will never be accepted in nixpkgs even if it worked because of its hackiness. Also I suspect this won't work anyways because the Nix sandbox probably doesn't allow chroots (or does it?)
<infinisil>
buildFHSUserEnv seems to really be intended to be used outside of a nix build, so I wouldn't be surprised if it didn't work within one
<infinisil>
I guess you could try to somehow run $out/bin/${name} to get into the chroot
<clever>
v0|d: this symlink in the home dir is part of it
aw has joined #nixos
<tyrion-mx>
well, actually ... maybe the build could be made to work just by running npm install from outside the chroot. I still need a writable folder and PKG_CONFIG_PATH and LIBRARY_PATH set
<tyrion-mx>
I guess maybe that can be done with mkDerivation ? I will try
spacefrogg has joined #nixos
<clever>
tyrion-mx: if pkgconfig is in the buildInputs, it will fix PKG_CONFIG_PATH and add -L flags for you
<clever>
tyrion-mx: you may also want to look into yarn2nix
jgeerds has quit [Ping timeout: 276 seconds]
<turtlerabbit>
Does anyone know a good example of a prebuild 32 bit package in nixpkgs?
<{^_^}>
[nixpkgs] @matthewbauer pushed 2 commits to master: https://git.io/JeOyx
wfranzini has joined #nixos
<turtlerabbit>
The blog I found instructs to add "with import <nixpkgs> { system = "i686-linux"; };" in front of the derivation but it doesn't seem to work
ng0 has quit [Quit: Alexa, when is the end of world?]
<clever>
v0|d: you likely want to read what .nix-profile is pointing to, then use nix-copy-closure to copy that storepath over, then nix-env --set /nix/store/foo to set your profile to point to that
<clever>
turtlerabbit: you need to add `--argstr system i686-linux` to tell nixpkgs to be 32bit
wfranzini has quit [Remote host closed the connection]
<turtlerabbit>
clever: It seems I have to pass something like "pkgs_i686 = pkgsi686Linux" to the derivation from my overlay/toplevel
<v0|d>
clever: OK, nix-copy-closure expects --to & --from. say i've mounted the old disk somewhere. my current home is /home/void, profile is /nix/var/nix/profiles/per-user/void etc.
<clever>
turtlerabbit: you can also use pkgsi686Linux.crossover maybe
<clever>
v0|d: ah, if its only mounted, nix copy is better
<turtlerabbit>
clever: What about pkgsi686Linux.callPackage ?
<{^_^}>
[nixpkgs] @matthewbauer pushed 2 commits to master: https://git.io/JeOSq
Jackneill has joined #nixos
<turtlerabbit>
clever: It's a package for Codeweaver's Crossover
<v0|d>
clever: hash has a substr userenv right?
<{^_^}>
[nixpkgs] @matthewbauer merged pull request #68528 → macvim: work around ibtool issue → https://git.io/JemyU
<{^_^}>
[nixpkgs] @matthewbauer pushed 2 commits to master: https://git.io/JeOSm
<clever>
v0|d: yeah
<turtlerabbit>
clever: I'm afraid it's not publishable since crossover insists on writing a license file relative to its root (normally something like /opt/crossover). I've pleaded with Codeweavers to add an environment variable or something to redirect the license file location but they basically replied by saying "Sucks to be you" :'(
<clever>
turtlerabbit: libredirect is an LD_PRELOAD library, that can remap all filesystem access, without a chroot or container
<tyrion-mx>
clever: I will try this way first, it seems easier for now. Then if I manage I will give yarn2nix a shot ... but how would I handle package-lock.json with yarn2nix?
<turtlerabbit>
clever: You're a tasty box of chocolates, thanks ❤️
<{^_^}>
[nixpkgs] @matthewbauer pushed 2 commits to master: https://git.io/JeOSC
<tyrion-mx>
I wanted to give a shot in this other way which seemed easier. When using mkDerivation, inside buildCommands, what can I use as a temp dir to copy $src into it and run npm install?
<tyrion-mx>
I am getting `request to https://registry.npmjs.org/npm failed, reason: getaddrinfo ENOTFOUND registry.npmjs.org` when trying to run npm install from mkDerivation
<tyrion-mx>
is downloading stuff from the internet forbidden in the build?
dbyte has joined #nixos
erasmas has quit [Quit: leaving]
<notgne2>
tyrion-mx: by default builds are sandboxed, so you can only fetch external resources if you also have the hash, to ensure deterministic builds
<notgne2>
for packaging NPM projects, there are a handful of tools to convert your dependency list into Nix expressions
<tyrion-mx>
Ok, then my approach was never going to work
<notgne2>
namely node2nix (most popular but requires generation), pnpmnix which requires you to use PNPM instead of NPM, and yarn2nix which requires you to use Yarn instead of NPM (and also has issues with native dependencies)
<tyrion-mx>
node2nix already tried and apparently does not work. Not sure if I am doing something wrong (I opened an issue)
<clever>
notgne2: i have an example of yarn2nix, which involves some c++ code
<tyrion-mx>
I was going to try yarn2nix but if it has problem with native dependencies then it's not gonna work as well
<clever>
notgne2: node-sass compiles some c++ against nodejs
<clever>
flow-bin ships a pre-compiled ELF that has to be patchelf'd
<clever>
tyrion-mx: you can use the above 2 things as examples of dealing with the few native deps you run into
<notgne2>
oh for pulled builds it's pretty simple to make it work, but it doesn't have any logic for handling the `postInstall` etc hooks on package.json files
<notgne2>
pnpm2nix seems to handle that quite well, and I've submitted a PR to fix their semver parsing to work using newer PNPM versions
civodul has quit [Quit: ERC (IRC client for Emacs 26.3)]
siiky has quit [Quit: leaving]
<tyrion-mx>
Things are a bit too complicated for my knowledge of nix at the moment :(
<tyrion-mx>
I think I will stop my efforts and simply use mailspring from the chroot
<notgne2>
tyrion-mx: pnpm2nix should be a lot easier, as you can just point it to your PNPM lock, and it will handle all the building of native dependencies without any commands (except the ones that require external sources, but those are rare)
<tyrion-mx>
Or, maybe, now that I managed to compile it from source and debug what was wrong, I could try to package the binary directly
siiky has joined #nixos
<tyrion-mx>
notgne2: ok thanks for the info, I will try to look into that
<notgne2>
if there are any dependencies that require on external sources/binaries it's not too hard to fix it either, for example in the case of puppeteer I essentially just had to write a hook to run `ln -s ${pkgs.google-chrome} $out/.local-chromium/linux-637110/chrome-linux` (note: pseudocode, might not work)
cyraxjoe has quit [Quit: I'm out!]
<{^_^}>
[nix] @alexfmpe opened pull request #3094 → Move 'builtins.splitVersion' to position respecting alphabetical order → https://git.io/JeO9G
m15k has quit [Ping timeout: 260 seconds]
wfranzini has quit [Remote host closed the connection]
evanjs- has joined #nixos
evanjs- has quit [Client Quit]
gagbo has quit [Ping timeout: 245 seconds]
gagbo has joined #nixos
<mkla>
In a nixos module I am given an internet address with prefix length (192.168.12.142/24). What's a decent way to get the network address (192.168.1.0) for use in firewall rules?
<infinisil>
mkla: With this you can get what you want with `(parseSubnet "192.168.12.142/24").baseIp`
<tyrion-mx>
I need to make a wrapper called myprogram, that runs myprogram.bin with some env vars set. Is it difficult?
<tyrion-mx>
(inside mkDerivation buildCommand)
<infinisil>
tyrion-mx: makeWrapper can do that, add it to nativeBuildInputs, then `makeWrapper ${myprogram.bin}/bin/myprogram $out/bin/myprogram --set FOO foovalue`
<tyrion-mx>
thanks!
<infinisil>
mkla: Or `prettyIp (parseSubnet "192.168.12.142/24").baseIp`
<turtlerabbit>
Wow. Big surprise. There must be some kind of leak. My package, called with pkgsi686Linux.callPackage should not be able to find any 32 bit libraries, but still I get https://pastebin.com/ny7KtV9u How can that be possible?
<tyrion-mx>
infinisil: wait, I still have a doubt. Let's say this is my buildCommand: `${pkgs.dpkg}/bin/dpkg-deb -x $src unpacked && mv unpacked/usr/* $out/`. Now before moving stuff to $out, I would like to make sure that `unpacked/usr/share/path/myscript.bin` gets called with LD_LIBRARY_PATH=/usr/share/path:$LD_LIBRARY_PATH ... but I don't know the runtime value of $LD_LIBRARY_PATH at this moment
<infinisil>
turtlerabbit: Did you use stdenv?
<{^_^}>
[nixpkgs] @ivan opened pull request #68991 → chromium: add patch to fix performance regression with fonts → https://git.io/JeO9w
<{^_^}>
[nixpkgs] @c00w closed pull request #68810 → go: Update version to 1.13 → https://git.io/JeO9r
<turtlerabbit>
infinisil: My derivation is based on stdenv.mkDerivation
<infinisil>
turtlerabbit: Yeah you should use stdenv_32bit instead :)
Synthetica has quit [Quit: Connection closed for inactivity]
<infinisil>
AH wait
* infinisil
checks
<{^_^}>
[nixpkgs] @alyssais opened pull request #68992 → tarsnap: fix license to mark as unfree → https://git.io/JeO9o
evanjs- has joined #nixos
<infinisil>
I'd expect pkgsi686Linux.callPackage to do that
<tyrion-mx>
does makeWrapper work with "dynamic" vars? Or maybe I just need to write a simple wrapperscript manually, maybe it is easier
<{^_^}>
[nixpkgs] @worldofpeace pushed 5 commits to gnome-3.34: https://git.io/JeO96
<infinisil>
turtlerabbit: Yeah never mind, I'd think what you did should work
<qyliss>
tyrion-mx: you should write a script manually for that
<infinisil>
tyrion-mx: You can just escape the $
<tyrion-mx>
infinisil: you mean with makeWrapper?
<turtlerabbit>
infinisil: You're on to something. It's mentioned in all-packages.nix
<infinisil>
tyrion-mx: I think, not 100% sure though
<infinisil>
turtlerabbit: I think it might just be the package not supporting 32bit
<infinisil>
Or something along those lines
<infinisil>
tyrion-mx: Actually I think makeWrapper escapes on its own, so --set FOO "\$var" becomes literally `export FOO="\$var"`, so that won't work
<turtlerabbit>
infinisil: It's used for e.g. pipelight
<tyrion-mx>
infinisil: yes I just tried, this happens: LD_LIBRARY_PATH='/usr/share/mailspring/resources/app.asar.unpacked:$LD_LIBRARY_PATH'
<infinisil>
tyrion-mx: What you can instead do is to use `--run "export ..."` with it
<infinisil>
--run runs commands before the binary is started
mbrgm_ has joined #nixos
turtlerabbit has quit [Remote host closed the connection]