xelxebar has quit [Remote host closed the connection]
hmpffff has quit [Ping timeout: 272 seconds]
xelxebar has joined #nixos
Pwnna has quit [Quit: Bye]
plutes has joined #nixos
<liminal18>
hey I want to take some unallocated space and allocate it my nix/store however I obviously can not unmount the nix store while using. I am assuming I need a bootdisk like system rescue? any recommendations?
nschoe has quit [Ping timeout: 250 seconds]
<liminal18>
nevermind there are plenty of tutorials thanks for the help folks
liminal18 has quit [Quit: Leaving]
<morgrimm>
Is it normal for your nix store to be absurdly big?
<morgrimm>
I barely have anything installed and it's like, 30 gigs
<morgrimm>
even after gc and optimizing
<morgrimm>
Ah, there a few steps in the wiki I haven't done to gc
<zeta_0>
bqv[m]: thanks for the help, so replacing: pkgs.callPackage ./screened.nix , with: pkgs.haskellPackages.callPackage ./screened.nix worked, but, now i'm getting this error message: https://dpaste.org/RtUt
<zeta_0>
bqv[m]: i'm researching the error now, i thought i'd show you the error right away though
pjt_014 has joined #nixos
<pbb>
morgrimm: what kind of installation is it? 30gb is indeed very big and not usual.
<pbb>
some instructions on reducing the size: run "sudo nix-collect-garbage -d", note that it's important to run it as root. another cause for a garbage collector lock is a result symlink
<zeta_0>
ok, when nix-shell attempts to build this derivation, it's using cabal 2.4 which i'm guessing should be cabal 3.0, as for the missing dependencies, i have no idea, any thoughts guys? https://dpaste.org/RtUt
<pbb>
morgrimm: you can run "nix-store --gc --print-roots" to see what is blocking garbage collection
<pbb>
or use "du -hs /nix/store/* | sort -h" to find out what output is the culprit (this might take a while)
sshow_ has quit [Ping timeout: 265 seconds]
<ottidmes>
I like ncdu for that, shows me my biggest space takers are ghc, factorio, and rust
<pjt_014>
carefull with that -d there though
nschoe has joined #nixos
<pjt_014>
can't rollback after that
<gchristensen>
and for the love of your system don't use --ignore-liveness
<pjt_014>
YES
sshow has joined #nixos
<pjt_014>
I have a picture of what can happend when you do that
<pjt_014>
the only readable text is "sleep: command not found"
<DigitalKiwi>
it me. when i tried to move my /nix to a different disk
<pjt_014>
just a friendly reminder: if you're about to do nix-collect-garbage -d while trying to fix something, consider instead doing nix-env --delete-generations +3 to keep the last 3, THEN do nix-collect-grabage without -d.
<pjt_014>
You then have the last 2 gens to rollback to.
<pjt_014>
hey when I run nix-store --gc --print-roots I noted two odd things
<pjt_014>
"--print-" has two autocomplete suggestions, neither of which are 'roots', and some of the paths read "{censored} -> /nix/store/..."
<gchristensen>
censored is when root could know what is pointed to it, but your user can't
<gchristensen>
like it appears in a process
<cole-h>
I wish `packages.json` would contain a commit field so I could click links to expressions again 🙃
<pjt_014>
the search on the site no longer has that either
kaliumxyz has joined #nixos
kleisli has quit [Remote host closed the connection]
<pjt_014>
bet you could add one with jq and some bash actually
<{^_^}>
[nixpkgs] @Ma27 pushed commit from @rycee to release-20.03 « documentation: minor spelling and stylistic fixes »: https://git.io/JvNrN
LRB has joined #nixos
<LRB>
Do any of you run nix as your daily workstation os?
<simpson>
Yes, many of us.
<LRB>
I've been putting off checking it out. Currently in the process of installing it as a kvm guest just to test things. It seems pretty intuitive
Parra has joined #nixos
pbogdan has quit [Ping timeout: 265 seconds]
<pjt_014>
I have it on five devices and four hw archiectures, that count? :D
<{^_^}>
[nixpkgs] @coderobe opened pull request #84412 → acme.sh: add bind.dnsutils to PATH → https://git.io/JvNok
<LRB>
Jesus man. That's pretty great haha. Any pitfalls a noob should look out for?
<colemickens>
pjt_014: whoa, what's the four?
<pjt_014>
x86-64, i686, aarch64, armv6l
<Parra>
Hi! I have few questions about Nix package manager, does it support generating a self contained tarball with all dependencies packaged in order to unpack it in another system and run on the first try?
pbb has quit [Ping timeout: 265 seconds]
pbb has joined #nixos
<pjt_014>
LRB: backup your config file before making changes if you think things might break
<energizer>
LRB: anything in the nix store is readable by all users, don't put secrets in there
<LRB>
I've got a cron that I'm going to put into place to make copies any time it sees a change
<pjt_014>
git if you want, or just duplicate files with diff names
<simpson>
Parra: There are tools like https://github.com/matthewbauer/nix-bundle which can do some of that. It depends on exactly what you need; for example, usually the tarball has to match the hardware architecture.
<gchristensen>
Parra: there are long answers with specific methods of doing this, and the short answer is: yes. Nix knows exactly what a given package depends on, and you can ask it what that is
<Parra>
I've seen that nix-bundle generates a single file, I would like to keep the dependencies as shared libraries.
<gchristensen>
(and it knows better than other package managers)
<simpson>
Parra: A tarball is also a single file. When run, nix-bundle executables set up a user namespace and filesystem, with all of the different files inside. What are you designing?
<Parra>
Basically my use case is the following: I have a C/C++ software with really complex dependencies, it depends directly on runtimes like Ruby, Python, NodeJS or NetCore
<Parra>
I want to generate self contained tarballs with all dependencies for different architectures and operative systems
<energizer>
LRB: cron?
ottidmes has quit [Ping timeout: 264 seconds]
<energizer>
LRB: what will the cronjob do
<LRB>
energizer: are you asking what cron is? or are you asking why I'm using cron?
<Parra>
I have partially achieve that with Guix, the problem is that Guix is not compatible with MacOs, at least without recompiling it by myself and also doing some patchelf magic for the Darwin libc.
<energizer>
LRB: yes why are you using cron
<Parra>
And similar for Windows, crosscompiling with Mingw it's still not fully functional
<Parra>
If I could do this with Nix, I will move to it
ym555_ has quit [Ping timeout: 240 seconds]
<LRB>
Oh. It just runs a script that checks whether a change has been made. There's are better things I could do, but this is simple enough
<Parra>
My software is crossplatform and it works in different architectures and operative systems
<energizer>
LRB: are you using version control software on your config?
<LRB>
I could use git, too I guess.
<simpson>
Parra: I don't know if the story's better for Nix. I think that one still needs OSX in order to do Darwin builds. Certainly the cross-compiling for Linux works well.
<Parra>
the hard part is packaging it, and providing installers for all platforms
<LRB>
I use git for my dotfiles on other systems
<energizer>
LRB: it's pretty common to use git for managing nix config
<Parra>
and what about windows?
<simpson>
Or don't manage Nix config. It's just a file in /etc. By far there are much harder parts of Nix, like what goes *inside* the configuration~
<energizer>
simpson: (i see the ~) you must be making some subtle distinction that i'm not understanding between a config and its contents?
<gchristensen>
Parra: certainly could
<Parra>
I've been one year trying to package this properly, and I could achieve it only in Linux with Guix
nschoe has quit [Read error: Connection timed out]
<Parra>
but Guix does not support Mac, that's why I'm looking for an alternative
<simpson>
energizer: Most of what makes a NixOS configuration valid and bootable is templated out by the installer. I don't think that it makes sense for NixOS to have a special emphasis on managing system configuration compared to other distros; it's not, IMO, what makes it hard to switch.
<Parra>
my software won't work with a single executable bundle, it dynamically loads libraries
numkem has quit [Ping timeout: 256 seconds]
<Parra>
nix-bundle won't work
nschoe has joined #nixos
<Parra>
I've been checking nix deploy, which serializes the closure
kleisli has quit [Remote host closed the connection]
kleisli has joined #nixos
pjt_014 has quit [Ping timeout: 265 seconds]
iyzsong has joined #nixos
inkbottle has quit [Quit: Konversation terminated!]
zebrag has joined #nixos
zebrag has quit [Read error: Connection reset by peer]
pjt_014 has joined #nixos
zebrag has joined #nixos
<kalbasit>
is it possible to import a set of modules (say nix-darwin's modules) under their own namespace (say config.nix-darwin and options.nix-darwin) without any changes to nix-darwin itself?
<kalbasit>
import into my own modules that have their own namespace
zebrag has quit [Client Quit]
zebrag has joined #nixos
slack1256 has quit [Ping timeout: 250 seconds]
captjakk has quit [Remote host closed the connection]
jumper149 has quit [Quit: WeeChat 2.7]
zebrag has quit [Remote host closed the connection]
<pjt_0141>
ah, that's the hideous infodump I was looking for. thanks.
evertedsphere is now known as evsph
everteds1here is now known as evertedsphere
morgrimm has quit [Ping timeout: 265 seconds]
<evertedsphere>
clever: so i set up your /run/current-system/nixpkgs thing but i don't know how to use nixops deploy -I nixpkgs=??? with the ??? pointing to a nixpkgs _commit hash_ instead of a checkout
<evertedsphere>
i'd prefer to not introduce the complexity of a local checkout/git submodule if i can help it
<{^_^}>
[nixpkgs] @lovesegfault opened pull request #84433 → nixos/networkmanager: make all plugins optional → https://git.io/JvN1u
<srhb>
lovesegfault: I can't speak to lustre directly, but back when we needed a new network fs, I did the evaluation of gluster vs ceph and decided on ceph for flexibility and ease of management specifically.
<lovesegfault>
What does perf look like?
<lovesegfault>
We do like 20Gbps reads with Lustre
<srhb>
lovesegfault: After running it for.. What, three years now? I've been exceedingly impressed with it. It's the most stable and flexible network fs I've worked with. I can't speak to perf, really, because we haven't had any real demanding workloads, what has mattered for us so far is uptime, redundancy, and tolerance in general.
<lovesegfault>
the main temptation is that it's upstream
<srhb>
But I feel pretty confident that we can tune it if we ever need to.
ok2` has quit [Read error: Connection reset by peer]
<srhb>
In nixpkgs, you mean?
<lovesegfault>
Lustre is such an incredible turd it got kicked off the kernel tree
<srhb>
oooh, like that.
<lovesegfault>
well, also in nixpkgs, but I was talking about the kernel tree
<lovesegfault>
I tried to package Lustre for NixOS and it almost killed me
<srhb>
My only real gripe with ceph s that they keep doing real weird stuff during the build process that bothers me, but it's been getting steadily better.
cjpbirkbeck has quit [Quit: cjpbirkbeck]
<lovesegfault>
do y'all use XFS or bluestore?
<srhb>
bluestore.
<lovesegfault>
Nice
<lovesegfault>
Was it you who work for the danish library system?
<lovesegfault>
Or was it the person with a tintin avatar
<srhb>
lovesegfault: Both, you're thinking of johanot, we're coworkers.
<lovesegfault>
Ah :D
<srhb>
(sorry for the ping johan :P)
<lovesegfault>
Wow, I think it's a first for my memory working :)
<lovesegfault>
EEPROM is starting to wear
<lovesegfault>
What do y'all use ceph for?
<srhb>
lovesegfault: Among other things it's the base storage for k8s containers that need persistent volumes.
<Emantor>
@work we use ceph as the backing store for VM volumes.
<zeta_0>
LarryTheCow: i paste binned the xmonad's main repository as well
<zeta_0>
well, i think i'm going to call it a day, i'll come back, later on if i'm still stuck
<zeta_0>
thanks, for the help and later everyone
zeta_0 has quit [Quit: rcirc on GNU Emacs 26.3]
<energizer>
is it possible to disable local building and only use remote builders?
peelz has joined #nixos
zupo has joined #nixos
cybrian has quit [Ping timeout: 256 seconds]
<pjt_0141>
energizer: yes
<energizer>
pjt_0141: how?
<pjt_0141>
it's buried in the manual *somewhere* :|
<pjt_0141>
one sec
tsrt^ has quit [Ping timeout: 256 seconds]
<pjt_0141>
I also know that if you pile up enough -v flags you can get a better idea of why it's failing--the term 'DECLINED' is used when a remote build device refuses
tsrt^ has joined #nixos
kenran has joined #nixos
<pjt_0141>
energizer: Found it
<lovesegfault>
energizer: it's a bit dangerous to do that in your config, I think
<pjt_0141>
nix-build --max-jobs 0
<lovesegfault>
if you lose internet access you can't build anything
<pjt_0141>
I rather do like that the wiki lists the command "nix build -vvvvvvvvv 2>&1 | less"
<energizer>
aha. "warning: ignoring the user-specified setting 'builders', because it is a restricted setting and you are not a trusted user"
<pjt_0141>
sudo time?
<pjt_0141>
or editing the sudo file
zupo has quit [Ping timeout: 250 seconds]
<energizer>
"We must configure the nix-daemon to use our builder. Options like --builders on the command line is ignored unless your user is in the trusted user list." i'm not sure what it means
<fusion809>
Is there a way to include a callPackage line in my ~/.config/nixpkgs/overlays.nix file as well as what's mentioned in this comment https://github.com/NixOS/nixpkgs/issues/84327#issuecomment-609571058? I've tried to by having wpsoffice = callPackage ... {}; and that line afterwards in my overlays.nix file, but that failed to build.
<fusion809>
The callPackage line is so that I can build wpsoffice from my fork of nixpkgs
<energizer>
do i need to reboot after changing nix.conf?
<energizer>
it hasn't noticed my change to trusted-users
<wedens[m]>
you need to reload nix daemon
lovesegfault has quit [Ping timeout: 265 seconds]
morgrimm has joined #nixos
<pjt_0141>
how do I ensure a path is available during a build's installPhase? simply importing it isn't working
<sphalerite>
pjt_0141: you probably need ncurses both in buildInputs and nativeBuildInputs, so that you have (1) the library to link against and (2) the tic tool
zupo has joined #nixos
<pjt_0141>
tryin that hol on
<cole-h>
sphalerite++ I've been wondering the difference between `native...` and `buildInputs` for a while. Reading the manual on it got me nowhere. But your succinct description made it all of a sudden make sense; thanks!
<{^_^}>
sphalerite's karma got increased to 80
<sphalerite>
cole-h: :)
<energizer>
`Failed to reload nix-daemon.service: Job type reload is not applicable for unit nix-daemon.service.` using `restart` doesn't complain, but also didnt make me a trusted user
<energizer>
`nix-build --builders ssh://foo` it's not seeing foo which is defined in ~/.ssh/config even though i can ssh to it. it says "debug1: Reading configuration data /etc/ssh/ssh_config" but it never mentions looking in ~/.ssh/config
<clever>
energizer: its root that does the connection though
<clever>
energizer: your telling nix-daemon to ssh into foo, so it uses /root/.ssh/config
<energizer>
what's the point of putting me in trusted users if it doesn't let me use my own ssh keys?
cfricke has joined #nixos
hmpffff has quit [Remote host closed the connection]
hmpffff_ has quit [Ping timeout: 272 seconds]
pjt_0141 is now known as pjt_014
<energizer>
and how did the person in the wiki make it work with ~
mallox has quit [Client Quit]
mallox has joined #nixos
hmpffff has joined #nixos
mallox has quit [Client Quit]
mallox has joined #nixos
civodul has joined #nixos
<energizer>
something doesn't add up
<energizer>
clever: i need to copy my keys too?
<srhb>
energizer: Delegating builds to some-other-machine is inherently an operation that requires trust of the user commanding that to happen, because the builder could do all sorts of things and claim it's safe.
<sphalerite>
energizer: you can put your own SSH key in the builders entry, or point root's ssh_config to your SSH key.
<srhb>
energizer: (Like, say, replace nixpkgs.hello with nixpkgs.rootkit)
<sphalerite>
energizer: to provide a concrete example of what srhb said: if you delegate a build of, say, sudo, to a machine you control, you can have the machine build a backdoored version of sudo. Then, if the local machine switches to a new version of sudo and finds that it's already there, it will use that — and make it setuid.
<sphalerite>
i.e. trusted-user is equivalent to root access
<energizer>
no i get that. my point is once i'm trusted, there's no security boundary between me and root, so why should i need to copy all my ssh stuff into /root/.ssh
<srhb>
energizer: Fair point. But it's simply because the nix-daemon has $HOME=/root
<srhb>
energizer: There's no deeper reasoning.
<srhb>
(as in, it could fundamentally be done differently, and is, for a non-daemonized setup by default)
<sphalerite>
energizer: the security boundary that would have existed if you weren't a trusted-user is only one-way, root can access your keys anyway :)
zeenk has joined #nixos
<wedens[m]>
does something in nixos-rebuild ignore NIX_CONF_DIR?
<sphalerite>
wedens[m]: the daemon probably
<wedens[m]>
but nix-build uses it as expected
<sphalerite>
oh wait no, nix as root defaults to direct store access, not the daemon, iirc
<{^_^}>
[nixpkgs] @eonpatapon opened pull request #84446 → nixos/wordpress: nginx support → https://git.io/JvNDm
<energizer>
sphalerite: yeah, it just would be convenient for it to read my keys and config since it knows my username
<srhb>
There used to be a proposal to enable specifying the path to the key in the builder command line, I forget if that ever went through
<srhb>
Because it's definitely one of the most common pitfalls of the user confusion that arises from daemonized distributed building.
<energizer>
that chapter says i want to set builders-use-substitutes but i can't find that in man configuration.nix
<srhb>
energizer: It's in man nix.conf
cole-h has quit [Quit: Goodbye]
<energizer>
srhb: am i supposed to write nix.conf manually, or generate it from configuration.nix nix.*?
<srhb>
energizer: and NixOS has a `nix.extraOptions` option.
<srhb>
energizer: Generate it from configuration.nix' nix.*
pjt_014 has quit [Ping timeout: 258 seconds]
<energizer>
ah, extraOptions
<srhb>
energizer: It's just that every option isn't represented as a NixOS option.
<wedens[m]>
what I'm trying to accomplish is to make nixos-rebuild use substitutes/builders from not yet activated configuration: https://paste.ee/p/0ZQBj
nschoe has quit [Remote host closed the connection]
<wedens[m]>
it seems to work with nix-build but not nixos-rebuild
<clever>
wedens[m]: nixos-rebuid will run nix-build twice, once to build nix, then it uses that nix to build nixos
fragamus has joined #nixos
ardumont has quit [Ping timeout: 272 seconds]
snicket has joined #nixos
zaeph1 is now known as zaeph
nschoe has joined #nixos
<wedens[m]>
but why does it ignore NIX_CONF_DIR?
<clever>
not sure
<clever>
wedens[m]: also, you dont need to use NIX_CONF_DIR
<wedens[m]>
and just uses current nix.conf
<clever>
wedens[m]: if you delete the /etc/nix/nix.conf symlink, you can replace it with a normal file, and freely edit it
<clever>
wedens[m]: and nixos-rebuild will transparently turn it back into a symlink at the next switch (or reboot)
<energizer>
cool, i'm building. thanks all
levdub has quit [Ping timeout: 265 seconds]
<wedens[m]>
yeah, but I'd prefer nixos configuration to be the only place where I need to configure builders and substitutes
<clever>
wedens[m]: once it has done a rebuild switch, it will update /etc/nix/nix.conf and /etc/nix/machines, and respect your configuration.nix
<wedens[m]>
any drawbacks to just using nix-build and switch-to-configuration directly?
<sphalerite>
they won't build and use a new nix to build the system
<sphalerite>
shouldn't make a difference though in most cases
<LnL>
also nixos-rebuild creates profiles which 1. ensure the system stays alive 2. your can rollback
<LnL>
wedens[m]: your etc nix-build's will also be running without it, in case that's what you're seeing
<clever>
energizer: `nix-copy-closure /nix/store/foo.drv --to host` then `nix-store -r /nix/store/foo.drv`
Diogo has joined #nixos
<wedens[m]>
LnL: yeah, I know. but the problem occurs in nixos-rebuild specifically
maddo has joined #nixos
<energizer>
clever: thanks
<wedens[m]>
there is some weird _NIXOS_REBUILD_REEXEC magic in nixos-rebuild
<LnL>
wedens[m]: oh also nix.conf might be pointing to @/etc/nix/machines instead of the relative one
astrofog has quit [Quit: Quite]
<wedens[m]>
it's not set to anything. currently it tries to use old substitute address and fails
<LnL>
might be looking at the nix-daemon's NIX_CONF_DIR/machines in that case
<wedens[m]>
(old is what is set in /etc/nix/nix.conf)
<LnL>
try builders = @/this/shouldnt/work
<woffs>
infinisil: will Haskell LTS 15 go into nixos-20.03?
<wedens[m]>
LnL: but it fails to reach a substitute, not a builder
<LnL>
ah
<eon`>
hi, is it possible with mkRenamedOptionModule to do a rename like `services.x.<name> -> services.x.y.<name>` ?
cr4y1 has quit [Remote host closed the connection]
cr4y1 has joined #nixos
<woffs>
wedens[m]: --option substitute false ?
<wedens[m]>
woffs: the point is to use substitutes from not yet active nixos config, not to disable them and no to specify them manually
<clever>
wedens[m]: thats just a design problem in nixos-rebuild, it cant use the config until after its done building
<woffs>
wedens[m]: you could copy /etc/nix/nix.conf symlink to a real file and edit :-)
<woffs>
wedens[m]: or you can just change the substituters, rebuild (no substitutes needed for that change) and then be happy
bennofs1 has joined #nixos
<leons>
I'm having quite some trouble figuring out how to get the `riscv32-none-elf-objcopy` binary in a nix shell expression
<leons>
Currently using `mkShell` with empty buildInputs and the crossSystem set to `riscv32-embedded`, but that's in a separate nix file
<leons>
I'd like to just include the gcc cross compiler in the buildInputs of my existing shell.nix
<clever>
leons: the correct way, is to use the right stdenv.mkDerivation, from the cross-compile env
<clever>
leons: pkgsCross.riscv32-embedded.stdenv.mkDerivation { name = "something"; } in your shell.nix
pbogdan has joined #nixos
<leons>
clever: That's basically what I'm doing now I believe. Problem is, I'd only want that one binary for cross compilation, but everthing else should be for regular old x86.
<leons>
clever: This is for a project with some complex Makefile setup using Rust to build for ARM and RISC-V, then later using the system provided cross platform objcopy binaries
<leons>
So I need at least the ARM and RISC-V ones in one expression
<clever>
leons: i ran into similar issues in rpi-open-firmware, i choose to split the arm and vc4 stuff into seperate derivations
<clever>
leons: so i compile the arm stuff with the cross arm, then i pass the product to the cross-vc4 package
<leons>
clever: Okay, however we're not (yet) trying to build using Nix, just the shell environments. My current approach is to go into the two nix-shells consecutively but that's a hack
pbogdan has quit [Remote host closed the connection]
<leons>
clever: Oh yes, thank you very very much! I used to know how this works, I forgot that it was `buildPackages`, I wrote `hostPackages` instead. Stupid me
est31 has quit [Remote host closed the connection]
<clever>
leons: in here, i wrote a nixpkgs overlay, that defines several libraries and programs
pbogdan has joined #nixos
<clever>
leons: common, is designed to be able to cross-compile to both arm and vc4, depending on which pkgsCross you get it from
<clever>
leons: and common just has a $out/lib/libcommon.a, that you can just -lcommon like any other library
<clever>
nix will seamlessly rebuild common any time ./common/ changes
<clever>
leons: and line 58 can just add self.common to buildInputs, and it just works
est31 has joined #nixos
<leons>
clever: Oh, that is awesome! I'll definitely store that link if we decide to build using Nix at some point.
<clever>
leons: lines 10-13 applies that overlay, to a range of cross environments
CRTified has quit [Ping timeout: 240 seconds]
<clever>
leons: and then 197-217 pulls select packages out of each cross env, to expose them for normal use
<clever>
leons: and for mixing arches, the vc4 stuff expects a arm_chainloader/build dir, so line 86 symlinks in the product from the cross-arm
wavirc22 has joined #nixos
<{^_^}>
[nix] @buecking closed pull request #2643 → install: Check for a valid umask before running multi-user installer. → https://git.io/fh2k6
<leons>
clever: I think I get the concept 🙂 still quite complex though, I'll look at this more in depth. Thank you for sharing though, really could be interesting for some of my projects
ottidmes has joined #nixos
bennofs1 has quit [Ping timeout: 260 seconds]
<clever>
leons: there also another fun trick i'm doing...
<srhb>
bqv: A bit too late now, but automatic rollback units can be really nice to prevent that sort of situation.
<energizer>
srhb: what's that?
eoli3n__ has quit [Ping timeout: 256 seconds]
<srhb>
energizer: Most people implement it as a systemd unit that waits some minutes after startup for a certain ssh command to complete (eg. touch some file) and rolls back and reboots if it does not appear in time.
<srhb>
Yeah, it would be nice with a ready made one. I think most people just roll their own.
<evertedsphere>
is automatic rollback like... that thing on windows where if you change graphics settings it automatically undoes them after like 15 seconds unless you click "this is fine"
<energizer>
haha
<srhb>
evertedsphere: That's how I implement it at least. ;-)
<evertedsphere>
i actually did my first normal nixos rollback yesterday, i accidentally disabled sshd and couldn't nixops deploy to localhost anymore :(
<evertedsphere>
i'm surprised how ... normal it felt
<srhb>
But my motivation is exactly: I want the human (me) to verify that there's at least connectivity enough to be able to ssh in and use sudo
<evertedsphere>
ahah
<evertedsphere>
what is {^_^} an instance of? some sort of souped-up lambdabot?
<srhb>
evertedsphere: I think it's actually some sort of metabot that sends different commands to different backends.
<evertedsphere>
feels like there should be a better way to do this, like being able to say @pkgs.foo@/bin/foo instead of having to pass each package like that
<evertedsphere>
and having substituteAll error if i do something like refer to @thing-i-did-not-pass@ in the script
<evertedsphere>
instead it just leaves a raw @whatever@ in the final script, i've been bitten by this a few times now
<energizer>
what about pkgs.writeShellScriptBin?
LnL has joined #nixos
LnL has joined #nixos
LnL has quit [Changing host]
<evertedsphere>
id like to not have the whole script be inline if possible, if that's what you mean
LnL has quit [Remote host closed the connection]
<energizer>
ok
<evertedsphere>
i mean i /can/ do that it just feels "untidy" to me
<evertedsphere>
maybe i'm not used to the nix/nixos way of doing things yet
<qyliss>
I would use substituteAll in any complicated case
LnL has joined #nixos
LnL has joined #nixos
LnL has quit [Changing host]
<evertedsphere>
can i get substituteAll to error on params i failed to pass
<qyliss>
But I don't usually refer to so many packages that it's inconvinient to pass them all
<qyliss>
evertedsphere: you could add a grep for @.*@ after substituting
<ottidmes>
evertedsphere: in this case I would use lib.makeBinPath and change PATH to include those bin paths
<qyliss>
But it won't check that on its own.
LysergicDreams has quit [Ping timeout: 250 seconds]
<bqv>
phew, at least managed to get logged into IPMI. recovery is now possible :)
<bqv>
next step, get ssh working again...
work_ has quit [Quit: Connection closed for inactivity]
<{^_^}>
[nixos-org-configurations] @edolstra pushed 13 commits to master: https://git.io/JvN9t
jbrock has joined #nixos
captjakk has quit [Ping timeout: 240 seconds]
leotaku has quit [Ping timeout: 250 seconds]
xelxebar has quit [Ping timeout: 240 seconds]
Ariakenom has joined #nixos
magnetophon has quit [Ping timeout: 265 seconds]
<ottidmes>
bqv: talking about fallbacks, besides a reboot if no SSH/sudo you might also include an rescue entry in your bootloader menu, but this implies some sort of VNC connection allowing you to choose (all my servers had this available to them)
<bqv>
there'd always be the option of rollback if i could get to the point of accessing a boot menu
opthomasprime has joined #nixos
<ottidmes>
bqv: yeah, but no guarantee that the rollback will work, you might have impure changes that cause them to fail too now
<bqv>
i think i'd deserve failure, in that scenario :p
eoli3n__ has quit [Ping timeout: 265 seconds]
<evertedsphere>
okay so i think i'd like to add a <nixpkgs-unstable> thing to my custom NIX_PATH now, so i can use packages that haven't made it into nixos-unstable yet
<evertedsphere>
but i want to pin it, perhaps as a submodule in my config repo?
<evertedsphere>
i think i need to add an unstable=something there but does anyone have an example of how that is done? perhaps a local relative path to a submodule?
jbrock has joined #nixos
<evertedsphere>
basically i just want to say things like home.packages = [ pkgs.normal-stuff unstable.danger-this-is-untested ]
<sphalerite>
evertedsphere: add it to NIX_PATH
<sphalerite>
oh
<bqv>
lol
<sphalerite>
not sure about home-manager
<evertedsphere>
yes but *what* do i add to NIX_PATH, not sure how to go about the whole setup with a git submodule :/
<evertedsphere>
i think i need to study someone's config repo. maybe infinisil's, he has an external/nixpkgs submodule
<bqv>
that post actually answers all of your questions
<evertedsphere>
oh excellent, thank you!
<bqv>
:)
cfricke has joined #nixos
<ottidmes>
bqv: accidents happen, and most I won't consider deserved in your sense. Having snapshots of your config in /nix/store definitely helps, like you already have
<evertedsphere>
err. i've done that particular thing before, i guess i'm more confused about the submodule part (like how do i move "up" to a new commit)
<evertedsphere>
i guess i barely know any git :(
rauno has quit [Remote host closed the connection]
<evertedsphere>
i could just work off a link to the nixpkgs repo but i want my own checkout to e.g. test not-yet-merged things
<srhb>
evertedsphere: In the most primitive sense, it could just be /path/to/your/checkout
<bqv>
ottimides, of course, but i can't forsee a situation where I wouldn't at least be able to ssh in after a rollback, it would have to be an extraordinarily comprehensive screwup
<srhb>
evertedsphere: And pkgs from that is `import /path/to/your/checkout {}`
<srhb>
evertedsphere: you can replace that path with any fetcher you'd like, but it sounds like you're not quite sure how you're going to be defining that source at all. Is it a submodule, a dirty tree, some commit, ...
<evertedsphere>
i see, and can i rely on that in a nixops nix file the same way i can expect `pkgs` to be automatically passed around?
marsh has joined #nixos
<evertedsphere>
right, i think i want my own fork of nixpkgs that i refer to as a submodule, probably
<evertedsphere>
i.e. i'd like to be able to say { pkgs, unstable, ... }: <rest of file>
<evertedsphere>
instead of unstable ? import <unstable> {}
<srhb>
evertedsphere: It is essentialy the same thing. I'm not sure you even want the NIX_PATH shenanigans. Unless you want to be able to nix-env my-unstable-packages.hello
<evertedsphere>
well all i do is writing to my config repo and then nixops deploy, i don't really play much with other nix tools yet. but i think it'd be neat to be able to say nix repl '<unstable>'
<evertedsphere>
i've been trying to use nix-repl a bit more
<srhb>
evertedsphere: Well, for that you'd overlay your unstable set into pkgs as if it were a regular package. Note that evaluation can blow up when you keep multiple package sets around.
opthomasprime has left #nixos [#nixos]
<evertedsphere>
or, wait. i could just cherry-pick unstable packages into my normal package set using packageoverrides
<evertedsphere>
i do think i'd prefer the NIX_PATH shenanigans, though, as you put it. seems like the "correct" way to do it
<evertedsphere>
i guess i'm just too afraid of making a submodule lol
gxt has joined #nixos
sigmundv_ has joined #nixos
o1lo01ol1o has quit [Ping timeout: 258 seconds]
Darkmatter66 has joined #nixos
<srhb>
evertedsphere: Well, assuming you have unstable = /path/to/checkout;, then it should basically be as simple as nix.nixPath = [ "unstable=${unstable}" ];
Darkmatter66_ has quit [Ping timeout: 256 seconds]
<srhb>
evertedsphere: Though i don't remember if that thing merges correctly, you may have to restore the rest of NIX_PATH in that setting as well.
<srhb>
I kind of dislike doing it this way because it'll only take effect after the switch.
<srhb>
Which can be confusing.
<evertedsphere>
i know, which is why i'm trying to go about explicitly specifying the NIX_PATH using an envrc
<srhb>
Ah, sorry, I missed that detail.
<evertedsphere>
my nix.nixPath is empty
<evertedsphere>
wlel, it contains a nixos-config entry that causes nixos-rebuild to fail loudly
<evertedsphere>
so i can't forget to use nixops :)
<srhb>
Well, start from just pointing it at a checkout you'd like to use I figure. :)
xelxebar has joined #nixos
<evertedsphere>
yeah i'm sure if i set everything on fire this is still nixos and i can always rollback
<bqv>
evertedsphere: so hey, what I do might be an idea for you. rather than create a toplevel "unstable" set or using channels, I have an overlay to set it in pkgs, so i can just change pkgs.apache to pkgs.unstable.apache and back without having to modify lots of other config
<bqv>
i also have that for all prs, and i'm usually going in the opposite direction to you, but still
hoplaahei has joined #nixos
<evertedsphere>
bqv: do you have some code i can look at?
<evertedsphere>
i've never used overlays haha
<hoplaahei>
Hi. I would like to purge the /run/current-system/sw/lib/firefox/browser/features/ directory contents. As it is read-only, I assume I need to override firefox derivation with a post-install hook to remove the files?
<clever>
hoplaahei: yeah, an override against firefox is likely best
tomberek has quit [Ping timeout: 250 seconds]
<hoplaahei>
clever: ok ty for the info
rsa_ has quit [Ping timeout: 265 seconds]
laduke has quit [Ping timeout: 265 seconds]
<bqv>
evertedsphere: my code will mostly be irrelevant to you, since i'm using nixFlakes. the gist is to set nixpkgs.overlays = [ (self: super: { unstable = something; }) ]
cybrian has joined #nixos
sigmundv_ has quit [Remote host closed the connection]
<bqv>
huh, i really do always get the best PR numbers...
Parra has quit [Remote host closed the connection]
hmpffff__ has quit [Ping timeout: 272 seconds]
Parra has joined #nixos
morgrimm has joined #nixos
Parra has quit [Read error: Connection reset by peer]
leotaku has joined #nixos
arjen-jonathan has quit [Ping timeout: 272 seconds]
morgrimm has quit [Ping timeout: 265 seconds]
Parra has joined #nixos
ph88 has joined #nixos
o1lo01ol1o has joined #nixos
<ph88>
when i installed nix-shell i had a command to make nix commands available. Now i logged out and i don't have nix-shell anymore. How can i load this tool ?
<{^_^}>
[nixpkgs] @primeos pushed to master « chromiumDev: Override gn to fix the configuration phase »: https://git.io/JvN73
<srhb>
ph88: This is Nix on SomeOtherOS? Normally, installation creates the necessary shell logic to make your profile (and thus the nix commands) be loaded at login. How did you install it?
<reactormonk>
I'm trying to (ab)use nix here to generate benchmarks... is it possible to force regeneration of a derivation, even if a cache is available?
<hyper_ch>
gchristensen: got some time for nixos and zfs questions?
<gchristensen>
hey hyper_ch not sure ... shoot :)
<hyper_ch>
gchristensen: well, I read in the nixos wiki, that you can also use zfs mount nowadays... so I tried and made the root dataset as / and the system booted fine. Afterwards I thought I could make home into a child ds and have it also automounted... also that worked. Then I got really ambitious and it failed. it seems several directories have issues
<gchristensen>
I always use mountpoint=legacy and explicit mounts
<gchristensen>
I don't think there is good support for dependency ordering otherwise
<hyper_ch>
gchristensen: not yet a completed list but I need to set /etc /root /var and other as explicit mountpoints with legacy and addition to hardware-configuration
<hyper_ch>
so I've just been wondering at what point nixos does moutn "special" folder and stuff
<hyper_ch>
it would be nice if that zfs mount would just work
<hyper_ch>
instead of creating a hundred datasets and add them to the configuration.nix
hmpffff_ has joined #nixos
<gchristensen>
yeah, I think there is something about a systemd generator for zfs mountpoints, but we don't use systemd for mounting anyway -- so we'd need some special jazz in our stage-1
<gchristensen>
(or move to systemd mounts)
morgrimm has joined #nixos
<hyper_ch>
I will test further with the various dir
<gchristensen>
we really require explicit mounts, though, unfortunately, in the hardware-configuration.nix
<hyper_ch>
gchristensen: I'll just test what needs explicit mounts and what doesn't and will add my findings to the wiki
hmpffff has quit [Ping timeout: 272 seconds]
<hyper_ch>
it's not to have /home or even /home/user as seperate ds and it's also true for other stuff like /var/log or and probably also /etc/nixos and even /nix
Naptra has quit [Remote host closed the connection]
<gchristensen>
it is a race condition, so testing may not apply equally
<leonardp>
the rest of it looks nice so i think it's worth it 🙂
Darkmatter66 has quit [Ping timeout: 265 seconds]
Darkmatter66_ has joined #nixos
<srhb>
leonardp: The correctest way is probably to make upstream do something less crazy, but I realize that's often not a very plausible solution
<srhb>
leonardp: So then all bets are off and you can summon whatever demons you need to get Stuff Working and start evaluating on that. Obviously, aliasing git to true is completely fair game here.
<leonardp>
srhb: i'll try my best to convince him, otherwise a fork is fine too
<srhb>
(obviously!)
<srhb>
It has the added bonus of allowing git push and friends to work just fine from within a sandbox, too!
<srhb>
fsvo "work"
tobiasBora has quit [Ping timeout: 268 seconds]
rauno has quit [Remote host closed the connection]
<ottidmes>
Is there a list of all runtime deps of Nix? I wanted to create a complete PATH not a prefix, but when I do, I run into trouble with fetchGit and fetchTarball requiring a few deps, so I have had to add git, gnutar and gzip as dependencies so far
<{^_^}>
[nixpkgs] @marsam opened pull request #84461 → libbluray: fix build on darwin → https://git.io/JvNFK
turion has joined #nixos
marcusr has quit [Remote host closed the connection]
marcusr has joined #nixos
<turion>
My colleague just asked me to send him the output of `pip freeze`. In NixOS this is of course an empty list since I haven't installed python packages with pip, but declaratively through home-manager. How would I be able to supply him a list of python modules and their versions?
aswanson has quit [Quit: WeeChat 2.7.1]
aswanson has joined #nixos
jakobrs has joined #nixos
<jakobrs>
How do I get dhcpcd to *not* run on a specific interface temporarily?
<jakobrs>
I know about networking.dhcpcd.denyInterfaces, but it requires a rebuild, and restarts dhcpcd
<jakobrs>
Maybe the live usb image should include terminus-font in i18n.consolePackages?
<evertedsphere>
i've just done something i think is cursed: i put unstable = import <unstable> {}; in my config.packageOverrides, so now i can do home.packages = with pkgs; [ normal-pkg-1 unstable.scary-pkg normal-pkg-2 ]
<evertedsphere>
how wrong and bad is this. i would prefer to have every file automagically receive an "unstable" argument just like they get pkgs, config, etc but idk how to do that
<evertedsphere>
or maybe i should learn to use overlays already
marcusr has quit [Remote host closed the connection]
<evertedsphere>
but srhb did tell me that putting entire package-sets into packageOverrides could be brittle, iirc
<srhb>
evertedsphere: That should work.
<evertedsphere>
is there a more idiomatic way to do it?
<evertedsphere>
i also ended up not using a submodule, instead i just made a branch on my nixpkgs fork and pointed <unstable> to the tar.gz corresponding to that branch
<srhb>
Well I think packageOverrides are mostly the old way of doing what overlays accomplish now, but it makes little difference
<srhb>
evertedsphere: Yes, that sounds better too.
<jakobrs>
How do I add something to an option without overriding the default?
<srhb>
jakobrs: Your alternative is to define your own list with the same priority as the default list, but I find that less "obvious"
<evertedsphere>
lol my shell prompt hangs inside the nixpkgs repo
<srhb>
That would make them merge correctly as well.
<srhb>
jakobrs: But I prefer the explicit grabbing of the option default to be more clear.
<srhb>
evertedsphere: git magic?
<jakobrs>
yeah, I think I'm doing that
<evertedsphere>
srhb: yup i just grabbed some simple oh-my-zsh configuration through home-manager when setting up this nixos install, seems like it's time to rip out a few things
thibm has quit [Ping timeout: 250 seconds]
cosimone has quit [Remote host closed the connection]
<evertedsphere>
the nice part is i can actually just change a few environment vars in .envrc and use someone else's nixpkgs fork to test a nixpkgs PR/some packaging-request
<{^_^}>
[nixpkgs] @volth opened pull request #84468 → [20.03] processing: fix sha256 of reference.zip → https://git.io/JvNNQ
<arianvp>
urgh I wish NixOS had that fat VC money
<arianvp>
(Not VC money. just infinite money from another source or whatever)
<manveru>
mostly hoping this will work for the ruby stuff at sunflower as well :)
organixpear has quit [Quit: Leaving]
<manveru>
err, mayflower
hmpffff_ has quit [Ping timeout: 265 seconds]
<jtojnar>
bqv do you have an error message?
<bqv>
jtojnar: i'll do you one better: nix-build -I "nixpkgs=https://github.com/NixOS/nixpkgs/archive/pull/84466/head.tar.gz" -E 'with import <nixpkgs> {}; pypy3.withPackages (ps: [ (pypy3Packages.callPackage pkgs/development/python-modules/psycopg2cffi {}) ])' --pure
<bqv>
but also for specificity, i'm trying to build it with pypy3, and it says `ERROR: psycopg2cffi-2.8.1-pp371-pypy3_71-linux_x86_64.whl is not a supported wheel on this platform.`
dckc has joined #nixos
<bqv>
I've had a look at the python instrumentation
<bqv>
seems like it's doing all the right things
<bqv>
but i don't know the detail enough to debug that, and I'm not sure why this wouldn't work, it looks identical to most other pypy packages
<arianvp>
andi-: so that people think we're cool like Kubernetes docker hashicorp coreos
<arianvp>
And so that my managers will awe at the beautiful white papers that we produce
<arianvp>
:p
<arianvp>
Maybe we should just fake it. Honestly think it will work. Get the website a nice facelift. Do some impressive white papers about cloud DevOps AI Blockchain
<jakobrs>
So I just wrote a small patch for nixpkgs, and I'm wondering:
<jakobrs>
should I open an issue *first*, or should I just open a PR directly (without creating an issue first)?
jbrock has quit [Read error: Connection reset by peer]
Ariakenom0 has joined #nixos
<srhb>
jakobrs: Either is fine. If your PR isn't accepted but the issue persists, the issue way might be good.
<jtojnar>
qy is that not the issue Frederik linked?
<srhb>
jakobrs: There's no formal requirement to my knowledge.
<jakobrs>
Should I then create an issue and ask if I should create a PR, or create both at the same time?
<srhb>
jakobrs: No sense in waiting with the PR imo.
Ariakenom has quit [Ping timeout: 264 seconds]
reallymemorable has quit [Quit: reallymemorable]
<jakobrs>
For context, it's that thing I mentioned earlier about adding terminus to console.packages
kaliumxyz has joined #nixos
Ariakenom has joined #nixos
Ariakenom_ has joined #nixos
<exarkun>
Where's the binary cache for ghc for nixos-20.03? Why do I have to build it myself? Or more to the point, why does my CI have to try to build it itself and then get OOM killed after 30 minutes.
hmpffff has quit [Quit: Bye…]
<evertedsphere>
niv seems cool
igghibu has joined #nixos
Ariakenom0 has quit [Ping timeout: 260 seconds]
Guest95217 has joined #nixos
<bqv[m]>
Jan Tojnar: FRidh2 it is, sorry. thanks!
reallymemorable has joined #nixos
<bqv[m]>
i have not been paying attention to my pings
jbrock has joined #nixos
Ariakenom has quit [Ping timeout: 250 seconds]
Guest95217 has quit [Client Quit]
trem_ has joined #nixos
<srhb>
exarkun: can you elaborate on what you think is missing?
<simukis_>
currently I’m just adding `phases = [ "installPhase" ];` to a stdenv.mkDerivation
<bqv[m]>
use propagatedbuildInputs and have installphase just be touch $out?
Ariakenom_ has quit [Ping timeout: 256 seconds]
<FRidh2>
with stdenv.mkDerivation you would need dontUnpack = true; dontBuild = true; dontInstall = true; or something like that. Maybe easier to just use runCommandNoCC
<FRidh2>
*runCommand
shibboleth has joined #nixos
<evertedsphere>
if i want to take a haskell derivation's `env` and add a few native deps to it, what's the cleanest way to do that?
<evertedsphere>
saying /nix/store/<hash>-ghc-with-packages: is a directory
<evertedsphere>
i need to get the buildInputs "out" of the env somehow
igghibu has quit [Quit: Konversation terminated!]
<srhb>
evertedsphere: It sounds like you may be searching for something like shellFor
<srhb>
But it may be X-Y confusion :)
<evertedsphere>
true. let me explain what i want to *do*
<evertedsphere>
i want to get a shell in which i can develop my haskell package but have it also provide, say, cabal-install, not just ghc + my haskell deps
<srhb>
evertedsphere: Yes, take a look at shellFor.
<evertedsphere>
something like myproject.env.extendWith [ pkgs.this pkgs.that ]
<evertedsphere>
ah okay
<srhb>
evertedsphere: pkgs/development/haskell-modules/make-package-set.nix -- it has some inline documentation
xelxebar has quit [Remote host closed the connection]
lord| has quit [Read error: Connection reset by peer]
<srhb>
evertedsphere: There are many ways to shave this yak. Nix is pretty flexible. I mention shellFor because it's made especially for the problem you describe.
<evertedsphere>
right i got shellFor working
<evertedsphere>
should i bother putting my package in an overlay or just packages = _: [ mypackage ]?
<srhb>
evertedsphere: I add overlays once I start sharing them across projects.
<srk>
depends if other packages depend on it
<srhb>
evertedsphere: It won't be a big rewrite, so I wouldn't worry about it.
<evertedsphere>
right, makes sense to not bother with it yet
<evertedsphere>
i went with shellFor since i'm familiar w/ mkDerivation from earlier and this does seem like the Right Way to do it insofar as it's less code for my trivial usecase
lord| has quit [Read error: Connection reset by peer]
<ottidmes>
I am trying to kexec into my unlocked sedutil drive, but it fails with no such device when trying to mount /dev/sda1 to /boot. I checked fdisk -l, and there I see only the PBA (the partition used to unlock your drive), so one partition, but when I check /dev I see sda1, sda2, and sda3, just as they are supposed too.
<ottidmes>
I expected it to either not fail but mount the wrong device (the PBA rather than /boot on the unlocked /dev/sda1)
lord| has quit [Read error: Connection reset by peer]
<cjpbirkbeck>
hello, i'm trying to override st.nix's default src with my own, but i'm getting the error that default.nix is called with unexpected argument 'src'.
<ottidmes>
or to consistently show the state of the partition table
<srhb>
cjpbirkbeck: Did you mean to use overrideAttrs?
<cjpbirkbeck>
srhb: no, i was just doing override
<srhb>
cjpbirkbeck: override is for overrding the function args. the st default.nix does not take src as a named argument in its argset
lord| has joined #nixos
<srhb>
cjpbirkbeck: Reading about the differences between the two might be helpful. But you'll want something like `st.overrideAttrs (oa: { src = ...; })` in this case.
linarcx has joined #nixos
<ij>
is copy_bin_and_libs something I get by default?
<srhb>
Well, at least that gives you someone to ask. I bet the answer is "because the software is very opinionated and this was an easier way to fix it than alternatives"
<srhb>
But yeah, not nice.. :)
<ottidmes>
Not sure how that passed reviews, I thought generally nixpkgs should do nothing in $HOME. I at least have kept some modules of my own out of nixpkgs because of it
justanotheruser has quit [Ping timeout: 272 seconds]
<srhb>
NemesisD: If you mean normal NixOS module arguments the arguments is no (not really but don't do it) -- if you wrap it in an outer function, then yes, no problem.
<srhb>
NemesisD: Er, the answer* is no in the first case.
soren89 has joined #nixos
<NemesisD>
srhb: what do you mean by an outer function?
<srhb>
NemesisD: Something like `{ customArg, ... }: { config, pkgs, .... }: ...` -- to be clear
rsa has quit [Ping timeout: 260 seconds]
<srhb>
NemesisD: Notice how I did not touch the module system args in the inner function.
kenran has quit [Ping timeout: 260 seconds]
<srhb>
NemesisD: Now you just need to `imports = [ (import myFile { customArg = ...; }) ];
<NemesisD>
oh thats clever...
<srhb>
NemesisD: Usually it's simpler to specify some more options and switch on that internally in the modules though
<srhb>
I wonder why that doesn't suffice for your use case?
<NemesisD>
srhb: yeah its very possible i'm doing something stupid. so i'm following a pattern for home-manager/nixos where the system's configuration file and just imports files from a git repo on disk. there are modules i want to reuse like one that sets up my terminal, but on systems i need to override some aspects of those imports
<srhb>
NemesisD: Why not set the values conditionally? if config.networking.hostName == foo then something else someotherthing
<NemesisD>
to be super particular, i have a module for alacritty terminal. it turns out on non-nixos boxes that needs to be wrapped by nixGL or it won't start
<srhb>
NemesisD: I have "host choosers" like this in a lot of places
<srhb>
ok, then that particular example won't work (because that option doesn't exist) but something like it.. :)
ddellacosta has joined #nixos
<srhb>
NemesisD: But either way will work.
<NemesisD>
i could do that, it just seems kinda goofy because IMO the "root" module for that system should specify its particularities if it has them. with host choosers every module needs to know about hostnames to specialize itself
<srhb>
NemesisD: I would set up one host specific module instead.
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<srhb>
NemesisD: Rather than the root module
<srhb>
It could contain all the switching logic needed gathered in once place
<srhb>
But again, either way will work. As long as you avoid conditional imports, which sounds like you sort of may be going down.
<srhb>
NemesisD: (really, for my top level stuff, I just have different files)
bgamari has quit [Ping timeout: 256 seconds]
<srhb>
ln -s somelaptop.nix default.nix -- and done. :)
<NemesisD>
hmm, i don't think this will result in conditional imports. its more like you're saying "i need an alacritty capability but i want to specify a different bin for it". if you truly don't need the conditional imports at all, you just wont have `alacritty.nix` in your imports list in that host's root module
<srhb>
OK, good. Conditional imports bring pain and horror and is generally incompatible with the module system, so as long as you're not doing that I'm sure it'll work. :)
<NemesisD>
:D cool well i'll give this a try. thank you!
<exarkun>
srhb: Do you know anything about haskell.nix? I don't have an overlays of my own applied but maybe haskell.nix applies one.
<srhb>
exarkun: The iohk one? I only sort of know its architectural foundations.
<exarkun>
that one, yea
<srhb>
exarkun: Instead of moving through CI, perhaps you can check the various layers of what you've got. It looks like you may have multiple nixpkgs in play, and stack on top of that. It would probably help to see if you can reproduce this in a shell with your repo setup.
<srhb>
If you can conclude that your shell is good, you're one step closer at least.
<exarkun>
trying to do that, yea. unfortunately it involves downloading tons of junk and my internet connection is crap
bgamari has joined #nixos
<exarkun>
so, yea, in an hour or so I can take the next step in that direction :/
<srhb>
exarkun: You should be able to just get the drv of ghc with nix-instantiate. That should suffice to tell you if you have the right one
<srhb>
exarkun: /nix/store/wl1b6il0yvl313cql1z5idkrakrdj0gz-ghc-8.6.5.drv is the right one for that commit of nixpkgs.
levdub has joined #nixos
cole-h has joined #nixos
pbb_ has joined #nixos
Ariakenom has quit [Quit: WeeChat 2.7]
pbb has quit [Ping timeout: 272 seconds]
<exarkun>
srhb: How did you determine what the "correct" (the object that's on cache.nixos.org, I guess) store object is?
<{^_^}>
[nixpkgs] @Mic92 pushed 2 commits to release-20.03: https://git.io/JvNja
levdub has quit [Ping timeout: 240 seconds]
leothrix has joined #nixos
<srhb>
exarkun: There are two ways, the correct one is to check hydra evals for a given nixpkgs commit and look at the output path of the package
<exarkun>
on hydra.nixos.org?
<srhb>
exarkun: The wrong one, which I used, is to have great confidence in oneself and ones ability to not accidentally mess with a package without knowing, and just build it. (it's less scary because I knew it was substituted by hydra, so at least it had built it)
<srhb>
exarkun: Yeah
LysergicDreams has quit [Ping timeout: 265 seconds]
<exarkun>
okay, cool, thanks. so this nix-instantiate ...
soren89 has quit [Remote host closed the connection]
<srhb>
exarkun: Well, first off set up the NIX_PATH as your CI does, then nix-instantiate '<nixpkgs>' ghc
<exarkun>
ah
<srhb>
exarkun: This should not fail unless you have impurities very early in config/overlays
<exarkun>
`-A ghc`?
<srhb>
Yes, sorry.
<exarkun>
great. /nix/store/wl1b6il0yvl313cql1z5idkrakrdj0gz-ghc-8.6.5.drv which seems to be what you got above
knupfer has quit [Remote host closed the connection]
knupfer has joined #nixos
<srhb>
Indeed. So either the impurity is only on CI or you haven't reached the pollution yet.
* exarkun
nods
<srhb>
You'll have to move through the steps of your ci pipeline from here and try to determine where it happens. :)
sigmundv_ has quit [Read error: Connection reset by peer]
morgrimm has quit [Ping timeout: 264 seconds]
sigmundv_ has joined #nixos
wasi_ has joined #nixos
<exarkun>
Okay. So the next step is to activate a shell that has stack and haskell.nix... That step now wants to build ghc 8.4.4. That's annoying, although it's not the thing that fails to build on CI.
<exarkun>
Ah, it also wants to build /nix/store/7ax8611l2m2zqq6dz6vz3hw63kwvi8s0-ghc-8.6.5.drv which is the mismatched path I gave above (that CI sees)
<exarkun>
yea
zupo has joined #nixos
selfsymmetric-mu has joined #nixos
<selfsymmetric-mu>
What's the best way to run a Windows VM in NixOS? I was going to use VMWare but it looks like NixOS does not support hosting? https://github.com/NixOS/nixpkgs/issues/56814
<andi->
selfsymmetric-mu: libvirt either with virt-manager or through gnome-boxes
<andi->
gnome-boxes actually has a very user-friendly UI
o1lo01ol1o has quit [Remote host closed the connection]
noj has quit [Ping timeout: 252 seconds]
<selfsymmetric-mu>
andi-: Thanks! So I install just `gnome-boxes`, which pulls in `libvert`?
oranginal has joined #nixos
o1lo01ol1o has joined #nixos
<andi->
selfsymmetric-mu: you want to enable `virtualisation.libvirtd.enable` and then add gnome-boxes to your system.
wasi_ has quit [Quit: Leaving]
erictapen has joined #nixos
<selfsymmetric-mu>
andi-++
<{^_^}>
andi-'s karma got increased to 25
<andi->
,locate bin gnome-boxes
_e has joined #nixos
<{^_^}>
Found in packages: gnome3.gnome-boxes
<andi->
^ selfsymmetric-mu that is the correct package name
<andi->
selfsymmetric-mu: be aware of the virtio driver installation story with Windows. Once you are through that rabbit hole it actually works decently.
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
domogled has quit [Quit: domogled]
noj has joined #nixos
<betaboon_>
grahamc[m]: just trying out lorri. do i have to run `lorri shell` when i am using the lorri-daemon?
zupo has joined #nixos
<oranginal>
Hello, Nixos folk. I was wondering if someone could guide me in helping packages get updated as soon as possible.
o1lo01ol1o has quit [Ping timeout: 256 seconds]
<evils>
oranginal: not sure what you're looking for, there's a bot that does updates based on repology.org
<oranginal>
One of my packages (protonmail-bridge) hasn't been updated, for example.
leotaku has quit [Ping timeout: 258 seconds]
<oranginal>
And I'm not sure how to help it... get updated/
morgrimm has joined #nixos
<oranginal>
Correction: A package I use. It isn't mine.
<evertedsphere>
does anyone have recommendations for a simple, easy-to-configure system stats daemon/service with a nice UI frontend
<evertedsphere>
i've been using netdata but curious what else is out there
<evils>
oranginal: so if you simply want it updated right now, i'd suggest making a PR yourself
knupfer has quit [Quit: knupfer]
<qyliss>
there's a PR open
<qyliss>
the thing oranginal to do would be to test the PR, and post a comment saying if the new package is working okay
knupfer has joined #nixos
<oranginal>
evils: I did, actually. Just don't totally understand how to help you with the PR.
knupfer has quit [Client Quit]
<qyliss>
oh, you opened the PR?
<oranginal>
Yep.
knupfer has joined #nixos
<qyliss>
In that case, the best way to help would be to find somebody else to test it for you
<qyliss>
You could also post it in the "PRs ready for review" thread on Discourse if you haven't already
<evils>
i'm not sure why the bot doesn't pick it up, could be because the version has a `-1` appended and that doesn't seem to be the number protonmail-bridge releases
<oranginal>
Also, dunno if it matters, but on repology, the link to this package's repo on github brings 404.
<oranginal>
evils: I was wondering about that.. I use sha256sum after downloading the debpkg.
<evils>
you want nix-prefetch-url, which will give you the hash/format we use, `0iy2x9qnvhqrv6df0mjmxss9jddd64gh8wbadkn0cvrczcbwkz9l`
<evils>
,tofu oranginal
<{^_^}>
oranginal: To get a sha256 hash of a new source, you can use the Trust On First Use model: use probably-wrong hash (for example: 0000000000000000000000000000000000000000000000000000) then replace it with the correct hash Nix expected. See: tofu-vim
<qyliss>
evils: sha256sum-format hashes are allowed
<qyliss>
nothing wrong with them
<evils>
qyliss: oh, nice
<oranginal>
So does that mean my method would work fine?
<oranginal>
Or should I update the hash with a different one?
<qyliss>
I haven't checked your hash but it sounds like it should be fine
jumper149 has joined #nixos
lord| has quit [Read error: Connection reset by peer]
<evils>
the hash works, the package doesn't
<evils>
substitute(): ERROR: file '/nix/store/q6la212lbzcq740sznjayi3a4s3sf9v9-protonmail-bridge-1.2.6-1/share/applications/ProtonMail_Bridge.desktop' does not exist
<oranginal>
Okay. How had you pulled that for testing, by the way? Nixos-review?
<oranginal>
Pretty sure you can comment that... thought I saw that capability yesterday.
<evils>
oranginal: jup, you may want to check the results of the bot (says the same, but will tell you if you managed to fix it if you don't have a working setup to build your PR)
<__monty__>
How do I backport a PR? Do I just rebase it on nixos-x.y?
<__monty__>
qyliss: And which branches are sensible to backport to?
<gchristensen>
LnL++
<{^_^}>
LnL's karma got increased to 30
<blackriversoftwa>
Hi, does anyone know of an example in nixpkgs of a package where `CMakeLists` is under `cmake/` or something like that in the fetched source rather than in the root of the source?
selfsymmetric-mu has quit [Remote host closed the connection]
<qyliss>
__monty__: 19.09 and 20.03 at minimum
<evils>
oranginal: since i can't seem to comment line 58, they seem to have changed that .desktop file to lowercase
<__monty__>
For example, this PR only affects darwin, I assume I shouldn't bother backporting to nixos branches?
<blackriversoftwa>
I'm trying to figure out how to get the cmake build hook to look in the right place for `CMakeLists.txt`
<qyliss>
I usually do every branch it applies cleanly to, but most people don't bother
<qyliss>
__monty__: only the release-* branches
<qyliss>
the others are just channels
<oranginal>
evils: Will do.
wildtrees has joined #nixos
<LnL>
__monty__: rebase and target the release-* branch, those are used for all the release channels
Thra11 has joined #nixos
o1lo01ol1o has quit [Remote host closed the connection]
<LnL>
__monty__: also use cherry-pick -x so your commits have references to their master counterpart
<__monty__>
Ok, thanks. qyliss++ LnL++
<{^_^}>
LnL's karma got increased to 31, qyliss's karma got increased to 47
reallymemorable has quit [Quit: reallymemorable]
drakonis has joined #nixos
morgrimm has joined #nixos
linarcx has quit [Read error: Connection reset by peer]
cybrian has joined #nixos
Parra has quit [Remote host closed the connection]
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<raboof>
would it be crazy to have something like 'nix-shell' but with isolation features? Like being able to toggle network access, read or read-write access to (parts of) /home, things like that? or is there already another more convenient tool for this? 'docker' alone isn't really it :D
chloekek has joined #nixos
<thibm>
raboof: unshare can restrict network access, at least
<danderson>
I think that would be a very interesting tool, personally!
<{^_^}>
[nixpkgs] @doronbehar opened pull request #84495 → gmailctl: init at 0.6.0 → https://git.io/JvAfA
<danderson>
linux gives you all the primitives you need for that kind of control, and it would be an interesting new take on containerization
<danderson>
(vs. the cookie cutter "docker all the things" that most of the world settled on)
<qyliss>
guix has this
<qyliss>
I think
<qyliss>
'guix container'
<qyliss>
(I've never used it)
<danderson>
I guess nixos kinda-sorta has this with nixos containers as well, although probably not as flexible as the nix-shell you're envisioning
<thibm>
Speaking of containers, are there mature solutions to declaratively manage containers (or even VM) on a NixOS? Asbtractions to build networks, manage disks, properly start/stop containers.
kaliumxyz has quit [Remote host closed the connection]
<thibm>
I tried nixos-containers a few times a year ago but it seemed to be focused on imperative management. I ran into errors when starting/stopping declarative containers, IIRC there is a limit on number of containers, etc
<drakonis>
there's podman on nixpkgs but no module has been merged, so its largely useless on its own
<drakonis>
(not without extra effort)
<thibm>
It seems that there is more today: docker-containers, lxd-containers. I do not remember of those, or they were WIP
<thibm>
drakonis: a .nix file in someone's public configuration would be fine if it's just work :)
<{^_^}>
[nixpkgs] @JohnAZoidberg pushed 3 commits to master: https://git.io/JvAJ7
<evertedsphere>
nixery perhaps
<thibm>
I'm talking about managing containers a running server(s). Like handling 10 containers (or VM) on a machine connected to the network
<bqv[m]>
does anyone here use wireguard
<bqv[m]>
if so, can i see a setup
cfricke has joined #nixos
<bqv[m]>
(should i look into disnix, or....?)
<danderson>
bqv[m]: I use wireguard as part of Tailscale (shilling alert!), so I don't have configs to share, but if you have a topology or questions in mind I'm happy to help
<bqv[m]>
ah ok. i don't need a host or anything, i can just build my own network, i'm just wondering how best to do it through nix
<gchristensen>
it effectively makes a mesh
<danderson>
yeah, sounds about right, that should do the trick
<bqv[m]>
gchristensen: that looks fantastic, thank you
<bqv[m]>
(i'm basically trying to replace my tinc mesh with wireguard
<gchristensen>
cool
acarrico has joined #nixos
zeta_0 has joined #nixos
<gchristensen>
it doesn't actually make a mesh, though, peers are only joined when at least one of the peers has a listed endpoint
lord| has joined #nixos
<danderson>
I'll shill one last time, but that's pretty much exactly what tailscale does - builds a mesh VPN out of wireguard tunnels. Also features NAT traversal and TCP fallback, which plain wireguard doesn't offer
<gchristensen>
so mac6 and mac7 don't have a connection to each other
<danderson>
gchristensen: so, more like a dense tree structure?
<danderson>
the macs all connect out to many nodes, but not to each other?
<gchristensen>
yeah I suppose so
<gchristensen>
right
<danderson>
makes sense
<gchristensen>
not on purpose, they're trying to talk to each other, but neither of them have an endpoint to initiate through :)
Darkmatter66_ has joined #nixos
<danderson>
heh, a problem I'm intimately familiar with :)
<bqv[m]>
danderson: i don't need NAT traversal
<bqv[m]>
there's always at least one machine with a reachable address
<bqv[m]>
if i go by my tinc mesh
<danderson>
sure, but that means you're routing your traffic through other nodes, rather than going p2p
<gchristensen>
that said, I actually don't really want that much of a mesh here. I'd rather have a more controlled network set up. ike has no reason to be able to talk to macN
<danderson>
I guess tinc upgrades to p2p tunnels when it can, but wireguard won't do that
<zeta_0>
hey guys, where would place this overrides attribute(line 32) to remove that error: cannot coerce a function to a string , i've tried moving the brackets around so it's not taken as input to buildInputs, but that just causes syntax errors? https://dpaste.org/hser
<{^_^}>
[nixpkgs] @kalbasit pushed to master « bazel-gazelle: init at 0.20.0 (#84222) »: https://git.io/JvAUn
dsg has joined #nixos
learnday20 has joined #nixos
<zeta_0>
well, if i can't get that to work, i modified another default.nix that jackdk helped me with yesterday: https://dpaste.org/AkcZ
qrnteen has joined #nixos
<zeta_0>
ya, this default.nix automatically uses cabal2nix, and works in the nix-shell without throwing errors, so i guess i'm going to give up on my the 1st default.nix file that i paste binned
<zeta_0>
i was able to build ghc with nix, without too much problems, but darcs and xmonad lack documentation for nix support, so it was a struggle for me, anyways, i'm going to focus on building xmonad with nix now in a nix-shell, i hope it's not as difficult to setup a default.nix configuration in a nix-shell as darcs was
knupfer has quit [Quit: knupfer]
knupfer has joined #nixos
shafox has quit [Remote host closed the connection]
switchy has quit [Remote host closed the connection]
energizer has quit [Quit: ZNC 1.7.0+deb0+xenial1 - https://znc.in]
gleber__ is now known as gleber_
teozkr__ is now known as teozkr_
snajpa- is now known as snajpa
sevanspowell_ is now known as sevanspowell
r0bby_ is now known as r0bby
zertox_ is now known as zertox
heatm1s3r_ is now known as heatm1s3r
nikita`_ is now known as nikita`
dukedave_ is now known as dukedave
cbarrett_ is now known as cbarrett
hexo_ is now known as hexo
switchy has joined #nixos
<hoplaahei>
Is it safe to ctrl-c a compilation after running rebuild-switch, reverting to the older configuration.nix and running rebuild-switch again? Or do I need to rollback the nixstore manually?
cybrian has joined #nixos
<srk>
safe, switch is done atomically after everything compiled
hexagoxel has quit [Ping timeout: 264 seconds]
<lordcirth>
Nothing in the nix store gets mutated once written
<bqv[m]>
theoretically
<bqv[m]>
i've broken that rule a few times >_>
hexagoxel has joined #nixos
<lordcirth>
Yes, it is possible to manually tinker, of course
waleee-cl has quit [Quit: Connection closed for inactivity]
<blackriversoftwa>
How can I get cmake packages to put exported `.cmake` files somewhere in their output? I am trying to build something that depends on `protobuf` but expects to find it via CMake's `find_package`, and the nixpkgs derivation for `protobuf` does not install the `.cmake` files for protobuf anywhere
cybrian has quit [Ping timeout: 260 seconds]
ericsagnes has joined #nixos
<hoplaahei>
ok that's good to know.
<dminuoso>
I have a binary `teamviewer` in my profile and I have absolutely no clue why its there. How can I figure out how to remove it?
<cole-h>
Does it appear in the output of `nix-env -q`?
<dminuoso>
cole-h: It does. Is there a more general approach to just take `/nix/store/sqlr3diz84fpvnbb24935lcdy5m1lbla-teamviewer-14.5.1691` and ask which thing is depending on this?
<bqv[m]>
might be in users.users.you.packages
<betaboon_>
tazjin: problem resolved :)
<cole-h>
To remove it, you should be able to run `nix-env -e teamviewer`
damoniceht has quit [Remote host closed the connection]
<dminuoso>
Right, cheers. Still though, does nix have the necessary tools to explicitly tell me why something is installed?
pbb has joined #nixos
<AmandaC>
If it shows up in -q, it's installed because you `nix-env -i`'d it
<AmandaC>
or something running as you did
zeta_0 has left #nixos ["rcirc on GNU Emacs 26.3"]
bastion-- has joined #nixos
satoshi has quit [Ping timeout: 250 seconds]
energizer_ is now known as energizer
reallymemorable has joined #nixos
<dminuoso>
Right.
<Orbstheorem>
How can I override a package from an include of my configuration.nix? I have `includes = [foo.nix];` in my configuration.nix and file `foo.nix` has `config.nixpkgs.config.packageOverrides = p: { pass = assert false; p.pass.override {...}; };`. The assertion is not evaluated upon rebuild, if I put it after `p: ` the assertion fails as expected. I do include `pass` in `environment.systemPackages`.
<dminuoso>
Relatedly, how can I see what git commit a channel points at?
waleee-cl has joined #nixos
<srhb>
dminuoso: The easiest way is probably to checkout the corresponding branch from nixpkgs-channels repo.
<dminuoso>
srhb: I meant locally.
<{^_^}>
[hydra] @Ma27 opened pull request #731 → Fix build against nix master → https://git.io/JvATu
<srhb>
dminuoso: Ah. iirc NIX_PATH includes names for each channel somehow?
<srhb>
dminuoso: So you can nix eval -f thatName lib.version or something like that
<Orbstheorem>
dminuoso: you can `sudo cat /nix/var/nix/profiles/per-user/root/channels/nixos/.version`, but that only includes the release
<cole-h>
`nix-instantiate --eval '<nixpkgs/lib>' -A version` might do it
<{^_^}>
[nixpkgs] @jonringer pushed commit from @r-ryantm to master « python27Packages.cbor2: 5.0.1 -> 5.1.0 »: https://git.io/JvATA
<DamienCassou>
I've installed nixos in a gnome box. Everything seemed to be normal but now nix commands never finish. For example `nix-rebuild build` or `nix search firefox` use 100% CPU but don't produce any output
<DamienCassou>
I'm on nixos-unstable channel
<DamienCassou>
with a configuration.nix very similar to the default one
asheshambasta has quit [Ping timeout: 272 seconds]
<{^_^}>
[nixpkgs] @jonringer pushed commit from @r-ryantm to master « python27Packages.carbon: 1.1.6 -> 1.1.7 »: https://git.io/JvAkL
<Emantor>
Not sure how to help you there. Maybe breakage in the current nixos-unstable release ISO image? Or did you install from stable and switch to unstable?
<DamienCassou>
Emantor: I installed from stable, replaced the nixos channel with the unstable one, rebuilt, successfully rebooted and now it doesn't work
witchof0x20 has quit [Ping timeout: 246 seconds]
ben has quit [Ping timeout: 246 seconds]
<srhb>
DamienCassou: How long have you given these commands?
<srhb>
DamienCassou: (That is, I suspect it's working, and possibly consuming a lot of memory, and possibly even swapping, and taking a Real Long Time)
<{^_^}>
[nixpkgs] @jonringer pushed commit from @r-ryantm to master « python37Packages.ase: 3.19.0 -> 3.19.1 »: https://git.io/JvAIO
o1lo01ol1o has joined #nixos
<peelz>
if I do this, it doesn't get called with the proper params: callPackage (args: (wrappedFn args) // overrides)
<peelz>
so I have to do this instead (brittle and ugly): callPackage ({ lib, config, pkgs, ... }@args: (wrappedFn args) // overrides)
<srhb>
peelz: Depending on your use case, a regular override/overrideAttrs might be nicer -- but it depends on your use case. Your latter example seems to be a reasonably common pattern
<peelz>
srhb, but wrappedFn is just a function here. It doesn't have an `.override` or `.overrideAttrs`
dsx has joined #nixos
captjakk has joined #nixos
levdub0 has joined #nixos
<srhb>
Oh, meh.
<bqv[m]>
peelz: what does it do?
<bqv[m]>
can you do what wrappedFn does using override instead?
<peelz>
bqv[m]: well I'm trying to wrap a module so that I can override specific attributes from it. The problem is that I'm not the one doing `callPackage` on it. It's passed to some other option that evaluates it later on.
<bqv[m]>
wrappedFn could be (package: args: (args.callPackage package {}).overrideAttrs { blah })
<bqv[m]>
then you can call wrappedFn on the thing that gets passed to callPackage, and the second callPackage should work?
<bqv[m]>
disclaimer: i'm somewhat tired
cybrian has joined #nixos
<peelz>
hah no problem
<peelz>
I think you got it backwards though
<peelz>
hold on, I'll give you a more concrete example
<{^_^}>
[nixpkgs] @jonringer pushed commit from @r-ryantm to master « nfdump: 1.6.19 -> 1.6.20 »: https://git.io/JvALT
eoli3n__ has quit [Ping timeout: 256 seconds]
morgrimm has joined #nixos
Darkmatter66_ has quit [Ping timeout: 265 seconds]
erictapen has joined #nixos
Darkmatter66 has joined #nixos
morgrimm has quit [Ping timeout: 265 seconds]
captjakk has joined #nixos
<jared-w>
virtualbox doesn't work on linux 5.6. yey
<DamienCassou>
srhb: Emantor it seems a new install from a nixos-unstable iso works much better
<lordcirth>
Yeah, I've been moving to virt-manager, Vbox keeps breaking
<etu>
jared-w: Broken on 5.5 as well :/
erictapen has quit [Ping timeout: 240 seconds]
<jared-w>
etu: darn
<DamienCassou>
jared-w: I've had bad experience with VirtualBox for some time. Switching to Gnome Boxes was a breath
<jared-w>
The reason I wanted to use virtualbox is I want to test building a vbox VM for use with gitlab as a runner
<jared-w>
If I just wanted a VM I'd use something else lol
<jared-w>
Guess I'll just have to ssh into a VM somewhere and use that as my dev box. Ah well
<etu>
jared-w: I'm especially annoyed because my intel graphics is broken on 5.4 (it was fine on 5.3), I need vbox for work, so had to fall back to 4.19 lol :p
<energizer>
is there a record of how long each build took?
<jared-w>
etu: That sucks lol. I updated to 5.6 to try and fix my wifi on 5ghz. Turns out it's still broken; the AX200 just doesn't work past a certain wifi speed and completely falls over so I need to stay on a slow 2.4ghz network which is just killing me
<jared-w>
But I need linux kernel 5.1+ because of it, so I might as well be on the latest one. And I have perpetual vague issues with nvidia drivers just not behaving as well as they should because nvidia is nvidia *sigh*
<srhb>
energizer: No.
arjen-jonathan has quit [Ping timeout: 265 seconds]
<zeta_0>
quick question, in a haskell package will the developPackage function in default.nix automatically run cabal2nix with the .cabal file of the project?
<jjwatt[m]>
cool. It's set up for python 3.8, and even running `py.test` in the hy dir seemed to work, passing most tests except when it gets to 'hy2py' which is another script built by the setup.py entrypoints
<jjwatt[m]>
you should be able to just s/38/36/g or whatever if you want to switch python versions
pjt_014 has joined #nixos
<ratsclub>
You've just saved so much time for me, dude
<ratsclub>
I can't thank you enough
<jjwatt[m]>
well, let's see if it works first ;)
<jjwatt[m]>
"WFM" right now
<ratsclub>
it's building, let's see
wheatdog[m] has joined #nixos
<jjwatt[m]>
let me commit the hackish hy-release.nix I'm working on, too, to that same repo. I was at the point of looking up how to do the `nix-build` outside of `nixpkgs` again, so I'm not sure if it works at all yet. You should be able to "install" it with this.
<{^_^}>
[nixpkgs] @jonringer pushed commit from @r-ryantm to master « python27Packages.lark-parser: 0.8.2 -> 0.8.5 »: https://git.io/JvAt2
<ratsclub>
I'll try something here
<zeta_0>
it was just a quick question? i'm wondering because the nix-shell worked without me manually having to run cabal2nix?
<srk>
energizer: tbh I'm not quite sure if snack does exactly that
syd has joined #nixos
<jjwatt[m]>
ratsclub: Probably because my dir is different? Oh and if you cloned mine you need to get the submodules! `git submodule update --init hy`
<ratsclub>
I'll try to clone yours. I'm sorry I'm not used to the nix language as you guys are
<jjwatt[m]>
then make sure there are files in the 'hy/' dir. if you just use the shell, then you need to cd to *some* git checkout of `hy` even if it's not mine, but your python env is setup, but `hy` is *not* installed in the system, ya know?
<jjwatt[m]>
I'll try to get the derivation working real quick. that might be easier if you want to install it
<jjwatt[m]>
ratsclub: hah. I'm still learning, too, my friend. Maybe one or two months into it.
<syd>
Can anybody explain what mkIf and mkMerge are?
<ratsclub>
jjwatt[m]: I should open an issue too as python2 is deprecated already...
<jjwatt[m]>
ratsclub: Yeah, not sure why their hy is so old or why it's using python2! maybe when they made it hy wasn't working with 3 yet and so just stuck with 2 for stability.
<jjwatt[m]>
If you open an issue, shoot me the #. Maybe I can submit a PR behind that
<simpson>
jjwatt[m]: The short answer is that the port from Python 2 to Python 3 is non-trivial; they are effectively different languages. So many chunks of software are either not ported, or never porting. A good example is PyPy, which is written in Python 2 and plans to never port because they can support their own self-hosting.
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ratsclub>
simpson: Hy supports python3 but our current version on nixpkgs don't
<simpson>
ratsclub: Ah. Probably not any motivated reason; we can't automatically import updates from PyPI upstream, and most packages don't have folks watching out for them.
<jjwatt[m]>
ratsclub: let me go ahead and do the prefetch thing and get the sha and all that so the derivation isn't installing it from a local directory. then you can drop it into your nixpkgs/ and/or it will be closer to being fit for a PR.
<simpson>
ratsclub: That commit was authored by our overworked Python maintainer; they probably did not have the patience to do the research to see that there may be newer versions of Hy, let alone test them. (See also: All of the disabled tests in the Python packages!)
<jjwatt[m]>
ratsclub: Is there a certain version of hy that I should use? Mine was just using head. Is there an 0.18 release?
<{^_^}>
[nixpkgs] @jonringer pushed commit from @r-ryantm to master « python27Packages.denonavr: 0.7.12 -> 0.8.1 »: https://git.io/JvAtQ
<ratsclub>
jjwatt[m]: I'm not in a hurry. Take your time to do it, mate
maddo has quit [Quit: See ya]
<simpson>
(And TBH I've been in that position too, where I'm fixing something in the Python tree but I don't really care about what it is that I'm fixing or why it's broken.)
<ratsclub>
jjwatt[m]: I think the latest release is 0.18.0
<ratsclub>
simpson: I see. I would fix it myself if I knew how to do it so heh
LysergicDreams has quit [Ping timeout: 265 seconds]
<Kyndig>
Would someone mind telling me what is the cannonical way to find the attribute name of a currently installed (in my user profile) package? nix-env -qP just seems to show the symbolic names only...
LysergicDreams has joined #nixos
<symphorien>
you can't
<Kyndig>
hmm; i was afraid of that
<symphorien>
if you want to switch to declarative user packages, home-manager is great
<zeta_0>
clever: hello again, when i removed the darcs.env option, i was able to get the cloned darcs repository working fine in a nix-shell and was able to build darcs as well, i think it's because the darcs.env option tries to build darcs with cabal 2.4, when it needs to be 3.0, and one of the other programmers told me that the developPackage function automatically runs cabal2nix by itself
<Kyndig>
thx symphorien; I guess that works as long as I happen to know one of the paths that the package provides in my profile
cybrian has quit [Ping timeout: 260 seconds]
<Kyndig>
but if I don't, then I'm stuck
<{^_^}>
[nixos-homepage] @garbas pushed to redirect-old-urls « set root explicitly, fixes #354 »: https://git.io/JvAtp
<symphorien>
the path is written in nix-store --query --references ~/.nix-profile
<Kyndig>
I suppose it's one of the reasons home manager is popular
<Bunogi>
Hi, I'm having sudden issues with nixos-rebuild again. I had an issue where it would return an error saying that some NAR file is corrupt. It worked on an earlier derivation but it was still broken. I did a fresh reinstall, slapped in my old configuration.nix and after it's done and I've booted to the newly installed system, it gives me the same
<Bunogi>
error
<zeta_0>
gchristensen simpson : thank you for the links, i'm trying to find out if the developPackage function automatically runs cabal2nix on it's own? i'll take a look at the documentation right now
<Kyndig>
ahh, yes, that's much more helpful, nix-store --query --references ~/.nix-profile
<Kyndig>
thank you
<hoplaahei>
Can anyone give me a clue to the syntax to strip an existing package of some files I don't want installed? It seems packageOverrides is deprecated and overlays are the answer. I want to rm /usr/lib/firefox/browser/features/*.xpi postinstall of firefox package.
<gustavderdrache>
symphorien: so i was right after all :P
<symphorien>
:)
<{^_^}>
[nixos-homepage] @garbas merged pull request #380 → redirect old urls which are found by analytics → https://git.io/Jvbck
<{^_^}>
[nixos-homepage] @garbas pushed to master « redirect old urls which are found by analytics (#380) »: https://git.io/JvAqT
<{^_^}>
[nixos-homepage] @garbas pushed 0 commits to redirect-old-urls: https://git.io/JvAqk
<gustavderdrache>
i keep forgetting that headers exist
<jjwatt[m]>
ratsclub: weird. the build for 0.18.0 is failing. It could have been something in hy's dist! ```ERROR: Could not find a version that satisfies the requirement colorama (from hy==0.18.0) (from versions: none)
<jjwatt[m]>
ERROR: No matching distribution found for colorama (from hy==0.18.0)``` I'll need to dig into it a little more as 1. I'm still including it and 2. It was working with hy's HEAD
<zeta_0>
oh, so source-overrides, is used as a workaround to solve version mismatches, that's good to know
dermetfan has joined #nixos
teto has quit [Ping timeout: 265 seconds]
<jjwatt[m]>
ratsclub: ah that might be my bad. 38 might be too new. Going to get it working, but might wait until after dinner ;)
<ratsclub>
jjwatt[m]: it worked for on <3.7 but 3.8 failed
<ratsclub>
well it seems you saw that too now haha
<{^_^}>
[nixpkgs] @jonringer pushed commit from @r-ryantm to master « faudio: 20.03 -> 20.04 »: https://git.io/JvAqm
<ratsclub>
jjwatt[m]: I'll get some sleep as it's late night here where I am. We can use the issue to talk more about this. What you think? See you!
ratsclub has left #nixos ["ERC (IRC client for Emacs 26.3)"]
cosimone has quit [Quit: Quit.]
<jjwatt[m]>
ratsclub: Yep! sounds good. talk to you soon.
<zeta_0>
simpson: ya, in the expression of the developPackage function, it runs .callCabal2nix, so i'm pretty sure it does, that's nice not having to always manually run cabal2nix, it can get tiring after a while
<kraem>
can i avoid building numpy from src in any way? tried `nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs-channels/archive/nixos-19.03.tar.gz` as well as `fetchPypi { ... }` in shell.nix
<kraem>
or maybe it's just the tests running? i don't have much experience with the python domain
<{^_^}>
[nixpkgs] @doronbehar opened pull request #84515 → ecryptfs: enable building without python2 support → https://git.io/JvAq6
lsix1 has quit [Ping timeout: 260 seconds]
cr4y1 has quit [Remote host closed the connection]
* jared-w
finally figures out why he constantly misspells virtualiZation in nixos configs
<energizer>
kraem: you want a version of numpy that's not in nixpkgs?
<Bunogi>
Looks like if you add a binary in configuration.nix and remove it later, everything breaks? Is this a known problem?
<kraem>
energizer: no i'm trying to import pkgs.python35Packages.numpy in my shell
linarcx has quit [Ping timeout: 240 seconds]
<energizer>
kraem: i wouldnt expect you to have to build that yourself, hydra shouldve already done it
zeta_0 has left #nixos ["rcirc on GNU Emacs 26.3"]
<energizer>
like https://bpaste.net/2JXQ i'm using 2.7 in this example because i already had 3.5's numpy installed but 2.7 i didn't so it downloaded. but either way i didn't have to buidl it
domogled has quit [Quit: domogled]
levdub3 has joined #nixos
levdub9 has joined #nixos
<energizer>
that's in a `nix repl '<nixpkgs>' `
levdub has quit [Ping timeout: 265 seconds]
levdub9 is now known as levdub
never_released has quit [Quit: ZNC 1.7.5 - https://znc.in]
cr4y1 has joined #nixos
levdub3 has quit [Ping timeout: 260 seconds]
never_released has joined #nixos
<kraem>
energizer: ah that's right, pandas and numpy seem to have a lot of deps that requires building
<kraem>
thanks - i'll let them run and see where i end up :)
<energizer>
kraem: if you're using the nixpkgs version you shouldn't have to build them yourself. otherwise you will. i built them a few weeks ago on a non-nixpkgs version and iirc it took like 30 minutes on a pretty beefy machine
<energizer>
tho scipy and sklearn were in the mix too so idk
gustavderdrache has quit [Quit: Leaving.]
cr4y1 has quit [Remote host closed the connection]
<kraem>
energizer: hm, weird. from what i understand i'm using the pkgs version here, right? https://bpaste.net/G3TQ
cr4y1 has joined #nixos
<{^_^}>
[nix] @knl opened pull request #3476 → Rename download to filetransfer → https://git.io/JvAmO
fusion809 has quit [Remote host closed the connection]
<{^_^}>
[mobile-nixos] @samueldr pushed 10 commits to doc/improvements: https://git.io/JvAmE
<samueldr>
wrong remote dang it
<{^_^}>
[mobile-nixos] @samueldr pushed 0 commits to doc/improvements: https://git.io/JvAmu
lovesegfault has quit [Quit: WeeChat 2.8]
lovesegfault has joined #nixos
pbogdan has quit [Remote host closed the connection]
<kraem>
energizer: still builds. was thinking it could be the override in line 5 so i rewrote it to https://bpaste.net/JRCA and it still built. as soon as i remove pandas it doesn't build, so maybe pandas isn't cached
<{^_^}>
[mobile-nixos] @samueldr opened pull request #122 → doc: Add options listing and other fixes → https://git.io/JvAmo
knupfer has quit [Quit: knupfer]
knupfer has joined #nixos
knupfer has quit [Client Quit]
knupfer has joined #nixos
pbogdan has joined #nixos
<abcdefgnix>
Hello all! My default.nix for a Haskell project doesn't seem to be respecting it's overlays (I'm probably setting them wrong somehow). I created a minimal github repo with the shortened console output and linked to the places where I think I defined what nix said is missing here:
<kraem>
energizer++ figured it out. as i said; not well versed with python. apparently python 3.7 seems to be the latest and greatest, python37Packages seems to have it all cached.
<{^_^}>
energizer's karma got increased to 2
shabius_ has joined #nixos
freeman42x has joined #nixos
levdub has quit [Ping timeout: 265 seconds]
levdub1 is now known as levdub
shabius_ has quit [Max SendQ exceeded]
shabius_ has joined #nixos
shabius has quit [Ping timeout: 265 seconds]
<abcdefgnix>
Does callCabal2Nix require you to pass it an overlay somehow or should it inherit it?
<hexagoxel>
Why do so many tutorials for this "pure" language start by telling you to change your global environment by installing some stuff into it? Does this not defeat the whole purpose?
<logand>
hmm /run/current-system/sw/share/emacs/site-lisp/elpa does not exist anymore after rebuild-switch, something is wrong with emacsWithPackages
<hexagoxel>
It makes sense from a nixos/package-manager-like perspective. But if your goal is a reproducable dev environment, I don't understand it.
<logand>
hexagoxel: there are many ways to manage packages in nixos
<simpson>
hexagoxel: Which language? You might be able to nix-shell it.
<jackdk>
I think because a lot of people coming to a package "just want to get things done" if they're haven't yet bought into the nix way
domogled has joined #nixos
domogled has quit [Client Quit]
knupfer has quit [Ping timeout: 260 seconds]
<hexagoxel>
there seem to be many ways to do anything in nix..
* hexagoxel
is a bit frustrated, sorry
<simpson>
hexagoxel: Sorry if I'm asking you to repeat yourself; I don't see your messages in scrollback. What are you working on, and what have you tried so far?
<simpson>
You can imagine all of those nix-env as nix-shell instead (if you do the work to change all of the flags, because they have totally different flags) and then you'll get temporary local actions instead of altering your environment.
LysergicDreams has quit [Ping timeout: 240 seconds]
<hexagoxel>
I am trying to set up an environment that has a specific compiler version and the packages of one stackage lts in scope.
<hexagoxel>
trying out haskell.nix atm, not sure if that is clever.
<simpson>
Might be. A lot of folks have worked on Haskell environments. It seems to be something of a rite of passage.
LysergicDreams has joined #nixos
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<hexagoxel>
(oh, it is bootstrapping another ghc. no, thanks.)
snicket has quit [Ping timeout: 240 seconds]
xkapastel has quit [Quit: Connection closed for inactivity]
<hoplaahei>
Is this the correct way to strip some files from firefox? I have tried to override firefox-unwrapped, as firefox seems to depend on it. Also, it keeps generating a complete pull and rebuild of firefox sources. Is this normal?
<{^_^}>
[nixpkgs] @jonringer pushed commit from @r-ryantm to master « libgit2: 0.99.0 -> 1.0.0 »: https://git.io/JvAY6
o1lo01ol1o has joined #nixos
<ottidmes>
hoplaahei: it does not append
LysergicDreams has quit [Ping timeout: 256 seconds]
<hexagoxel>
(now it is using the cached ghc. yay)
<cole-h>
hoplaahei: If you change anything that affects the derivation, it will trigger a local rebuild.
<ben>
when people tell me i need to update firefox immediately because of a security update, whats the right way to do that on nixos?
o1lo01ol1o has quit [Ping timeout: 250 seconds]
<Keith[m]>
Is there a way to embed a patch in a derivation file? writeText doesn't seem to be working for me
<ekleog>
ericsagnes: Hey! saw you in the maintainer list of ibus-anthy. Have you tried adding words to anthy's dictionary? From a cursory look, it looks like kasumi isn't being compiled, but maybe I'm starting to go down the wrong path?
philr has joined #nixos
<cole-h>
ben: You should just need to update your nixos channel
<cole-h>
If you're tracking nixos-19.09, the most recent version has the updated Firefox versions
<ben>
ah, i'm tracking nixos-unstable
<cole-h>
That channel is having issues building right now.
<hoplaahei>
cole-h: is there a way to override that? Or a safe way to purge files from the installed package?
<cole-h>
hoplaahei: Override as in don't trigger a rebuild?
<cole-h>
Removing your modifications to the derivation is the only way I know of.
<hoplaahei>
cole-h: yea, but ultimately I just want to purge some firefox addons I don't want on my system that Firefox does not let you remove from the addon interface
justanotheruser has quit [Ping timeout: 265 seconds]
<ben>
can you write a new derivation that uses the regular firefox derivation's output as its source, and just copy everything to your output except the files you want to delete?
<hoplaahei>
so I need to manually delete the contents of a dir Firefox looks in, but the system is read-only
<hoplaahei>
ben: if that is the correct way to do it then I will try
zeenk has quit [Quit: Konversation terminated!]
<cole-h>
hoplaahei: You can try overriding firefox-bin
<ben>
i dont want to speak for correctness but i think it might avoid rebuilds
captjakk has quit [Remote host closed the connection]
<cole-h>
Which will use Mozilla's preprocessed binaries. You might be able to stick a postInstall hook that removes the files, maybe.
<{^_^}>
[nixpkgs] @jonringer pushed commit from @r-ryantm to master « python27Packages.isbnlib: 3.9.10 -> 3.10.0 »: https://git.io/JvAOf
<{^_^}>
[nixpkgs] @Ma27 pushed commit from @Infinisil to release-20.03 « nixos/lib/test-driver: Fix require_unit_state hardcoded formatting »: https://git.io/JvAOT
<{^_^}>
[nixpkgs] @herrwiese opened pull request #84520 → zsh-nix-shell: init at (unstable-)2019-12-20 → https://git.io/JvAOk
zebrag has joined #nixos
jlv has joined #nixos
captjakk has joined #nixos
freeman42x has quit [Quit: Leaving]
justanotheruser has joined #nixos
<{^_^}>
[nixos-homepage] @garbas pushed to fix-383 « fix bad links, fixes #383 »: https://git.io/JvAO3
<{^_^}>
[nixos-homepage] @garbas opened pull request #384 → fix bad links, fixes #383 → https://git.io/JvAOG
<jlv>
Is there an easy way to turn a set of sets into a list of (namePath, value) tuples. Like, given a set structures such as `colors = { bg = "#000000"; completion = { category = { bg = "#000000"; } ... } ... }`, return a structure like `[ ("colors.bg", "#000000") ("colors.completion.category.bg", "#000000) ... ]`.
freeman42x has joined #nixos
otti0815 has quit [Ping timeout: 265 seconds]
erictapen has quit [Ping timeout: 256 seconds]
freeman42x has quit [Client Quit]
<jlv>
I could write a function to do it, but I'm hoping it is a common enough situation for a function to exist.
freeman42x has joined #nixos
<hexagoxel>
When doing `import <nixpkgs>`, what path is it actually importing?
<srk>
nix-instantiate --find-file nixpkgs
erictapen has joined #nixos
<ottidmes>
hexagoxel: it set on NIX_PATH
xkapastel has joined #nixos
kleisli has quit [Ping timeout: 258 seconds]
<ajs124>
I hacked up this thing the other day which can "clean" your src input, if upstream is using a .dockerignore file. Is anyone here interested in anything like that? If so, I can put a README in it and push it to github.
<hexagoxel>
Am I blind? The docs on builtins.import do not mention nix-instantiate or NIX_PATH. Am I looking at the wrong docs, or the wrong location?
<hexagoxel>
(I appreciate the answers nonetheless)
otti0815 has joined #nixos
kleisli has joined #nixos
<cjpbirkbeck>
hello, i've patched st to include a .desktop file, which the makefile moves to /usr/share/application . how would nixify it - move it in the installPhase?
LysergicDreams has quit [Ping timeout: 240 seconds]
LysergicDreams has quit [Ping timeout: 260 seconds]
LysergicDreams has joined #nixos
<jlv>
Does Nix not have a function to turn a set into a list of keys and values? There is `builtins.attrNames` and `builtins.attrValues`, but nothing like `builtins.attrNamesValues`.
<gchristensen>
good grief jlv no there isn't, and nixpkgs' lib doesn't either, and it drives me nuts!
mbrgm_ has joined #nixos
mbrgm_ has joined #nixos
mbrgm_ has quit [Changing host]
cosimone has joined #nixos
mbrgm_ is now known as mbrgm
<hexagoxel>
The correct answer to "When doing `import <nixpkgs>`, what path is it actually importing?" is: The path `<nixpkgs>`, where the super-builtin <> operator resolves a relative path relative to paths specified in NIX_PATH. See https://nixos.org/nix/manual/#ssec-values
cosimone has quit [Client Quit]
<manveru>
> let s = {a=1;}; in __concatLists (map (n: [n s.${n}]) (__attrNames s))
<{^_^}>
[ "a" <CODE> ]
<manveru>
not super awesome... but well
cybrian has quit [Ping timeout: 250 seconds]
cosimone has joined #nixos
<hexagoxel>
so yes, I was looking at the wrong docs.
<peelz>
> lib.mapAttrs (k: v: [ k v ]) { a = 5; }
<hexagoxel>
Sorry for rambling, but I hope it helps others or hints at what parts of the docs are unintuitive.
<{^_^}>
{ a = <CODE>; }
<peelz>
manveru: why not just this? ^
<manveru>
peelz: because that's no list
<peelz>
oh yeah woops
reallymemorable has joined #nixos
<manveru>
> let s = {a=1;}; in __concatLists (__attrValues (__mapAttrs (n: v: [n v]) s))
<{^_^}>
[ "a" 1 ]
<manveru>
would be that version
<{^_^}>
[nixpkgs] @veprbl pushed commit from @lovesegfault to release-20.03 « linuxPackages.nvidia_x11: 440.59 -> 440.64 »: https://git.io/JvAO5