o1lo01ol1o has quit [Remote host closed the connection]
<samueldr>
as prophecised
u0_a121 has quit [Read error: Connection reset by peer]
<infinisil>
Yup
karetsu has quit [Quit: WeeChat 2.6]
gustavderdrache has joined #nixos
kloenk has joined #nixos
mniip_ is now known as mniip
jb55 has joined #nixos
<cole-h>
Is it possible to transform a store path into something that can be string-interpolated? I want to access fontconfig/etc/fonts/fonts.conf, but ${pkgs.fontconfig} gives me -bin which doesn't have the etc path in it.
<infinisil>
> pkgs.fontconfig.outputs
<{^_^}>
[ "bin" "dev" "lib" "out" ]
<infinisil>
cole-h: Different outputs can be accessed with `pkgs.fontconfig.out` and such
<cole-h>
infinisil++: .out does it. Thanks. I'm learning many new things :)
<{^_^}>
infinisil's karma got increased to 208
<infinisil>
The default output is the leftmost one
<infinisil>
:)
worldofpeace has joined #nixos
<worldofpeace>
infinisil: the branch off is happening in America New York time this year :D
<GrimSleepless>
Hey guys! This is my first time on NixOS. I am still learning a lot. I was wondering if anybody could help me figure out how to add `Defaults env_reset,pwfeedback` to my /etc/sudoer using my configuration.nix?
<cole-h>
GrimSleepless: From looking at the NixOS options, I would think `security.sudo.extraConfig` might be what you want?
<cole-h>
"Extra configuration text appended to sudoers"
<GrimSleepless>
cole-h: ah yes~ that could be it
turona has joined #nixos
<GrimSleepless>
cole-h: thank you! NixOS keeps on impressing me! :)
kloenk has quit [Ping timeout: 272 seconds]
<worldofpeace>
GrimSleepless: https://nixos.org/nixos/options.html# is your best friend for things for configuration.nix. also man configuration.nix or the options section in your local nixos manual
<GrimSleepless>
worldofpeace: Thank you! This is the type of documentation I was looking for!
<infinisil>
I'm surprised by how many people don't know where to find option listings, maybe it's not advertised as well as it should be
<GrimSleepless>
worldofpeace: wow, that man is really handy! Thank you for the information!
iyzsong has joined #nixos
mexisme has joined #nixos
<{^_^}>
[nixpkgs] @rnhmjoj opened pull request #79671 → spleen: install otf font → https://git.io/Jvc07
<GrimSleepless>
infinisil: I believe this should in the manual as useful links with the nixpkgs search page
<GrimSleepless>
infinisil: I believe this should be ***
<worldofpeace>
infinisil: yeah, once we have the new pretty docs the search result would be better. but https://nixos.org/nixos/about.html needs a facelift
<worldofpeace>
wait scratch that
<worldofpeace>
it needs a facial transplant
<infinisil>
Hehe
<cole-h>
infinisil: It was so hard for me to consecutively find it, I bookmarked it :P
<infinisil>
I always rely on my browser history to remember it when searching
<cole-h>
And I'm not on NixOS (yet) so I can't `man 5 configuration.nix`
<{^_^}>
[nixpkgs] @cdepillabout pushed 2 commits to haskell-updates: https://git.io/Jvc05
<infinisil>
It is possible to open the man page even not on nixos
<infinisil>
With um, some command, hold on
kloenk has joined #nixos
<infinisil>
,unstable-man cole-h
<{^_^}>
cole-h: man "$(nix-build -I nixpkgs=channel:nixos-unstable --no-out-link '<nixpkgs/nixos>' -A config.system.build.manual.manpages)/share/man/man5/configuration.nix.5"
<infinisil>
This also work on non-NixOS, also for stable or any other channel
<cole-h>
`file 'nixos-config' was not found in the Nix search path` when running that :(
<infinisil>
,unstable-man = man "$(nix-build -I nixpkgs=channel:nixos-unstable --no-out-link '<nixpkgs/nixos>' --arg configuration {} -A config.system.build.manual.manpages)/share/man/man5/configuration.nix.5"
<{^_^}>
unstable-man redefined, was defined as man "$(nix-build -I nixpkgs=channel:nixos-unstable --no-out-link '<nixpkgs/nixos>' -A config.system.build.manual.manpages)/share/man/man5/configuration.nix.5"
<infinisil>
cole-h: Try this ^
acarrico has joined #nixos
<cole-h>
:D
<infinisil>
worldofpeace: Sure is a busy place!
<cole-h>
infinisil+++++++++++
<cole-h>
RIP
<infinisil>
(only works with ++ :))
<cole-h>
(infinisil++)++
<worldofpeace>
infinisil: it doesn't sleep
<cole-h>
:P
<infinisil>
Damnit!
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<infinisil>
Hm weird, (infinisil++)++ should've worked
<heath>
is "miso" brought into the namespace for the let in block?
<infinisil>
heath: I don't get what you're asking
<heath>
infinisil: i'm wondering if the first 3 lines of the default.nix file linked is how miso is introduced into the project. the only other signficant file is a cabal file with a dependency for miso
KeiraT has quit [Remote host closed the connection]
<infinisil>
Which is a pkgs whose haskell packages have the miso dependency
KeiraT has joined #nixos
<infinisil>
callCabal2nix takes the cabal file and looks up the dependencies in the haskell packages
<infinisil>
So ultimately the dependency comes from the .cabal file, but to make it work the dependency must also be present in the haskell package set
shafox has quit [Ping timeout: 268 seconds]
<heath>
that makes sense. though, i am confused about evaluation
<infinisil>
heath: What specifically?
<{^_^}>
[nixpkgs] @peti pushed to haskell-updates « hackage-packages.nix: automatic Haskell package set update »: https://git.io/JvcEx
shafox has joined #nixos
<heath>
sorry, dmj` was nice enough to respond to my inquiry just now and i gave him a spoonful of noob
malSet has quit [Quit: Quit.]
<heath>
infinisil: I think I get it though. what the derivation in miso returns is what is in the scope in the set below the with statement
<maurer>
So, evidently at some point in my last several upgrades, I lost video acceleration (only noticed because I just now tried to do something that requires it)
h0m1 has joined #nixos
<maurer>
/var/log/X.0.log has no errors, and shows it loading the appropriate driver
<maurer>
glxinfo just gives Error: couldn't find RGB GLX visual or fbconfig
<maurer>
Any ideas?
jluttine has quit [Ping timeout: 260 seconds]
jluttine has joined #nixos
mexisme_ has joined #nixos
<maurer>
it is an nvidia card if tha thelps
mexisme has quit [Ping timeout: 240 seconds]
<maurer>
Nevermind, I had a user-installed glxinfo from nixpkgs instead of nixos
<cole-h>
The grahamcofborg bot is magical. It's so cool how it can decide to do certain CI actions based on what files were modified, which tests need to be run, etc.
drojas has quit [Remote host closed the connection]
<infinisil>
cole-h: Well it doesn't do *that* much. There's a set of checks that are always run, and if the PR starts with <valid attribute> then it also does a check for building that attribute
<cole-h>
"Any sufficiently advanced technology is indistinguishable from magic."
<gchristensen>
labels, maintainer pigns
<cole-h>
Without digging into the internals, it's still magical to me :^)
<infinisil>
Ahh yeah, I was only thinking of checks
<gchristensen>
a few other things I think but I don't remember
<{^_^}>
[nixpkgs] @thefloweringash opened pull request #79684 → memcached: fix darwin build → https://git.io/JvcgB
waleee-cl has quit [Quit: Connection closed for inactivity]
Chiliparrot has joined #nixos
<cole-h>
Also, I tried running `nix path-info -S` for my PR but it either complains that it cannot autocall f-f-e because it has an argument without a default value and running it from nixpkgs root gives that warning about it being a pseudo-package and all
<cole-h>
Is there something else I should have tried?
<cole-h>
Or could it be due to me being on an expatriate system and not NixOS?
<infinisil>
cole-h: `nix-build -A foo`, then `nix path-info -hS $(realpath result)
<infinisil>
Needs to be called on a store path
<cole-h>
Ah, thanks.
cidkid1 has joined #nixos
<cole-h>
You're racking up the karma today :P
<cole-h>
infinisil++
<{^_^}>
infinisil's karma got increased to 209
cidkid1 has quit [Client Quit]
<infinisil>
Hehe
<infinisil>
Perks of being awake when most others are asleep I guess
cidkid has quit [Ping timeout: 260 seconds]
<gchristensen>
infinisil: you're 6hr ahead of me and *I'm* on my way to bed.
<infinisil>
:P
<qyliss>
I've been sleeping 05:00-13:00 recently
<infinisil>
-> #nixos-chat
felixfoertsch23 has joined #nixos
u0_a121 has quit [Ping timeout: 268 seconds]
anohigisavay has joined #nixos
<anohigisavay>
hi!
<anohigisavay>
i have just upgrade plasma to 5.17.5
<anohigisavay>
now my desktop shows an error, something like "unable to create I/O backend. klauncher reply: unknown protocol 'desktop'"
<anohigisavay>
(original text in Chinese)
<anohigisavay>
if i run `kioclient5 exec desktop:/` i get the same error message
<anohigisavay>
should be "Unable to create io-slave. klauncher said: Unknown protocol 'desktop'"
<{^_^}>
[nixpkgs] @FRidh pushed commit from @Tomahna to master « mopidy: update to python3 »: https://git.io/JvcK2
cole-h has quit [Ping timeout: 272 seconds]
<eoli3n>
pfffiou, it seems that if i'm not a dev, learning curve is hard
<eoli3n>
"It's that complicated to create a package for Nix? No it's not. " is that a kind of joke
<eoli3n>
because it made me smile
tmaekawa has joined #nixos
<dminuoso>
eoli3n: Indeed, nix is not designed for non-developers at all.
<dminuoso>
And writing custom packages requires deep understanding of how linux toolchains work, and then sometimes a lot of work because so many packages make so many blind assumptions about their host operating systems..
kloenk has quit [Ping timeout: 272 seconds]
<eoli3n>
"deep understanding of how linux toolchains work" as ?
<eoli3n>
i'm more a "scripter" that a dev, more a python guy than a C one
<eoli3n>
s/that/thna
<FRidh>
it strongly depends what kind of software you're packaging. There are helper builders for things like Python/Haskell/... packages that simplify it. But, complex packages typically require complex Nix expressions.
<__monty__>
It's still a lot easier to package for nix than other distros though. At least IME.
<eoli3n>
__monty__: not sure, archlinux's AUR are more understandable
dingenskirchen has quit [Remote host closed the connection]
dingenskirchen has joined #nixos
mallox has joined #nixos
<etu>
eoli3n: Sure, but that's not "upstream" in the same way as here :)
<__monty__>
Not ime. They're not as explicit about deps. I have to port some packages over to macOS from time to time. Figuring out what's missing is a lot easier if it's explicit.
chagra has joined #nixos
<eoli3n>
you're right etu, that's great that every packages are treat the same way on nixos
<eoli3n>
pills seems great but goes too high too fast
<eoli3n>
it needs a "simple and direct" packaging exemple
<__monty__>
I do agree that people without any dev experience would probably have a hard time packaging for nix.
<__monty__>
But then again, the hard part isn't packaging stuff. It's fixing packages that no longer work. And that requires more understanding. So there's not a huge motivation to make packaging easier.
<__monty__>
eoli3n: The community is very helpful though. If you persevere you can learn all you need from this channel.
<etu>
__monty__: Yeah, I watched some Guix presentations on FOSDEM on Guix. Their tooling seems to be really impressive.
<{^_^}>
[nix] @curiousleo opened pull request #3351 → Implement std::error::Error and document error variants → https://git.io/JvcKx
<eoli3n>
I will, but i need a start and pills seems pretty hard, lets continue to read but i think there is a problem when you read something that want you to understand things, but you need to pass one much, expecting to understand later
<eoli3n>
i clic next pills without full understanding on 3 last one
gxt has quit [Remote host closed the connection]
<eoli3n>
s/last/previous
<colemickens>
etu: was it the "unifying proivisioning, deployment, and package management"? I might watch it now
dingenskirchen has quit [Quit: dingenskirchen]
dingenskirchen has joined #nixos
gxt has joined #nixos
<__monty__>
eoli3n: Maybe just read some package expressions. Gnu hello is the classic example, start there, read the expression, try to understand everything in there. Try to write it from scratch without cheating.
<etu>
colemickens: Yes, exactly that one :)
cartwright has quit [Remote host closed the connection]
<etu>
colemickens: We had a gathering of NixOs people in the back :p
o1lo01ol1o has joined #nixos
<eoli3n>
ok __monty__ thx
Chiliparrot has joined #nixos
cartwright has joined #nixos
smatting has joined #nixos
is_null has quit [Ping timeout: 246 seconds]
Naptra has joined #nixos
o1lo01ol1o has quit [Ping timeout: 240 seconds]
<dminuoso>
__monty__: I dont agree with your opinion that packaging for nix is easier. For packages that are already very portably written it might hold true, but for packages that don't, you get into a world of pain.
<dminuoso>
most of which is not even nix related, but just trying to fix badly written packages to not have implicit assumptions about shared libraries for instance
mexisme_ has quit [Ping timeout: 240 seconds]
<__monty__>
dminuoso: Note that I'm talking from the perspective of someone who starts from existing packages and ports them.
<__monty__>
Yes, of course starting from scratch is harder when you have more to do.
<dminuoso>
__monty__: Sure, but if your opinion is that it's easier, then you've just had simple packages to port.
<eoli3n>
like that, it seems just download tar.gz then describe projects
hyper_ch2 has joined #nixos
<dminuoso>
eoli3n: This just produces a derivation.
<eoli3n>
lets read pill about derivation again
<LnL>
yaeh, the nix pills describe what the standard environment does
<Aleksejs>
hello, I tried to install anydesk via nix-shell and got an error: cannot download anydesk-4.0.1-amd64.tar.gz from any mirror
is_null__ has joined #nixos
<LnL>
but in short, by default it runs ./configure && make install
is_null_1 has joined #nixos
<dminuoso>
eoli3n: The subtle detail Im trying to get here, is that the nix expression stdenv.mkDerivation merely evaluates to a derivation - the actual building happens at a different point in time.
<dminuoso>
eoli3n: A derivation could be thought of as some intermediate representation of "what to do". It's nix-store that actually takes this derivation and compiles things.
<eoli3n>
ok thx
is_null has quit [Ping timeout: 265 seconds]
is_null_ has quit [Ping timeout: 272 seconds]
<dminuoso>
(To be even more exact, stdenv.mkDerivation applied to some argument produces not even a derivation, but rather another nix-expression. nix-instantiate is what produces the .drv derivation, which nix-store can take and produce output paths.
waleee-cl has joined #nixos
hyper_ch2 has quit [Remote host closed the connection]
<Maxdamantus>
If I run `nix-build -o netcat-openbsd '<nixpkgs>' -A netcat-openbsd`, it seems to make a symlink "netcat-openbsd-nc" (that's not what I passed to "-o") which points to something called "libressl-3.0.2-nc" .. how am I meant to normally install that package, because `nix-env -iA nixpkgs.netcat-openbsd` just installs "libressl-3.0.2", without `nc` and `nix-env -i ./netcat-openbsd-nc` replaces the usual
<Maxdamantus>
"libressl-3.0.2" with "libressl-3.0.2-nc".
kaliumxyz has quit [Remote host closed the connection]
vic5 has quit [Remote host closed the connection]
packer has joined #nixos
<Aleksejs>
I've added the unstable channel to channels list and I'm trying to install anydesk, which is 5.5.1 in unstable but it only sees 4.0.1. What am I doing wrong?
chloekek has joined #nixos
<Aleksejs>
I tried nix-env -qaP | grep anydesk and I see only 4.0.1
<LnL>
yeah that only adds the new channel to the list
<LnL>
running --update will fetch it
<Aleksejs>
I had typo in that url
<Aleksejs>
now I see it, thanks :)
is_null_1 has quit [Remote host closed the connection]
kloenk has quit [Read error: Connection reset by peer]
kloenk has joined #nixos
kloenk has quit [Ping timeout: 272 seconds]
<MoreTea>
In which package are the man pages for the system calls / glibc stored?
<MoreTea>
`nix-shell -p glibcInfo -p man-pages -p manpages -p posix_man_pages -p stdmanpages -p man -p less --pure --command "man read"` => "No manual entry for read"
kloenk has joined #nixos
<__monty__>
man 1 read or man 2 read?
<MoreTea>
neither works __monty__
cjpbirkbeck has joined #nixos
<__monty__>
man 1 read should come with a shell I think, it's usually a shell built-in.
<chagra>
what is the consensus on what to do if I want to replace all mentions of /usr/local in package files to the nix store path?
<__monty__>
I'm not sure where the documentation for the function would be.
<MoreTea>
Ah, i'm not interested in the built-in shell function 'read', but in functions in glibc.
o1lo01ol1o has joined #nixos
is_null has joined #nixos
is_null__ has quit [Ping timeout: 260 seconds]
<sphalerite>
Maxdamantus: it's kind of awful
<sphalerite>
there was a factoid about it iirc…
is_null has quit [Ping timeout: 268 seconds]
<sphalerite>
,imperative
<{^_^}>
nix-env has multiple drawbacks as an imperative package manager. nix-env -u will sometimes upgrade to the wrong thing; the outputs to install are very finicky to override; and packages that have been removed or are otherwise unavailable will remain in your profile without any warnings. Consider using a ,declarative setup instead.
<sphalerite>
,declarative
<{^_^}>
There are multiple ways of managing declarative profiles. 1) Attrset, compatible with imperative use of nix-env https://git.io/fAQHW ; 2) buildEnv, providing more control over the paths that are linked into the profile https://git.io/fp0aU ; 3) home-manager, providing nixos-like config for your ~ https://github.com/rycee/home-manager
<chagra>
how can you reference the nix store path of the package you're building? I'm trying to patch hardcoded paths by paths to nix store of the package i'm building
sigmundv has joined #nixos
<sphalerite>
chagra: $out
<chagra>
oh... that makes sense, I always thought $out is a temp directory and then nix moves its contents to the store path
<chagra>
I guess that makes sense
<chagra>
is patching hardcoded paths with substituteInPlace recommended or not?
<chagra>
is there a convention for patching hardcoded paths?
<sphalerite>
chagra: substituteInPlace is quite a common approach, and I wouldn't say there's anything wrong with it :)
<chagra>
sphalerite: thanks a lot!
fre has joined #nixos
nikola_i has joined #nixos
<colemickens>
etu: the yocto/guix talk is suuuper cool too
<CRTified>
Hi, is there a way to add something to ExecStartPre? I want to run a script before starting a docker-container, but as it uses ExecStartPre instead of preStart, the two values (default and my custom one) are not composed.
<colemickens>
definitely shows off tooling power
Czen1 is now known as Czen
<colemickens>
also, virtual service types?
<colemickens>
and it looks like maybe all services are written to be mutli-instantiable?
<{^_^}>
[nixpkgs] @tfc opened pull request #79696 → nixosTests.ec2: Port tests that depend on common/ec2.nix → https://git.io/JvcPh
u0_a121 has joined #nixos
page has quit [Ping timeout: 248 seconds]
tilcreator has joined #nixos
u0_a121 has quit [Read error: Connection reset by peer]
<magnetophon>
I have an Imac that needs to run "xrandr -d :0 --output eDP --crtc 1 --brightness 0.8" as a user in order to have a visible screen. what's the earliest hook I could run it under?
<{^_^}>
[nixpkgs] @FRidh pushed commit from @r-ryantm to master « jgmenu: 4.0 -> 4.0.2 »: https://git.io/Jvc1y
<inf>
disregard the error message, wrong paste - that is what I'm getting with that default.nix: https://paste.q3k.org/paste/th9FmI+g#wHj4eZLxytUYP5Q1B+iuqy3YbRE5vvkSQiW32mxVe0w (copied off wrong window, wrong SDK path)
<evanjs>
clever: alright, final problem for me (again) with the intram stuffs. I need to pass something from default.nix to nixos.nix (re mini system stuffs), but not sure how I'm supposed to do that with inherit and etc.
<{^_^}>
[nixpkgs] @bjornfor pushed commit from @r-ryantm to master « sdcc: 3.9.0 -> 4.0.0 »: https://git.io/JvcyJ
waleee-cl has quit [Quit: Connection closed for inactivity]
<evanjs>
don't worry, this is for deployment, not for development :P No way I'm building initramfs into the kernel for every dev change I make
<evanjs>
to phrase the question in a more generic way that others might be able to answer: Is there a way to pass arguments to something I'm inheriting?
<{^_^}>
[nix] @matthiasbeyer closed pull request #958 → Throw SysError if the buildHook file does not exist → https://git.io/vKJye
<Fzer0>
Hello everyone, I want to start learning how to use ZFS and want to know if there is a good guide on how to set it up using the minimal install iso. I read the Nixos wiki on ZFS and i am afraid I am a little too green to completely understand it. Any good videos or tutorials I should read first?
<Fzer0>
evanjs: My question is do I want to use zfs on the root and boot? I really only care about having snap shots for my data in /home. Or, should I just do everything except for EFI?
<evanjs>
Like I've used it before but ended up switching to BTRFS and now F2Fs with LVM.
jmeredith has joined #nixos
dingenskirchen has quit [Read error: Connection reset by peer]
lordcirth has quit [Read error: Connection reset by peer]
dingenskirchen1 has joined #nixos
lordcirth has joined #nixos
<buckley310>
i use root on zfs
<buckley310>
it works well for me
dingenskirchen1 is now known as dingenskirchen
<buckley310>
since i use EFI, i boot off fat32 though
cfricke has joined #nixos
<blackriversoftwa>
Hello all, I'm trying to build nixos from the `unstable` channel. Currently my system is nixos-19.09. I built a derivation from my git checkout of nixpkgs by calling `(nixos /etc/nixos/configuration.nix).toplevel` and it built fine, but running `sudo result/bin/switch-to-configuration switch` doesn't create a new profile entry or a new entry in the bootloader.
<buckley310>
use `nixos-rebuild switch -I nixpkgs=/path/to/nixpkgs`
<blackriversoftwa>
Does nixos-rebuild do stuff that `switch-to-configuration` doesn't?
<Fzer0>
buckley310: do you have a guide you used other than the wiki, or do you have a lot of experience with ZFS?
ddellacosta has joined #nixos
<Fzer0>
buckley310: this is just for a personal laptop
<buckley310>
blackriversoftwa, im not sure.
<blackriversoftwa>
right that is the question i'm trying to get answered
<blackriversoftwa>
I know how to get nixos-rebuild to do what I want
<blackriversoftwa>
but I'm trying to make completely deterministic configurations for my machines in git, so I want to be able to build and activate configurations from a pinned nixpkgs, and not use the nix path resolution stuff at all
<buckley310>
FZer0, ive been using zfs for my desktop and laptop for about 6 months. i only have some sketchy notes on the subject xD
<gchristensen>
specifically layout considerations and dataset properties
<Fzer0>
Buckely310: and in my case only setup snapshots for home
<buckley310>
yeah, so just create a dataset for /home/ and enable auto snapshots
<buckley310>
have to go for a half-hour. ill be back
<Fzer0>
gchristensen: I did read it but it (and plan to follow it) but I just want to get an idea for how people use it in practice. I have heard of somepeople setting up datasets for docker, among other setups
u0_a121 has quit [Read error: Connection reset by peer]
<Fzer0>
gchristensen: I am just going to set it up exactly like the wiki guide. this is be fine for my use. Thank you!
kloenk has joined #nixos
<Rovanion>
I have a list of packages that I want to be installed through Nix on all linux systems I use. Where would I put such a file and what should it look like?
alexherbo29 has joined #nixos
<simpson>
Rovanion: environment.systemPackages, likely, would be the ultimate destination. A common pattern is to arrange a Nix expression that contains a NixOS module with the desired packages, and to drop it in /etc/nixos and import it from /etc/nixos/configuration.nix
<simpson>
,systemPackages
drewr has quit [Ping timeout: 245 seconds]
<buckley310>
FZer0, back early... so yeah, it looks like all of the stuff in my notes are mentioned on the wiki page. just make sure you use ashift=12 or higher.
<simpson>
...Really? Where *are* all the help tips?
<Rovanion>
simpson: Will this work on non NixOS Linux's?
alexherbo2 has quit [Ping timeout: 272 seconds]
alexherbo29 is now known as alexherbo2
<simpson>
Rovanion: Oh! Your desire is impossible; there is no canonical nomenclature for packages. This wouldn't be possible even between Fedora and Debian, say.
<Rovanion>
simpson: I'm being unclear I think. I have Nix installed on both Debian and CentOS, on both I want a number of packages installed through Nix, not the system's package manager.
u0_a121 has joined #nixos
<Rovanion>
Or am I misunderstanding your answer, perhaps.
delli3 has joined #nixos
<simpson>
Rovanion: Oh, I see. I misunderstood. Nix doesn't really have installation in that way. If you're thinking of nix-env, then there's no substitute for invoking nix-env; perhaps you want to put your package names in a plain text file and $(<packages.txt xargs nix-env -iA) or something similar. (As usual, I haven't tested that shell snippet.)
gustavderdrache has joined #nixos
<{^_^}>
[nixpkgs] @Ma27 opened pull request #79736 → nixos-container: minor fixes → https://git.io/JvcS5
<Rovanion>
simpson: I'll try that route.
ddellacosta has quit [Ping timeout: 265 seconds]
<simpson>
Rovanion: Oh, wait, sorry, I'm being silly. You can build the environment declaratively, by using build
<simpson>
*buildEnv inside a single Nix expression, and shipping around that .nix file. You could then install the entire environment at once. This would enable nix-copy-closure or similar, if you wanted to build once and copy many times.
johnny101 has quit [Quit: Konversation terminated!]
<blackriversoftwa>
note for anyone also confused by this and hunting for the chat log: switch-to-configuration needs to be called from a profile under /nix/var/nix/profiles/system-profiles in order to know where to set up boot menu entries. Otherwise it will just silently forget to set up a boot entry
<blackriversoftwa>
buckley310 I figured it out by reading nixos-rebuild since it's just a shell script
dooms_ is now known as dooms
vandenoever has quit [Ping timeout: 265 seconds]
captn3m0 has quit [Ping timeout: 260 seconds]
cfricke has quit [Ping timeout: 272 seconds]
<{^_^}>
[nixpkgs] @clkamp opened pull request #79737 → cvsq: init at 1.10 → https://git.io/Jvc9Y
<simpson>
Rovanion: That discussion looks very relevant, yes.
<Rovanion>
Thank you!
<linarcx>
Guys, how can i pass envs in default.nix. Imagin i have a c++ project with cmake and i want to set CMAKE_CXX_COMPILER, when i enter via nix-shell. How do that?
<infinisil>
wild_buffalo: What's the output of `nix-info`?
<linarcx>
srk: It kinda works actually. Still cmake don't know where is the actuall location of gcc. I changed previous line to: `export CMAKE_C_COMPILER='which gcc'`. I don't know is it a correct punctuation or not though.
<infinisil>
See this link for how to install a single package from unstable ^
<habbah>
is it possible to start a nix shell with multiple attributes from the command line? "nix-shell '<nixpkgs>' -A emacs" puts me into a shell. "nix-shell '<nixpkgs>' -A emacs -A vim" returns an error: nix-shell requires a single derivation
<infinisil>
habbah: You want a shell in which you can build both emacs and vim?
<habbah>
in which both are available to me, yes
<infinisil>
Or do you want a shell where you can call emacs and vim?
<habbah>
that
<wild_buffalo>
infinisil: do I need to set unfree separately for each channel/
<evanjs>
What's the easiest way to use something like initrd.availableKernelModules with makeInitrd?
<evanjs>
Trying to specify the modules to include with makeInitrd
<infinisil>
karantan: postInstall is only for building derivations, it can't be used for anything with NixOS. Depending on your needs there's different ways to achieve that though, can you give some more info?
c0c0 has quit [Quit: WeeChat 2.6]
<{^_^}>
[nixpkgs] @vcunat pushed to master « nixpkgs manual: fix a typo in cross-compilation »: https://git.io/JvcQh
<CRTified>
karantan, maybe you are looking for system.activationScripts?
linarcx has joined #nixos
<infinisil>
activationScripts would be a way to do it, but it's often not the right thing to use
<karantan>
@CRTified aha yeah that might be it.
timor has quit [Quit: Leaving]
<infinisil>
karantan: I'd recommend using a systemd service to do this task. If you have a service that needs the password, you can make it run after the one that sets the password
<{^_^}>
[nixpkgs] @vcunat pushed to release-19.09 « nixpkgs manual: fix a typo in cross-compilation »: https://git.io/Jvc7q
is_null_ has quit [Remote host closed the connection]
is_null has quit [Remote host closed the connection]
bukkitgerman8 has quit [Quit: Ping timeout (120 seconds)]
<CRTified>
infinisil, but that should be accessed with systemd.services.mysql.preStart, correct? elsewise it won't compose with the already existing value
<infinisil>
CRTified: I mean the preStart of the service that needs the password (if there is one)
<evanjs>
do I need to call bootStage1 if I want to add modules to initrd via makeInitrd?
<evanjs>
* call ./stage-1-init.sh
<infinisil>
And if there isn't one, it can be a oneshot systemd service ran for multi-user.target
pmyjavec has joined #nixos
<infinisil>
activationScripts should be as minimal and atomic as possible, and using them for anything that can be solved any other way should be discouraged
<pmyjavec>
hey all, is there any helpers to setup a build environment in a more traditional way? For example set LDFLAGS and CPPFLAGS for me? Right now I wanto be able to comple things like like normal in a nix-shell; However, everything fails because LDFLAGS and CPPFLAGS isn't set properly.
<evanjs>
pmyjavec: often times, nix expressions will patch such things, and autoPatchelfHook is also extremely useful, but if you need to, there are several examples of llvm or etc being imported in that way I think
realrokka has joined #nixos
<pmyjavec>
evanjs this is for packaging stuff though right?
<evanjs>
pmyjavec: you should still be able to set e.g. CFLAGS and etc through shell.nix IIRC
<pmyjavec>
evanjs sorry what is shell.nix? somethin I can import?
<chagra>
pmyjavec: all nix does really is put packages in /nix/store in a reproducible and immutable way. This simple functionallity allows for many usecases. NixOS is one for managing a system, home-manager is another for dotfiles, nix-shell is a use case for making container like environments
<c0c0>
i'm new to nixos. scripts with a #!/bin/bash complain with "/bin/bash: bad interpreter: No such file or directory". what's the nixos way to resolve this, e.g. to symlink /bin/bash to /bin/sh?
<cransom>
#!/usr/bin/env bash
<cole-h>
^ You should use /usr/bin/env in scripts whenever possible
<shafox>
I am trying to add allowBroken = true however the nix-env install command doesnt seem to agree with it. Am I doing something differently ? The error is attched in the above gist.
<infinisil>
shafox: You added allowBroken as `{ packageOverrides = super: { allowBroken = true; }; }`, but the error message says you need to do `{ allowBroken = true; }`, aka on the top level of config.nix
<{^_^}>
[nixpkgs] @mmilata opened pull request #79747 → nixos: fix bunch of mangled usernames → https://git.io/Jvcdc
<shafox>
infinisil, Thanks. :)
dingenskirchen has quit [Remote host closed the connection]
<{^_^}>
[nixpkgs] @FRidh pushed commit from @r-ryantm to master « pcl: 1.9.1 -> 1.10.0 »: https://git.io/Jvcdi
<hodapp>
might anyone have a clue how to get GStreamer elements for decoding H264? I've been trying gst-plugins-ugly/bad/base/good, gst_all_1.gst-libav, libav, openh264, x264... and none of these are getting me to something like the 'avdec_h264' element, nor anything else relevant in gst-inspect
<{^_^}>
[nixpkgs] @FRidh merged pull request #78611 → Allow cupy to find the thrust library → https://git.io/JvmVr
<{^_^}>
[nixpkgs] @FRidh pushed commit from @cstich to master « This allows cupy to find the thrust library which is needed among other things for cupy.argsort »: https://git.io/JvcFO
<Izorkin>
Not worked nixops deploy. Error - bash: symbol lookup error: /nix/store/y9zg6ryffgc5c9y67fcmfdkyyiivjzpj-glibc-2.27/lib/libpthread.so.0: undefined symbol: __libc_vfork, version GLIBC_PRIVATE. How to fix?
<{^_^}>
[nixpkgs] @FRidh pushed commit from @JohnAZoidberg to master « hpmyroom: 11.1.0.0508 -> 12.0.0.0220 »: https://git.io/JvcAQ
<aminechikhaoui>
is there a nice way to figure out why a derivation A is needed by a drv B, `nix why-depends drv-A.drv drv-B.drv` seems to try to build stuff and I don't want to wait for the build tho'
alexherbo2 has quit [Ping timeout: 240 seconds]
alexherbo23 is now known as alexherbo2
chvp has joined #nixos
<chvp>
,locate Xcomose
<{^_^}>
Couldn't find in any packages
<{^_^}>
[nixpkgs] @FRidh pushed commit from @McSinyx to master « alure2: unstable-2020-01-09 -> unstable-2020-02-06 »: https://git.io/JvcA5
<{^_^}>
[nixpkgs] @FRidh pushed commit from @babariviere to master « insomnia: 7.0.5 -> 7.0.6 »: https://git.io/JvcxN
cosimone has joined #nixos
<srhb>
gordon: I don't remember the exact incantation, but you'll want to use some action from it coupled with --profile /path/to/profile --switch-generation somegeneration
Chiliparrot has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<srhb>
gordon: (in which case --list-generations might be helpful)
<srhb>
gordon: Depending on what you actually need, rollback might be simpler and less prone to accidents.
<{^_^}>
[nixpkgs] @FRidh pushed commit from @magnetophon to master « faust: 2.5.23 -> 2.20.2 »: https://git.io/Jvcpe
Guest97 has joined #nixos
<srhb>
gordon: Sure thing. The man page for that tool is quite exhaustive.
<gordon>
i wasn’t sure where to search
<srhb>
Understandable :)
<Guest97>
how do I change pki.certificateFiles before nixos-install?
<Guest97>
Is it enough to change it at the configuration.nix?
<srhb>
gordon: It's kind of surprising to most people that nix-env is also the tool for managing generations and profiles, so it's good to keep in mind.
<srhb>
Guest97: I doubt it. Do you need it to build the actual system?
<Guest97>
Yep.
<Guest97>
Corporate.
<Guest97>
So there's fortigate intercepting everything.
<srhb>
Guest97: You'll probably have to do some trickery to manipulate the cert path beforehand, or maybe there's some env var to fool libcurl into accepting whatever as your pki.
<{^_^}>
[nixpkgs] @worldofpeace pushed to master « 20.09 is Nightingale »: https://git.io/JvcpY
bvdw has quit [Read error: Connection reset by peer]
<Guest97>
hm ... as in NIX_SSL whatever.
<srhb>
Guest97: Likely the first option is easier without knowing exactly what switches are available.
<Guest97>
yeah?
<srhb>
Guest97: I believe it'll respect whatever is in /etc/ssl/certs
<srhb>
So, usually that's a symlink to a store path
bvdw has joined #nixos
<srhb>
You could temporarily manipulate that imperatively
<Guest97>
Good!
<Guest97>
hehe
<srhb>
Then have the rebuild restore it with the correct, new setting.
<srhb>
Worth a try at least.
<Guest97>
Very good. xd
<Guest97>
yeah.
<Guest97>
gonna do it.
<srhb>
Do report back. :)
<Guest97>
try and bring nixos to the corporate. ahu
<{^_^}>
[nixpkgs] @FRidh pushed commit from @rvolosatovs to master « gofumpt: 2019-07-29 -> 2019-11-11 »: https://git.io/JvchF
<gordon>
hm. I’m having a hard time configuring my luks-encrypted partition. My root is zfs-encrypted, but i have a partition on another hard drive that i’d like to have decrypted at boot. I don’t want to type two distinct passphrases, so i’m using `fileSystems.<name?>.encrypted`. The documentation seems minimalist on those options, and i’m not sure i’m doing good. At boot, systemd hangs trying to do
<gordon>
something to a device UUID (probably the dm-0 device that doesn’t exist yet), so i guess it doesn’t read/respect the `encrypted` options
<{^_^}>
[nixpkgs] @worldofpeace pushed 0 commits to refs/tags/20.03-beta: https://git.io/JvcjD
mexisme_ has joined #nixos
Guest31423 has joined #nixos
domogled has quit [Read error: Connection reset by peer]
<Guest31423>
I'll ask here first, but I couldn't find anything online: anyone know about Nix on macOS Catalina? When I try to build anything: I end up getting to:
<WinchellsM>
Failed to load library ( 'lib/nix/store/fmayrmiz66mpvh2cqzvvwg748zgfr8md-libGL-1.2.0/lib/libGL.so.so.0' ): lib/nix/store/fmayrmiz66mpvh2cqzvvwg748zgfr8md-libGL-1.2.0/lib/libGL.so.so.0: cannot open shared object file: No such file or directory
cosimone has quit [Ping timeout: 240 seconds]
chagra has quit [Ping timeout: 268 seconds]
<WinchellsM>
Notice the path is `lib/nix/store/*libGL.so.so`, so that `lib/` prepends it and it has two `.so.so`
chagra has joined #nixos
<evanjs>
infinisil: ah weird. Was still tab completing on my — ohhhhhhhh haha
o1lo01ol1o has joined #nixos
<evanjs>
WinchellsM: I know xpra has been through a series of being marked broken and then unbroken within the last year or so. What version of NixOS are you running? And I’m assuming this is with the xpra module?
<ekleog>
gchristensen: is the tool you once used to make flamegraphs of nixpkgs top-level eval time open-source / usable somewhere? ISTR there was a need of a patch to nix at the time, but maybe it was merged since? (cc simukis_)
<gchristensen>
look in the contrib dir of nix
<ekleog>
great, thanks! :D
cosimone_ is now known as cosimone
xa0[m] has joined #nixos
<xa0[m]>
hey all
tilcreator has quit [Ping timeout: 268 seconds]
<xa0[m]>
i've hit this two year old issue https://github.com/NixOS/nixpkgs/issues/30742 - it sounds like people found a workaround but it isn't documented anywhere, and nothing was merged
<{^_^}>
#30742 (by ljli, 2 years ago, closed): buildRustPackage: found duplicate version of package
claudiii has quit [Quit: Connection closed for inactivity]
<xa0[m]>
problem seems to be due to there being multiple versions of the same package in a Cargo.lock, and i'm not sure why nix doesn't like that but there's no obvious route to make it care less
<xa0[m]>
the thing i find strange is that the last comment on that closed issue suggests a better way of building rust packages was created, but when i look through nixpkgs they're all using this same method
Acou_Bass is now known as Piece_Maker
Piece_Maker is now known as Acou_Bass
<superbaloo>
has anyone done a nix-shell that would unshare() (new mount-namespace, pid, etc)?
<qyliss>
that's really just a container, isn't it?
<qyliss>
which you can use with the container program of your choice
jgeerds has quit [Ping timeout: 260 seconds]
gustavderdrache has left #nixos [#nixos]
mexisme has quit [Ping timeout: 268 seconds]
<superbaloo>
yeah, I used unshare, because "containers" does not mean much nowadays (or means whatever you want it to mean)
<superbaloo>
but ideally yeah, a container engine that would just use the local /nix and mount bind it into a new namespace along with the local directory. (purpose is to run tests in it, ideally as detached from the user-env as possible)
<simpson>
It would be pretty cool if there were some combination of nixos-container and nix-shell, like that. Perhaps it even already exists; it sounds like the sort of thing that somebody might have built.
<superbaloo>
yeah, that's why I ask :)
<simukis_>
xa0[m]: the issue is that there’s a reproducibility issue
<simukis_>
xa0[m]: you want to invoke rustc with some flags that help to retain it (e.g. `--remap-prefix`)
<hexa->
typetetris: any luck with your rx 5X00 on 19.09?
<xa0[m]>
simukis_: can that be done with buildRustPackage or would i have to write my own derivation?
<hexa->
typetetris: nvm, backlog says 20.03 is the way to go
<hexa->
unfortunately since switching the gpu out network won't come up and I can't switch to a tty
<superbaloo>
infinisil: it looks like you're duplicating the data from nix store into docker images
lovesegfault has quit [Quit: WeeChat 2.7]
<superbaloo>
am I reading this correctly?
<infinisil>
superbaloo: Yeah that's the case, I don't think it could work any other way with docker
<superbaloo>
that's my understanding as well
<simpson>
infinisil: Fun.
<deni>
I can't seem to find an example of importing a module from github (that's not in nixpkgs). Anyone have an example laying around?
Fzer0 has quit [Ping timeout: 272 seconds]
<deni>
I get an infinite recursion if I just to a fetchFromGithub in a let expresion before the configuration part
<superbaloo>
another dummy question: how do you lookup the output directory of a derivation? Like I built an OVMF image for Qemu bios. It is put in my PATH by nix-shell, but ... it's not really what I expect
<infinisil>
deni: You're probably using `pkgs.fetchFromGitHub`, but that doesn't work because imports can't depend on pkgs (because pkgs depends on imports, giving the inf rec)
<infinisil>
deni: You can use `import <nixpkgs> {}` instead of `pkgs` to break the recursion
<gchristensen>
infinisil: :o
<ajs124>
you can also use builtins.fetchGit, if that's what you're into (not that I would ever do such a thing)
<infinisil>
superbaloo: Doing "${the-derivation}" in a string does the trick
<{^_^}>
[nixpkgs] @veprbl opened pull request #79777 → libtasn1: fix on darwin → https://git.io/JvCUo
<infinisil>
superbaloo: But for PATH you can use lib.makeBinPath for convenience
<infinisil>
deni: Yeah so replace `pkgs` with `import <nixpkgs> {}`
<ajs124>
deni: it's not _bad_. It just allows for some very impure things. Like, you can literally fetchGit a random branch (like master) without any output hash.
<superbaloo>
infinisil: huum does not look like it
<das_j>
Andreas Schrägle you make it sound like you wouldn't do it on a regular basis 👀
<ajs124>
Janne Heß: that is a baseless accusation and you probably don't have any (public) code to prove that!
<deni>
ajs124: heh.. you and I have a very different understanding of the word bad then...given that most folks use that whole sha verification by trying to fetch with a wrong sha and then changing to whatever nix suggests.... :D (ie. not great, not terrible)
<ajs124>
It allows for that, but you can also specify a hash and stuff. Don't ask me why, I didn't design it that way.
<{^_^}>
[nixpkgs] @mkg20001 opened pull request #79780 → cinnamon.xapps: make gobject build input → https://git.io/JvCUA
kvda has quit [Ping timeout: 265 seconds]
<deni>
infinisil: you mean like this import <nixpkgs> {}.fetchFromGitHub { ... } ?
<infinisil>
deni: Put brackets around `import <nixpkgs> {}` too
<infinisil>
s/brackets/parens
kvda has joined #nixos
<deni>
infinisil: ah yes... ugh.... Nix is still soooo convoluted to me even after all this time :/
<deni>
infinisil: this seems to take care of the issue... but in the end I got the same error as when I was just using git subtree to vendor in the repo. ¯\_(ツ)_/¯ It would appear the repo has a bug in it
<deni>
thoughtpolice: it's nixos-zerotier-dns btw we're talking about here
<deni>
I get an error saying: fatal: '/nix/store/anras7d0yg3hzrbyfxbw32lrpn8n0gzp-source' does not appear to be a git repository
<deni>
I think that's because module.nix is calling callPackage ./. which calls default.nix (I assume) whitch has fetchGit in it
lsix has quit [Quit: WeeChat 2.6]
<deni>
I initially just vendored in the repo and got that error above...so figured I was doing something wrong and had to use it from github directly....but that now fails with the same error
domogled has joined #nixos
<xa0[m]>
is there a sensible way to apply a patch (or many) to <nixpkgs>?
<infinisil>
deni: What's the full error with --show-trace added to the command?
__monty__ has quit [Quit: leaving]
<infinisil>
deni: Yeah I think your fetchGit suspicion is right
<infinisil>
Hmm..
<deni>
infinisil: yeah I mean src should be just "./." I don't understand why that needs to be "fetchGit ./."
<infinisil>
deni: I guess fetchGit is used there to get rid of untracked files, though there are better ways to get that (though not as convenient ones)
erasmas has quit [Quit: leaving]
<deni>
infinisil: aha interesting! I haven't thought of that
<deni>
infinisil: so there's a fetchgit and fetchGit?
<infinisil>
deni: I'm afraid that's the case indeed
<infinisil>
builtins.fetchGit and pkgs.fetchgit
<deni>
it has a different interface it seems
mac10688 has joined #nixos
<infinisil>
builtins.fetchGit is a builtin in nix itself without much flexibility (as of now), but doing the fetching at evaluation time, which avoids IFD if you evaluate nix in the result
<infinisil>
,IFD what IFD is
<{^_^}>
what IFD is: import-from-derivation (IFD) is when you evaluate nix from a derivation result, for example `import (pkgs.writeText "n" "1 + 1")` will evaluate to 2. This is sometimes problematic because it requires evaluating some, building some, and then evaluating the build result. It has been described as "such a nice footgun."
<infinisil>
deni: pkgs.fetchgit on the other hand comes from nixpkgs, with more functionality (like leaveDotGit), but also does IFD when nix is evaluated from the result
<witchof0x20>
Trying to run `cargo build --target x86_64-pc-windows-gnu` on hello world in this nix shell: `let pkgs = import <nixpkgs> { crossSystem = (import <nixpkgs/lib>).systems.examples.mingwW64; }; in pkgs.mkShell { buildInputs = []; }`
<infinisil>
deni: (and similarly there's builtins.fetchTarball (or simply fetchTarball), and pkgs.fetchzip, having about the same relationship)
<witchof0x20>
and getting `cannot find -lpthread`
<witchof0x20>
cargo is just from rustup. I have [target.x86_64-pc-windows-gnu]
<witchof0x20>
linker = "x86_64-w64-mingw32-gcc"
<witchof0x20>
in .cargo/config
<witchof0x20>
Is there something I need to add to buildInputs?
<deni>
infinisil: thanks for laying that out! I appreciate it.
<deni>
infinisil: it seems to work with fetchgit ... or at least it starts...but if fails somewhere in the middle
<deni>
but that's more a problem of the module it would seem...than generally about nix
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<deni>
I think the line `substituteInPlace ./zt2hosts` fails... because the error is that it can't find that file
growpotkin has quit [Ping timeout: 260 seconds]
<deni>
I imagine it could have something to do with the fact that I'm using nixops instead on building on the machine that the module is deployed to. And I have a remote builder ....
fendor has joined #nixos
<infinisil>
deni: I suggest to always post the full error if you want help
<infinisil>
Will get much better help with that in general
Cale has joined #nixos
<deni>
infinisil: just the offending line like this: "substitute(): ERROR: file './zt2hosts' does not exist" or the whole output? cause there's a lot