<bew>
no you can't, that would defeat the point of a declarative config, it wouldn't be pure.. Either you force the IP in your config, or maybe sth else like first get the actual ip before starting the program that needs it (outside of nix, but you could use Nix to wrap the program)
pushqrdx has joined #nixos
gustavderdrache has quit [Quit: Leaving.]
<uhohqueenofTechl>
Can you declaratively patch any NixOS package?
<ajs124>
bpye: do all remote builds fail or only certain ones?
Vadrigar_ has joined #nixos
<uhohqueenofTechl>
<bew "what kind of patch? choose anoth"> Edit the source code
<bpye>
I have tried a few different targets in that flake - one of which is just pkgs.linuxKernelLatest and they all fail, but I could still use my x64 machine as a remote successfully
Vadrigar_ has quit [Ping timeout: 240 seconds]
<bpye>
I can recreate the VM and see but if it broke I would like to know how so I don’t do it again…
<uhohqueenofTechl>
Can I declaritively edit the source code of any nix package?
<ajs124>
bpye: I might have missed that, but did it use to work and just stop working or did it never work?
<ajs124>
uhohqueenofTechl: you can use an overlay and overrideAttrs
<bpye>
It was working previously, though I was using unstable - that failed when I added librespot as it didn’t seem to pull a cached cargo or anything and cargo-bootstrap failed, but also I don’t want to rebuild llvm - so I then switched to 20.09 in the flake and I’ve been unable to make that work
supersandro2000 has quit [Disconnected by services]
supersandro2000 has joined #nixos
<uhohqueenofTechl>
<ajs124 "uhoh, queen of Techlore - #👥•ch"> Can I do this in home manager?
<bpye>
ajs124 That said, unstable also doesn't work now
<bpye>
So I think my next thing will have to be to try a new VM...
<bpye>
Wait, huh, an earlier generation of the VM works, so it was the nixos-rebuilt --upgrade switch there that broke it?
<bpye>
Except now it thinks it has to build the linux kernel, whilst I'm pretty sure 20.09's linuxPackages_latest should be cached...
simba1 has quit [Ping timeout: 240 seconds]
haritz has quit [Quit: ZNC 1.6.5+deb1+deb9u2 - http://znc.in]
grimvar_ has joined #nixos
haritz has joined #nixos
haritz has quit [Changing host]
haritz has joined #nixos
<{^_^}>
[nixpkgs] @peti pushed to haskell-updates « hackage-packages.nix: automatic Haskell package set update »: https://git.io/JYZvH
grimvar has quit [Ping timeout: 252 seconds]
pushqrdx has quit [Quit: pushqrdx]
drsensor has joined #nixos
simba1 has joined #nixos
dsrt^ has quit []
vs^ has joined #nixos
uhohqueenofTechl has left #nixos ["User left"]
stree has quit [Ping timeout: 260 seconds]
Synthetica has quit [Quit: Connection closed for inactivity]
<citadelcore>
Hey all. Is there a way to evaluate a custom expression with `nix eval` when using a flake as the input?
<citadelcore>
I've looked at --apply, but it seems to be very restrictive in what it accepts (you can't actually define expressions inside, even a space will break the parser)
<citadelcore>
Essentially I want to perform some custom transform on a certain output of the flake
h0m1 has joined #nixos
stree has joined #nixos
<l33[m]>
i just built an entire system from a flake... i'm impressed! :-)
<l33[m]>
it wasn't even my system! LOL!
<supersandro2000>
I just got nixos containers working on Ubuntu with natting
<supersandro2000>
nixos migration here I come!
<hiking[m]>
oh fuck I forgot I have a nixos notification ping... I'm gonna get blasted here lol
patagonicus0 has joined #nixos
<l33[m]>
<supersandro2000 "I just got nixos containers work"> migrate! migrate! MIGRATE!
<supersandro2000>
l33[m]: if you have a lot of services and things it takes a while
patagonicus has quit [Ping timeout: 240 seconds]
patagonicus0 is now known as patagonicus
<l33[m]>
<supersandro2000 "l33: if you have a lot of servic"> i know....and you are run 68% of the services on the internet right now.
<l33[m]>
> <@freenode_supersandro2000:matrix.org> l33: if you have a lot of services and things it takes a while
<l33[m]>
* i know....and you are running 68% of the services on the internet right now.
<{^_^}>
error: syntax error, unexpected '<', at (string):492:1
<supersandro2000>
editing on matrix really works well with IRC
<l33[m]>
<supersandro2000 "editing on matrix really works w"> i very much doubt that.....
<gchristensen>
it is not ideal :P
<l33[m]>
<l33[m] "i very much doubt that..... "> i got banned from IRC in 1986... I've not been allowed back since. ;-)
haritz has quit [Quit: ZNC 1.6.5+deb1+deb9u2 - http://znc.in]
attila_lendvai has quit [Ping timeout: 246 seconds]
<gchristensen>
a few before september even :)
<gchristensen>
years*
<l33[m]>
wow, you just edited that... i see what you did there.. :-)
ris has quit [Ping timeout: 260 seconds]
<l33[m]>
well i have nothing to report, everything i've tried with nix/OS seems to be working...
orivej has quit [Ping timeout: 246 seconds]
<l33[m]>
which is both amazing and terrifying at the same time....or as we say .. amazeafying.
<gchristensen>
pretty boring
<l33[m]>
:-)
<hiking[m]>
Will NixOS ever bundle an installer? 🤔 just asking since I feel more comfortable using gui installers
<citadelcore>
nvm, I was being an idiot and messed up my bash script. Nothing wrong with --apply :)
citadelcore has quit [Quit: Connection closed]
rajivr has joined #nixos
<simpson>
hiking[m]: https://github.com/NixOS/nixpkgs/issues/21662 is where folks have discussed this. I got the impression that none of the installer tools are fully-featured enough yet.
<{^_^}>
#21662 (by matthewbauer, 4 years ago, open): RFC: Graphical installer for NixOS
<zhaofeng>
Ok, I was being a complete idiot and messed up my Nix store (some files deleted). Now rebuilding gives me "error: while setting up the build environment: getting attributes of path '/nix/store/9k5zncj9m4pzkxyy649a1s3xssgqvb0f-qemu-5.2.0': No such file or directory". How can I go about resolving this?
<hiking[m]>
<{^_^} "#21662 (by matthewbauer, 4 years"> thanks for the tip
<zhaofeng>
I tried `nix-store --verify --check-contents --repair` but it didn't help
<matthewcroughan>
ryantm: The bot hid my post, I know the forums are undergoing massive usage at the moment, which is why I'm asking you directly to take a look ;D
<matthewcroughan>
Sorry for bothering, but I feel that my profile might be hidden for weeks otherwise, and I want to participate a lot more.
<simpson>
hiking[m]: FWIW there's not much which happens during installation but that *doesn't* happen during typical system updates. You'll have to eventually learn enough Nix to hack your configuration.nix, for example. The only thing done during installation is disk partitioning.
<simpson>
...I do agree that a graphical disk partitioning tool can be *much* easier and more comfortable than the TUI tools like parted or cfdisk.
<gchristensen>
I got you matthewcroughan (cc ryantm )
<matthewcroughan>
Thanks <3
<matthewcroughan>
How do you give kudos here again?
<hiking[m]>
That's the deal. I feel somewhat insecure when partitioning... principally because I have to avoid borking my Windows partition (which I still need sadly)
<matthewcroughan>
I swear that bot is dead or something
<gchristensen>
<3 nickname or nickname++ :)
bew has quit [Quit: Connection closed]
bew has joined #nixos
<gchristensen>
I think you can also do ✨ matthewcroughan
<{^_^}>
matthewcroughan's karma got increased to 2
<matthewcroughan>
Oh great :D
<matthewcroughan>
Does it take multiple arguments?
<gchristensen>
no
<matthewcroughan>
gchristensen++
<{^_^}>
gchristensen's karma got increased to 445
<gchristensen>
but you can do multiple on one line :)
<bew>
{^_^}++
<{^_^}>
{^_^}'s karma got increased to 229
<bew>
x)
<matthewcroughan>
Can we make it recursive?
<matthewcroughan>
I'm sure we can, in some screwed up way.
<hiking[m]>
Oh god I just said "thanks" to an IRC bot?
<gchristensen>
,karma = Give karma with: <3 nickname or nickname++ or ✨ nickname. You can grant karma to multiple people on one line via <3 nickname1 <3 nickname2 <3 nickname3, etc.
<hiking[m]>
🥸
<{^_^}>
karma defined
<gchristensen>
matthewcroughan: {^_^} doesn't see messages {^_^} sends, so I don't think so :)
<matthewcroughan>
Can we write a nix expression that gets evaluated with >, that then gets picked up by {^_^}?
<gchristensen>
you can try in #bottest :)
ross`_ is now known as ross`
Qwerky_ has quit [Remote host closed the connection]
cr0ssw1nd has quit [Quit: Leaving]
<infinisil>
The bot can only read messages from non-{^_^} nicks, and it can only write with the {^_^} nick, so no recursion :)
alexherbo2 has quit [Ping timeout: 240 seconds]
<matthewcroughan>
The fact that you have even thought about this is what comforts me about Nix.
<gchristensen>
hehe
<gchristensen>
you're still welcome to try of course ;)
<matthewcroughan>
gchristensen: where are your repos!
<matthewcroughan>
I want to steal code.
<matthewcroughan>
Primarily, I want to know how you use traefik, and cross-compile.
Qwerky has joined #nixos
<deltab>
it's how IRC works: you don't receive the messages you send
<matthewcroughan>
Hmm.. Why Can't I do `imports = [ ${self}/modules/tailscale.nix ];`
<matthewcroughan>
I just get syntax error, unexpected DOLLAR_CURLY
<l33[m]>
l33++
<{^_^}>
l33's karma got increased to 7
<matthewcroughan>
LOL
<matthewcroughan>
matthewcroughan++
<{^_^}>
matthewcroughan's karma got decreased to 1
<matthewcroughan>
Oh bother :(
<l33[m]>
no do you see why i got banned from IRC in 1983
zebrag has quit [Quit: Konversation terminated!]
<bew>
matthewcroughan for relative path you can do ./foo/bar
<matthewcroughan>
I've been completely demoted. How brutal.
Qwerky has quit [Ping timeout: 246 seconds]
<bew>
matthewcroughan++ :D
<{^_^}>
matthewcroughan's karma got increased to 2
zebrag has joined #nixos
<matthewcroughan>
l33[m]: Your irc name is l33[m]
<matthewcroughan>
there's some other l33 on Freenode that you just promoted.
<l33[m]>
super!
<matthewcroughan>
bew: from the root of the repo?
S0rin_ has joined #nixos
<l33[m]>
I alway want negative karma, thats just how janitors have to be.
<matthewcroughan>
I'm looking for `${self}` from the perspective of the flake, not of the nix file I'm working in
mayhew has quit [Quit: Konversation terminated!]
<matthewcroughan>
this works elsewhere, just not in a list of `import`
<deltab>
matthewcroughan: do you need quotes around it?
<matthewcroughan>
`imports*`
<matthewcroughan>
deltab: nope, that doesn't work either
<bew>
iirc imports need a list of paths, not strings, so you can't do `"${self}/foo/bar"`
<matthewcroughan>
Ah, right, yeah..
<matthewcroughan>
is there a toPath function?
<matthewcroughan>
and can we make every element of a list toPath?
<infinisil>
aszlig++
<{^_^}>
aszlig's karma got increased to -666
S0rin has quit [Read error: Connection reset by peer]
<jesystani>
hello, im wondering if theres something like pkgs.writeScriptBin, except it will copy an existing file, but update the shebang to match nixos? i presume something like this happens in he builder, but im not sure if theres a helper function to quickly create a derivation for single file scripts like that. thank you
<cole-h>
zhaofeng: I think if you `touch` that file / `mkdir` that dir and then repair the store, that might work?
AlpineLlama has joined #nixos
<infinisil>
jesystani: The `patchShebangs` bash function does that in stdenv
<infinisil>
So you could probably do `pkgs.runCommandNoCC "copy" {} "cp ${some-file} $out; patchShebangs $out"`
<jesystani>
so im playing around with it now and i have a probably trivial question: runCommand and co create a derivation to my knowledge, but im unsure how to have that derivation be treated as a package, unless im just doing something really wrong, i get an error that im getting something thats not a package.
<jesystani>
can someone sanity check me on if patchShebang will patch #!/bin/zsh accordingly?
<sb0>
"nixops deploy -d lab" gives me the error "root@rpi-2: Permission denied (publickey,password,keyboard-interactive)." but when I do "ssh root@rpi-2" (under the same user) it logs in using the public key without any problem. what is going on?
<sb0>
in the log on rpi-2 I see auth failures when attempting to log in with a ED25519 key, which is weird because my keys should be RSA
<infinisil>
jesystani: It should if you have zsh as a build input
<sb0>
hm ok seems it needs nixops destroy and there's another keypair silently used by nixops
wallacer has joined #nixos
wallacer has quit [Max SendQ exceeded]
wallacer has joined #nixos
wallacer has quit [Max SendQ exceeded]
<heyarne[m]>
i'd like to give pipewire a try and i'm on 20.09. can i do that? at the moment i get an error (`error: The option `services.pipewire.alsa' defined in `/etc/nixos/configuration.nix' does not exist.
bitmapper has quit [Quit: Connection closed for inactivity]
<heyarne[m]>
hm… am i misunderstanding `disabledModules`? my `/etc/nixos/configuration.nix` starts like this: https://pastebin.com/1n8AW84f but trying to rebuild it still throws an error: `error: The option \`services.pipewire.enable' in \`/nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/services/desktops/pipewire.nix' is already declared in
<heyarne[m]>
again, to answer my own question: the path changed, so `disabledModules = ["services/desktops/pipewire.nix"];` did the trick. sorry for rubberducking!
<heyarne[m]>
hm, i still can't get it to build. the relevant path of my `/etc/nixos/configuration.nix` is here https://pastebin.com/AmxNGKGt. the build output. the output of `nixos-rebuild dry-build --show-trace` is here: https://pastebin.com/s3QSB2xQ can somebody provide some guidance how i can make unstable pipewire work on 20.09?
<MarcWeber>
I've been running nixos on a jiffybox domain factory. Now after updating even su username shows 'cannot get capabilities for /run/wrappers/wrappers.E8lIc8lDDP/su: Operation not supported'
<Reventlov>
no mention of "sqlite" in the module, and it seems that this will fail if sqlite is used: $wgDBserver = "${cfg.database.host}:${if cfg.database.socket != null then cfg.database.socket else toString cfg.database.port}";
<{^_^}>
[nixpkgs] @doronbehar closed pull request #85202 → module/xss-lock: add package to systemPackages when the module is ena… → https://github.com/NixOS/nixpkgs/pull/85202
<gramanas>
Hi, I was wondering if there is information about the mirroring of emacs' package archives in nixpkgs (like elpa and melpa). I am getting some 404s while configuring emacs with nix-build due to it trying to download older versions of the packages.
Frosku has joined #nixos
<{^_^}>
[nixpkgs] @raboof opened pull request #117893 → <!-- To help with the large amounts of pull requests, we would appreciate your reviews of other pull requests, especiall… → https://github.com/NixOS/nixpkgs/pull/117893
NULLx76 has joined #nixos
<raboof>
whoops sorry :). "opensnitch: init at 1.3.6"
<kfollesdal>
Any advice to how to add a module/service from another channel/branch to nixos system configuration (flake). For example I want to add the following PR https://github.com/NixOS/nixpkgs/pull/116775 to my nixos configuration.
<supersandro2000>
Guest43: because most distros do not use github to track their issues
<supersandro2000>
and count does not say anything about the quality
Vadrigar_ has quit [Ping timeout: 240 seconds]
supercoven_ has joined #nixos
growpotkin has joined #nixos
Guest43 has quit [Ping timeout: 252 seconds]
zakame has joined #nixos
supercoven has quit [Ping timeout: 240 seconds]
dominikh has joined #nixos
ahmedelgabri has quit [Ping timeout: 250 seconds]
zupo has joined #nixos
zebrag has quit [Quit: Konversation terminated!]
zebrag has joined #nixos
Guest43 has joined #nixos
lordcirth_ has joined #nixos
lordcirth has quit [Ping timeout: 245 seconds]
<Guest43>
simpson supersandro2000 understood, is there reason why it's not more popular? Maybe the target demographic is small or it just didn't become meme distro like arch yet :]
<Guest43>
simpson BTW I am that Firefox scrolling guy, still haven't left
<Reventlov>
well, up there, on this screenshot: the nixos-rebuild just OOM
sangoma has joined #nixos
<Guest43>
Is there a limit on what can be done in config? It looks to me its easy when first setting up etc but after a while it gets hard if you want to do a bit complex stuff. Thus maybe requiring non nix way of fixing it if even it's possible. Creating NOT 100% reproducible build. Do you get what I am saying.
rajivr has quit [Quit: Connection closed for inactivity]
<simpson>
Guest43: In theory, no, there's no limitations. In practice, managing /home is tricky enough that we have separate tools, like home-manager.
<simpson>
Did you have a specific example of something that you imagine Nix cannot configure?
jbox has joined #nixos
<jbox>
should I use btrfs with my 32 GB nixos server?
<jbox>
I don't have that much space and I won't be using it for a file server (no btrfs-sync or whatever)
<Ke>
what does the server do
<Ke>
nixos runs fine on most filesystems
<jbox>
right now it's just a little general-purpose machine for things like znc and maybe a blog
<jbox>
I just like having a server for when I need it :)
figgyc has joined #nixos
D_ has quit [Remote host closed the connection]
<jbox>
I'll probably just go with ext4, since I don't need the extra complexity of what btrfs has to offer
D_ has joined #nixos
<Ke>
if there is no special purpose, I recommend going with what you are comfortable with
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jbox>
Ke: thanks :)
Vadrigar_ has quit [Ping timeout: 246 seconds]
<Guest43>
simpson no just theoretical, thanks for answering. Let me pick your brain a bit, back to Firefox scrolling freezing issue, I noticed only thing that might be same is CPU? Because de/wm/xorg/Wayland/GPU were different across people who had this issue. It can't be nixos default setup issue because other people don't have it
<Guest43>
simpson libinput also complains while scrolling, events are too many your system is slow, but that might be generic
<Guest43>
If you open your logger and try scrolling in Firefox preferences do you see libinput error?
<simpson>
Guest43: Oh. I had assumed that you were talking about problems that *you* were experiencing on *your* hardware. For a difficult performance problem like this, it's easy to get confused if one looks at other people's problems.
<simpson>
Also, if you can reproduce the same problem with the same Firefox on two different distros' kernels, then it is a problem that you could try taking upstream to Mozilla.
<Guest43>
simpson oh I have this Firefox issue, question about the limit of config was just curiosity
<matthewcroughan>
Has anybody got a wiki definition of what a package is?
sangoma has quit [Ping timeout: 240 seconds]
<Guest43>
Simpson nope, none other distro has it AFAIK, can't find anything similar online
<matthewcroughan>
What is a package? A derivation? Are they synonyms?
<Guest43>
simpson do you think libinput might have to do something with this, cause it puts out error at exact time of freeze saying amount of events exceeded x allowed in x seconds. Either something wrong with libinput or its not getting response fast from machine. Issues both occur in input events, when scrolling and keydown
<Guest43>
Although I think this libinput error is found in other distros too
<simpson>
matthewcroughan: Somebody will probably have a link, but a package is anything in the Nix store, and a derivation is a special sort of package which contains build instructions for Nix.
<simpson>
Guest43: That would be an expected symptom of rendering being too slow, which is the root cause that we've been examining.
<matthewcroughan>
So are these not packages by your own definition?
<matthewcroughan>
These are all derivations.
<simpson>
matthewcroughan: They're not in the Nix store, so neither. Each file is a Nix expression, right?
<matthewcroughan>
Yeah but if I want to call them packages, am I wrong?
<simpson>
Yes.
<Guest43>
Simpson I see, but it's weird that it's random. Does nix have some stuff that perhaps regulates CPU power or something? CPU governor was set to performance
<Guest43>
By default
<simpson>
Linux does have some stuff like that, and many distros like to configure it. You could check to see if that's a factor.
<Guest43>
I don't know what they are but saw unfamiliar services audit/seed
ddellaco_ has quit [Remote host closed the connection]
jophish has quit [Quit: WeeChat 3.1]
ddellacosta has joined #nixos
<Guest43>
simpson here is a paradox it's not hardware issue I think, because tested on 3 different machines. Same issue. Implies it's nixos issue. Now only minority have this issue. Implies hardware issue
<matthewcroughan>
simpson: the reason I'm asking is because I'm documenting my repo, colemickens style and I want this definition to be correct
<simpson>
matthewcroughan: "things" and "stuff" are powerful words for this purpose. Consider the POV of somebody reading your repo: What do you want them to know about? What do you want them to feel comfortable doing?
<matthewcroughan>
simpson: I want them to not be confused by terminology
<matthewcroughan>
And to have a concrete definition that is not in any way abstract that they can click on and learn about from
<Guest43>
Simpson have you tried to reproduce this?
<simpson>
Guest43: "nixos" is too broad and coarse. Yeah, I've tried to reproduce it, and we established that it's a GPU problem, right?
<matthewcroughan>
If I say "pkgs", I need to inform what that actually means. I need to at the very least link to the relevant documentation on that word.
<matthewcroughan>
I am happy with my definition so far, but I want your opinion on what the `pkgs` folder of `nixpkgs` even is.
<matthewcroughan>
It's a collection of derivations. Right?
<simpson>
Sure. It doesn't matter.
<Guest43>
simpson no, cause 3 different nvidia cards (my machines) + Intel cards (github issue) reproduces this issue. Do you happen to have and?
fuzzypixelz has joined #nixos
<Guest43>
And
<matthewcroughan>
simpson: I think it matters a lot, because now that I'm a few months into really dealing with Nix, the biggest problem for me was terminology.
<Guest43>
AMD*
<matthewcroughan>
You are too deep in to understand that, I bet :P
<simpson>
Guest43: It's not reproducible on my AMD/ATI or Intel or nVidia GPUs, no.
<matthewcroughan>
That's a compliment, btw.
<simpson>
Sorry, I don't care and I'm out of gumption. Good luck to you both.
simpson has left #nixos ["WeeChat 1.0.1"]
<Guest43>
simpson wow, what the heck man, mystery of the year
<matthewcroughan>
And just like that, simpson vanishes!
<matthewcroughan>
Say the name 3 times and they will appear.
<Guest43>
I think I annoyed him with my problem, sorry Simpson
<Guest43>
Simpson
<Guest43>
simpson
<matthewcroughan>
simpson++ simpson++ simpson++
<{^_^}>
simpson's karma got increased to 47
<Guest43>
Oh how do we get rankings
<Guest43>
Is this channel specific stuff or general irc/freenode
<Guest43>
I mean karma
<matthewcroughan>
Unsure, I think it's specific to this channel.
<Guest43>
If you need inspiration idempotent desktop is nice for setup docs
<fuzzypixelz>
I noticed that people define things like `systemPackages` to be different non-overlapping lists in many files and simply keep linking them together using `imports` until "they reach the main system config file. How does this work exactly? is there some magic in `imports`?
<matthewcroughan>
Should be pretty descriptive, hopefully I'm not being too esoteric
<cub3s_>
Is there a good/recommended way of merging two stores from two different machines? (Should I just copy over all distinct directories within /nix/store and that's it? Do I have to worry about preserving permissions, modification times, etc.?)
<matthewcroughan>
cub3s_: probably `nix copy`
<matthewcroughan>
maybe look into that
<matthewcroughan>
I've never heard of anybody just smashing the /nix/store over using `mv` `cp` or `scp` lol.
<Guest43>
I think good enough. What is flakes in few words? What it helps with? I recently tried nixos
<matthewcroughan>
Guest43: Lets you declare **everything**.
<matthewcroughan>
Without flakes, within Nix itself, you can't share your entire system with me.
<cub3s_>
matthewcroughan, it seems like nix copy indeed appends to the destination store (leaving existing paths alone). right? this is nice and exactly what i need if true
<matthewcroughan>
My system, my whole system. My everything. It really is everything.. All of its inputs are defined here.
<matthewcroughan>
Those inputs all have git hashes that are managed by the nix tooling. So when I do `nix flake update` it goes and fetches the latest git hash for those inputs.
<matthewcroughan>
Those hashes are updated in the flake.lock file.
<fuzzypixelz>
matthewcroughan: do you understand why channels are not "composable"?
<matthewcroughan>
This means absolutely every single detail of your system is captured at a point in time.
zupo has joined #nixos
<matthewcroughan>
fuzzypixelz: Well yeah, because they're a command you run on the cli, they're something you do as an additional step to your system.
<Guest43>
Nice! Thanks
<matthewcroughan>
It's not written in nix code anywhere that your channel should be nixpkgs on the unstable branch at the ah1h2ika97y commit hash
<cub3s_>
Is anyone here building Haskell programs using Nix/cabal?
<fuzzypixelz>
matthewcroughan: is that what composable means? :o
<matthewcroughan>
I'm not really sure, but I think so.
Guest43 has quit [Quit: Connection closed]
<matthewcroughan>
If composable means the ability to pull your whole system up in one go.
<matthewcroughan>
without *any* additional steps.
<matthewcroughan>
If composed means everything is declared in nix files.
<fuzzypixelz>
matthewcroughan: oh I see. OK so aside from increased reproducibility. what else is there?
<matthewcroughan>
Well, lets say you want to debug my system.
<matthewcroughan>
I don't want to give you ssh access to my system.
<matthewcroughan>
You can just open up a nix repl and start browsing my system, without compiling anything.
<matthewcroughan>
The flake defines literally everything about my system, so anything is possible, you could start tab completing everything, seeing what services I have enabled, bla bla. Sky is the limit.
malook has quit [Remote host closed the connection]
<matthewcroughan>
You could imagine having a bot that updates your maintained flake, that is completely separate from nixpkgs, that nobody but you maintains.
<fuzzypixelz>
how exaclty would I do that with nix repl?
<fuzzypixelz>
matthewcroughan: that wasn't possible with good ol' default.nix through channels? putting aside the non-composability part.
<matthewcroughan>
Then, all I have to do in order to add it to my system is add the git repo to my inputs, then install it into my system with environment.systemPackages = [ inputs.firefox.defaultPackage.x86_64-linux ];
<matthewcroughan>
fuzzypixelz: Not really, because how can you do it if you're on a completely different version of nixpkgs than me?
<matthewcroughan>
There's uncertainty, flakes eliminate that uncertainty
<matthewcroughan>
There's a lot that could still be done with the old way, but this just makes it better. You need outside-tooling to manage it for you like niv otherwise.
tejing has quit [Ping timeout: 240 seconds]
<matthewcroughan>
I'm not really an expert in the old way of doing things, I'm a flake-native, I don't know what people did to manage the old way of doing things.
<matthewcroughan>
fuzzypixelz: I'm looking into your request on the flake repl.
<spacetato>
lots of `fetchUrl` :/
stree has quit [Ping timeout: 246 seconds]
<fuzzypixelz>
neither am I. I installed nix in nomvember of last year. But I'm curious haha
hiro98 has quit [Remote host closed the connection]
<matthewcroughan>
This is 3 computers, working together thanks to flakes. I have a lot remaining to be done with it, but it's 3 systems declared with flakes, all they have to do is `git pull` and `nixos-rebuild switch`
<matthewcroughan>
the flake.nix in that repo should be readable.
<matthewcroughan>
You can run fu1, fu2, fu3 in a virtual machine, no problem.
<matthewcroughan>
I had a friend try that, he totally just built my entire laptop's configuration, then booted it via the qemu script it generates. Madness.
<matthewcroughan>
The dream, also, is to have nixos-install work with flakes so that you can just boot a machine up and `nixos-install --flake github:matthewcroughan/nixcfg#t480`
<matthewcroughan>
That goes down incredibly badly at the moment, flakes are experimental, that will *not* do anything remotely close to properly install your system :D
<matthewcroughan>
fuzzypixelz: I can't figure out the way to do it without cloning my repo. But you can just `git clone git@github.com:MatthewCroughan/nixcfg.git`
<matthewcroughan>
then, with a Nix that has flakes enabled, cd in. Then `nix repl`
<matthewcroughan>
Once in the repl, run `flake = builtins.getFlake (toString ./)`
<matthewcroughan>
Er.. That's not quite right, one moment.
<bew>
matthewcroughan: from the repl, can't you do `builtins.getFlake "github:matthewcroughan/nixcfg"` and use that?
<fuzzypixelz>
matthewcroughan: I think it would be easier to just pull nixUnstable through a nix-shell?
<matthewcroughan>
bew: amazing if so
<fuzzypixelz>
oh no I misread that nvm
<matthewcroughan>
oh my god... bew
<bew>
:D
<matthewcroughan>
Oh my god..
<matthewcroughan>
bew++
<{^_^}>
bew's karma got increased to 3
<fuzzypixelz>
bew+++
<matthewcroughan>
fuzzypixelz: so yeah, just enter a flake enabled nix repl, then just say `flake = builtins.getFlake "github:matthewcroughan/nixcfg"`, then type `flake.` and then press tab
<fuzzypixelz>
bew++
<{^_^}>
bew's karma got increased to 4
<{^_^}>
[nixpkgs] @bjornfor pushed 3 commits to release-20.09: https://git.io/JYcsv
<fuzzypixelz>
holly molly matthewcroughan ... I wish these things were better documented
<matthewcroughan>
fuzzypixelz: you're browsing my system without ssh
stree has joined #nixos
<matthewcroughan>
fuzzypixelz: look at flake.outputs.packages.x86_64-linux. and press tab
<bew>
the auto download of things while browsing the flake in the repl is crazy cool
<matthewcroughan>
then use :b flake.outputs.packages.x86_64-linux.dolphin-demu
<matthewcroughan>
you're building my dolphin-emu package ;D
<fuzzypixelz>
fuzzypixelz: yes I am at this very moment. I think you're using sway is that accurate? :P
<matthewcroughan>
bew: do you know how to feed an expression into the repl pre-emptively
<matthewcroughan>
?
<matthewcroughan>
`nix repl -E 'flake = builtins.getFlake "github:matthewcroughan/nixcfg"' doesn't work for example
maxdevjs has joined #nixos
<bew>
Hehe I've found a way
<matthewcroughan>
bew: share! :D
<fuzzypixelz>
couldn't build it from repl but nix build github:...#dolphin-emu worked
<bew>
basically you can give `nix repl` a file, and it will evaluate it and load the variables from it, so if you're using zsh you can easily create a temporary file with some content, like so:
<fuzzypixelz>
that's ... the hackiest thing I've see in a while
<fuzzypixelz>
bew++
<{^_^}>
bew's karma got increased to 5
<bew>
hehe, it is "a way"
lsix has quit [Quit: WeeChat 3.1]
Frosku has quit [Ping timeout: 240 seconds]
ddellacosta has quit [Remote host closed the connection]
<fuzzypixelz>
I never knew about zsh `=(...)` syntax
Frosku has joined #nixos
<matthewcroughan>
bew: that doesn't seem to work for me
<matthewcroughan>
bash: syntax error near unexpected token `('
<bew>
yeah, that `=( ... )` syntax only works on zsh
<matthewcroughan>
oh
<bew>
I'm checking for bash, but I don't think it exists
<matthewcroughan>
bew: zsh koolkidz ;D
<matthewcroughan>
what is it doing exactly?
<bew>
run the command you give, save the output to a temporary file, and put that filename as an arg for the command `nix repl HERE-THE-FILENAME`
<bew>
and when the nix repl command exist, the tmp file from zsh is removed afaik
<bew>
exits*
meh` has joined #nixos
<fgaz>
Reventlov: hah, that explains it. that's why I made my $PS1 show the exit code of the last command
<fuzzypixelz>
I tried `gcc =(echo '#include <stdio.h>\n int main(void) { puts("HELLO ZSH YOU AWESOME BASTARD\n"; }') -o zsh-scream` but gcc threw `/tmp/zshJALyjw: file not recognized: file format not recognized`
<matthewcroughan>
bew: that is some really nice hotwiring in zsh though lol
Frosku has quit [Remote host closed the connection]
<asymmetric>
how can i exclude a path from a package's `src = ./.`?
<pushqrdx>
one my big annoyances with nix/nixos is dealing with garbage idk if my workflow is wrong but i tend to use nix-build a lot and create tons of crap in my store
<asymmetric>
without adding it to gitignore
<pushqrdx>
for each execution it creates a store node
<pushqrdx>
i don't like that, some would say that's wrong you use nix-shell... but nix-shell makes it very awkward to build/run software
philr has quit [Ping timeout: 268 seconds]
<pushqrdx>
i feel like either nix is missing something or it's a misunderstanding from my side
<fuzzypixelz>
asymmetric: using `builtins.filterSource`
<sterni>
asymmetric: use filter of builtins.path or filterSource
<pushqrdx>
so i have 2 questions, 1- how can i clear specific garbage from the store (ie all stuff related this package) 2- what is the idiomatic way to build/run stuff without polluting the store
<sterni>
pushqrdx: nix-build only creates a new nix store path if the inputs change
<asymmetric>
thanks! i'm trying to exclude flake.nix, so that changes to it don't result in a rebuild.. not sure it's a good idea now that i write it down though
<sterni>
pushqrdx: nix-shell also creates a store path if necessary
<sterni>
pushqrdx: you can use nix-store --remove if the path is fine to be garbage collected
<sterni>
pushqrdx: or you can always nix-store --gc
<bew>
fuzzypixelz for the lol: `gcc -x c =(echo -e "#include <stdio.h>\n int main(void) { puts(\"HELLO ZSH YOU AWESOME BASTARD\\\n\"); }") -o zsh-scream && ./zsh-scream`
<bew>
gcc -x c =(echo -e "#include <stdio.h>\n int main(void) { puts(\"HELLO ZSH YOU AWESOME BASTARD\\\n\"); }") -o zsh-scream && ./zsh-scream
<pushqrdx>
sterni --gc is invasive and --remove is too specific as it requires a literal path, i want something in between that clears this package's related derivations
<pushqrdx>
sterni by this package i mean either give it a name or infer it from default.nix
meh` has quit [Ping timeout: 240 seconds]
<pushqrdx>
sterni and yeah sure inputs will change as i am reiterating and trying to build so nix-build generates tons garbage
<fuzzypixelz>
bew: oh uhh I didn't escape the double quotes ._. thanks
<bew>
yeah and with `-x c` I tell gcc that the file is a c file, otherwise it can't guess it from the filename
gustavderdrache has quit [Quit: Leaving.]
cub3s_ has quit [Quit: disconnected]
zupo has joined #nixos
<fuzzypixelz>
bew: I asked this question earlier but got no answer (yet). I was wondering how nixos modules handle imports that defined options that are already defined in the file you're importing in
<fuzzypixelz>
I just casually define `systemPackages` to be different things in different files and ... it just nixmagically works
Lord_of_Life_ has joined #nixos
<bew>
the module merging system in nixos does merge the values when possible
Lord_of_Life has quit [Ping timeout: 252 seconds]
<heyarne[m]>
i'm trying to install the pipewire service from unstable, i'm on 20.09. i've set up unstable as a channel, however `nixos-rebuild` fails. this is the relevant part of my `configuration.nix`: https://pastebin.com/AmxNGKGt this is the build output https://pastebin.com/s3QSB2xQ and this is the package
<heyarne[m]>
why is `cfg.package.pulse` not defined? and how do i provide it?
<bew>
fuzzypixelz: for lists, you get a list with all items from both (or more), for an attrset you get a new attrset with all the attr merged, etc.. And when they conflicts, like a boolean tru and a boolean false you get an error iirc
<fuzzypixelz>
bew: thanks!
<fuzzypixelz>
lots of black magic everywhere
beertoagunfight has quit [Ping timeout: 246 seconds]
<bew>
yeah, reading how things are implemented makes you realize you don't have enough hairs to pull x)
<bew>
fuzzypixelz the comments in that file are interesting though, it's incredible how everything is composable and written in the _fairly simple_ Nix language
noonien has joined #nixos
Vadrigar_ has quit [Ping timeout: 240 seconds]
<fuzzypixelz>
this project is a place where a lazy purely functional language really shines
<bew>
definitely
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Jd007 has joined #nixos
Jd007 has quit [Client Quit]
zupo has joined #nixos
zupo has quit [Client Quit]
<bew>
I'm still having a hard time groking the fact that you can access the final attrset, _while_ building the sub attrset used to define that final attrset... I know it's because everything is lazy, but still..
<sterni>
pushqrdx: although need probably something a bit smarter than that in case some stoer paths (like stdenv) can't be gc'd)
<supersandro2000>
fuzzypixelz: the difference is not that big if you give it the full commit hash or a tag which points to a commit
zupo_ has joined #nixos
<fuzzypixelz>
supersandro2000: oh thanks for clarifying
<fuzzypixelz>
"buildRustPackage requires a cargoSha256 attribute which is computed over all crate sources of this package. Currently it is obtained by inserting a fake checksum into the expression and building the package once. The correct checksum can be then take from the failed build."
<supersandro2000>
cargoSha256 = lib.fakeSha256;
<supersandro2000>
build once and insert the got hash
<fuzzypixelz>
supersandro2000: using `sha256sum` for example? also, does it really matter if I just insert a random hash (it's what I actually did haha)
stepcut has joined #nixos
meh` has quit [Ping timeout: 246 seconds]
<supersandro2000>
you shouldn't use a valid hash from something else
<fuzzypixelz>
oh it's literally just "0000000000000000000000000000000000000000000000000000000000000000"
stepcut has quit [Remote host closed the connection]
<supersandro2000>
and I don't think that sha256sum outputs the same hash
figgyc has quit [Read error: Connection reset by peer]
<fuzzypixelz>
oh the error message gives it anyway
<veleiro>
oh it must me nixos-rebuild --target-host
<veleiro>
be
CptCaptain has quit [Quit: WeeChat 2.9]
justanotheruser has quit [Ping timeout: 250 seconds]
cole-h has joined #nixos
fuzzypixelz has joined #nixos
<fuzzypixelz>
how do people get nightly rust on nixpkgs? do they just use the mozilla overlay?
<bpye>
Is there some way to figure out why my flake isn't using the cache when I do a nix build? I'm certain I shouldn't be rebuilding shadow for example...