<camsbury_>
overall just trying to get the sha for a package to use with 'fetchFromGithub' in a default.nix
Have-Quick has joined #nixos
Ross has quit [Ping timeout: 240 seconds]
matthewbauer has quit [Ping timeout: 248 seconds]
Ross has joined #nixos
<joepie91>
!tofu
<{^_^}>
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.
<joepie91>
camsbury_: ^
<joepie91>
(it will yell at you if you use the wrong hash, and tell you what it should be instead)
igo95862 has joined #nixos
<camsbury_>
gotcha
<camsbury_>
I see that as being what I should do for 'cargoSha256' as well
<joepie91>
yeah, it should work universally
<joepie91>
afaik all hash checking stuff will use the same error format
<camsbury_>
sounds like a plan... now could you give me a quick way to test out a default.nix?
<joepie91>
err... nix-build something or other
<joepie91>
oh, in Nix 2.0 it might just be `nix build`
<joepie91>
but I'm unsure of the specifics
<camsbury_>
tried doing 'nix-build', but getting 'cannot auto-call a function that has an argument without a default value ('stdenv')'
<joepie91>
ah yeah, because it has to be evaluated in the context of nixpkgs
<camsbury_>
which is one of the arguments to the expression
<camsbury_>
yea
<joepie91>
is this a patch to nixpkgs?
<joepie91>
or out-of-tree?
<camsbury_>
well it is intended to someday be a patch
<camsbury_>
just learning it though
<joepie91>
right, but does the default.nix live within a [local copy of] nixpkgs right now?
<camsbury_>
oh
<camsbury_>
nop
<camsbury_>
out-of-tree then
<joepie91>
so if it does, then you can do something like nix-building a specific attribute path of the local nixpkgs
<joepie91>
it's in the 'developing on nixpkgs' guide somewhere
<camsbury_>
'The second possibility is to add the package outside of the Nixpkgs tree. For instance, here is how you specify a build of the GNU Hello package directly in configuration.nix:'
<joepie91>
ah yeah, that blurb sounds like what you want
<joepie91>
although, maybe not
<camsbury_>
so that one is setting it in the environment.systemPackages field
<camsbury_>
I would love to just test it out in a nix-shell somehow
<camsbury_>
but I guess getting it to build is step 1
<joepie91>
camsbury_: ah no, that is specifically for custom packages that you don't intend to make a part of nixpkgs; so if that's what you want then it'll work, but if you want to eventually submit it as a patch you might as well test it in nixpkgs proper
<camsbury_>
hmm
<joepie91>
can't hurt to try and learn both anyway :)
<camsbury_>
yea
<camsbury_>
exactly
<joepie91>
it's still the same process, just used in a different context
<camsbury_>
my goal here really is to close the feedback loop as quickly as possible
<camsbury_>
and then build out
<camsbury_>
to the solution of making a nice package and pr
<joepie91>
right; if you need dependencies it'll be a little iffier though when working with systemPackages/configuration.nix directly
<joepie91>
since you can't use the fancy 'specify each dep as an argument' thing
<joepie91>
(which is specific to callPackage that nixpkgs implements)
<joepie91>
you'd need to explicitly point at pkgs.stuff
<joepie91>
so the structure of your expression will be a little different from how it looks in nixpkgs
<camsbury_>
is there a way to, say, run a nix-shell with this expression unioned with my main configuration.nix?
<camsbury_>
okay
<joepie91>
well, a literal union would result in gibberish; you need to use the package expression in a specific context, eg. in your systemPackages (to install it system-wide), or as a dependency of something else, etc.
<camsbury_>
right
<camsbury_>
true
<joepie91>
while Nix is declarative, it's not like a config format in the sense that the runtime can just guess where stuff belongs; it really is a full-featured language where you're responsible for wiring things up the right way yourself
<camsbury_>
sure
<joepie91>
this does currently provide a bit more of a learning curve :P
<joepie91>
camsbury_: anyhow, if you already have a nixpkgs-formatted package, then honestly the easiest way to test your build is to test it within nixpkgs, I think
<camsbury_>
nor does it like when I add it to my 'environment.systemPackages'
<camsbury_>
yes
<joepie91>
camsbury_: what happens when you add it to systempackages?
<camsbury_>
undefined variable
<joepie91>
ah, hold on
<camsbury_>
stranger still
<camsbury_>
I am now looking on github and can't find it in nixpkgs/pkgs/tools/misc
<camsbury_>
but I can locally after having pulled it...
<joepie91>
almost hit 'git blame' on all-packages.nix
<joepie91>
bad idea :)
<camsbury_>
hahah
<camsbury_>
scary
<joepie91>
camsbury_: I think it just never made it into a release channel
<joepie91>
so it exists only in master/unstable
<camsbury_>
ah okay
<joepie91>
that... might have been a mistake
<joepie91>
yeah, not sure what's going on there
<joepie91>
camsbury_: you could create an issue asking to merge it into a release channel
<joepie91>
aside from that, you can install it directly from unstable for now
<camsbury_>
sure thing
<joepie91>
[04:03] <clever> hoshineko: if you add a second channel and name it unstable, then you can just `import <unstable> {}` in your config to refer to it
<joepie91>
nixos-unstable is the one you're interested in, not nixpkgs-unstable
<camsbury_>
thanks! crucial tool
<camsbury_>
how do updates work on nixos?...
<joepie91>
camsbury_: also, if you need to do more digging into nixpkgs, and github's search isn't good enough (which it usually isn't), https://search.nix.gsc.io/ is also a handy one to keep bookmarked
Anthony_Bourdain has quit [Remote host closed the connection]
ZaraChimera has quit [Remote host closed the connection]
<camsbury_>
ah thank you
<joepie91>
camsbury_: things update when you rebuild your system, basically
<joepie91>
note that there are some circumstances where automatic upgrades do not work, eg. when you have packages using weird unpacking tools for source archives, as the automatic upgrade runs in a slightly different environment from the `nixos-rebuild` command you'd run from your shell
<joepie91>
there's an issue about it somewhere
<joepie91>
upgrade results are logged to your system log (see journalctl), so you should be able to see whether it works correctly or not
blankhart has joined #nixos
<joepie91>
(I think you can also manually trigger the service that a systemd timer points at? for testing)
<camsbury_>
sounds good
<camsbury_>
I'm kind of a linux noob as well... diving sort of head first, and juggling nix-like config and standard unix config
b has joined #nixos
<joepie91>
camsbury_: for what it's worth, NixOS is *very* different from your typical FHS Linux distro, so it likely won't be significantly harder than if you already had pre-existing Linux experience
sir_guy_carleton has joined #nixos
<camsbury_>
ha yea
<joepie91>
(I do have some... opinions about documentation and usability in NixOS, especially for beginners, but those are a long-term problem to solve :P)
<sir_guy_carleton>
hello
Have-Quick has quit [Quit: Have-Quick]
<joepie91>
camsbury_: so yeah, if you can afford the upfront time and effort investment in understanding how everything ties together... it's very much worth it
<camsbury_>
yea I come from OSX and delved into Arch for a bit and got it to a reasonable state, then tried out NixOS, and it was wonderful
<sir_guy_carleton>
i'm getting a weird error running nixos-rebuild
<joepie91>
Arch -> NixOS seems a common migration path :P
<camsbury_>
quick setup actually given the struggle of arch, but some parts definitely need to be organized better in the how tos
<camsbury_>
we will get htere though
<sir_guy_carleton>
it says cannot merge the definition for i18n.consoleKeyMap
<sir_guy_carleton>
even though i haven't made any changes to it
<sir_guy_carleton>
i could just us the default, but still raises the issue
spear2 has quit [Remote host closed the connection]
spear2 has joined #nixos
<sir_guy_carleton>
i've tried arch in virtual machines; never really got it off the ground however
<camsbury_>
I used a crappy old laptop and drilled installation a ridiculous amount of times and recorded the steps in an Emacs Org file
<camsbury_>
that helped
<camsbury_>
haha
<sir_guy_carleton>
oh i think i might have realized the problem
andrewdo has joined #nixos
<sir_guy_carleton>
you can have consoleKeyMap and consoleUseXkbConfig set at the same time, right?
<sir_guy_carleton>
can't
andrewdo has quit [Read error: Connection reset by peer]
<camsbury_>
not sure... looking through my config
hph^ has quit [Ping timeout: 264 seconds]
Guanin has quit [Ping timeout: 240 seconds]
Guanin has joined #nixos
<Ralith>
joepie91: for a while arch was the distro with up to date haskell packages
<Ralith>
so it had a high concentration of FP enthusiasts
inquisitiv3 has joined #nixos
<joepie91>
aah!
<joepie91>
that explains a lot actually, heh
<Ralith>
it also has an outstandingly bad stability story, so it has a high outflow of users with a keen awareness of the problems nix solves :P
<clever>
and nix's packages are also functional, so now you can do functional programming while you functionally program!
glowpelt has joined #nixos
<joepie91>
yeah, I can see how this is like catnip to Arch-FP;ers
<joepie91>
Arch-FP'ers *
<sir_guy_carleton>
wonder if they use xmonad ...
blankhart has quit [Quit: WeeChat 1.9.1]
<camsbury_>
I do :D
<camsbury_>
was quite fun to write pure functions to manage my windows
<camsbury_>
well, seemingly pure... :D
<camsbury_>
joepie91: ...and bat is working. Thanks! One of these days I'll pr a package. Time to sleep.
<joepie91>
camsbury_: excellent; goodnight :)
sir_guy_carleton has quit [Quit: WeeChat 2.0]
camsbury_ has quit [Quit: WeeChat 2.0]
Have-Quick has joined #nixos
asuryawanshi has quit [Remote host closed the connection]
<{^_^}>
[nixpkgs] @dtzWill opened pull request #41781 → gcc-snapshot: revive and update to latest 8 snapshot → https://git.io/vh2Fl
init_6 has joined #nixos
blankhart has quit [Ping timeout: 268 seconds]
johnw has quit [Remote host closed the connection]
hydraz has quit [Ping timeout: 245 seconds]
hydraz has joined #nixos
hydraz has quit [Changing host]
hydraz has joined #nixos
<{^_^}>
[nixpkgs] @qolii opened pull request #41782 → linux-hardkernel: Init at 4.14.47-139 → https://git.io/vh2FS
kendrick_ has joined #nixos
<kendrick_>
Hey guys, my nixos configuration file doesn't persist after reboot, any idea what's happening?
simukis has joined #nixos
<kendrick_>
E.g. I added zsh as systempackages on configuration.nix, but after running `nixos-rebuild switch` and rebooting zsh is gone unless i re-run `nixos-rebuild switch`
<{^_^}>
[nixpkgs] @vcunat pushed commit from @bhipple to release-18.03 « p7zip: fix src URL for debian gitlab move (#41769) »: https://git.io/vh2FF
<{^_^}>
[nixpkgs] @xeji pushed commit from @sifmelcara to master « solc: 0.4.23 -> 0.4.24 (#41631) »: https://git.io/vh2Nd
<superepic>
nixos-rebuild switch --upgrade don't work too because of network problems. I ping nixos.org again with proxy, but result is the same. It looks like something wrong with nixos.org server settings, because website works fine.
<superepic>
probably, wrong firewall settings
<superepic>
or probably it's the problem of my network/pc, I'm not sure
<clever>
superepic: how are you connecting to the internet?
<superepic>
notebook wireless connection->router->PPPoE to ISP -> Internet
<clever>
superepic: what does `ip route` print?
<clever>
what is the default route in it?
tmaekawa has quit [Quit: tmaekawa]
<superepic>
default via 10.0.2.2 dev enp0s3 src 10.0.2.15 metric 202
<clever>
superepic: do you have an ethernet cable plugged in?
<superepic>
but I use Virtualbox now
<superepic>
10.0.2.0/24 dev enp0s3 proto kernel scope link src 10.0.2.15 metric 202
<superepic>
no, only wireless connection + virtualbox adapter to VM
<clever>
superepic: can the VM host ping 54.217.220.47?
<superepic>
no, it can't
<clever>
superepic: what does `ip route` show on the VM host?
<superepic>
it's windows host, so I'm not sure :)
<clever>
superepic: use the network troubleshooting tool in windows
<superepic>
ok thanks, or i try to reboot router or to contact my ISP
<inquisitiv3>
Does Nix support floats? There are contradictory statements regarding that.
<MichaelRaskin>
The latest Nix version does
<MichaelRaskin>
But pretty low-resolution
JasonGrossman has joined #nixos
asuryawanshi has quit [Remote host closed the connection]
asuryawanshi has joined #nixos
fendor has joined #nixos
stanibanani has quit [Ping timeout: 276 seconds]
<inquisitiv3>
MichaelRaskin: Thanks! Inconsistencies is so confusing...
nschoe has quit [Ping timeout: 265 seconds]
<MichaelRaskin>
Well, Nix floats are not something you want to use unless a NixOS module option documentation very confidently tells you to use them.
owickstrom has quit [Ping timeout: 264 seconds]
<{^_^}>
[nixpkgs] @basvandijk opened pull request #41788 → haskell: fix overriding haskellPackages using haskell.packageOverrides → https://git.io/vh2pH
<inquisitiv3>
I can understand that. But stating that they don't exist just confuses people when they see them the first time.
<MichaelRaskin>
Is there any place that explicitly states they don't exist?
<MichaelRaskin>
_That_ is a bug
<inquisitiv3>
What is considered best practice, install applications systemwide via the configuration.nix file, or installing them in a user's own profile?
<MichaelRaskin>
There is a third option, using nix-shell
<MichaelRaskin>
(or nix run)
<MichaelRaskin>
There are trade-offs; configuration.nix installation is probably a bit closer to the normal global installation behaviour everywhere else, and also has a cleaner consistency model.
<MichaelRaskin>
Which doesn't mean it is always the best practice to do it, but might make it a good default approach until you have clear reasons to prefer a different one
stanibanani has joined #nixos
b has joined #nixos
<inquisitiv3>
michalrus: Thanks for the answer.
<inquisitiv3>
There're some places that states that floats doesn't exist. At least once in the Nix manual, and in some articles in the wiki.
<MichaelRaskin>
These might be talking of Nix 1 and not yet updated for Nix 2.
<inquisitiv3>
Possible, I've just skimmed a bit of the manual.
<inquisitiv3>
Hope you can answer some other questions of mine.
<MichaelRaskin>
«Floating point numbers not supported» seems to be said about JSON parsing
<MichaelRaskin>
Which is an obsolete statement, you are right.
<inquisitiv3>
I want to tell Nix about my encrypted partition where root and swap resides in an LVM container
<MichaelRaskin>
I don't actually use mainline NixOS…
betaboon has joined #nixos
<inquisitiv3>
Aah, so just Nix?
<betaboon>
hello #nixos, has anyone had any luck running nixos on a rpi-zero-w ?
<inquisitiv3>
MichaelRaskin: The question regards Nix for that.
<MichaelRaskin>
I use Nixpkgs, and my system is fully Nix-based, and I use some of NixOS modules. But for defining complicated mounts I don't keep track of what NixOS does because a simple thing I want (mkfs of /tmp on boot) is not straigtforward in NixOS
<inquisitiv3>
But the syntax that he use for the option `boot.initrd.luks.devices` seems to differ from the option documentation (https://nixos.org/nixos/options.html#boot.initrd.luks.devices)
<srk>
inquisitiv3: probably not, nixos-generate-config is pretty good
<srk>
just create the layout a run it
<srk>
*and
<MichaelRaskin>
I would bet on the module having been refactored during the three years
<srk>
check if it generated luks.devices, add correct bootloader partition
Xal has quit [Ping timeout: 265 seconds]
<inquisitiv3>
Okey, thanks! I'll test to see what happens.
<inquisitiv3>
Another question
<srk>
betaboon: that's armv6, maybe doable with some cross compilation efforts
<betaboon>
srk: i was under the impression it is armv7
<srk>
no no
<inquisitiv3>
Locale settings. I'm planning to install Plasma. Do I need to set the options in the configuration.nix file or should I do it directly in Plasma?
<zimbatm>
yeah it took me a loong time to find this place
<zimbatm>
not too expensive but still inside of London
Thra11 has joined #nixos
<betaboon>
if only flight and stay wouldnt be so expensive :/
jD91mZM2 has quit [Quit: WeeChat 2.0]
<srk>
zimbatm: what does 'Max 120 people' mean?
<thekolb>
Is there a value that is semantically equivalent to undefined? I.e. ({foo ? "bar"}: foo)({foo = null;}) <- I am looking for a value to replace null that will make foo default to bar
<srk>
I can't load all the javascript :|
<zimbatm>
srk: it's the capacity of the room
<srk>
ok!
init_6 has quit [Ping timeout: 265 seconds]
<zimbatm>
thekolb: it's not javascript :p
<srk>
:D
<thekolb>
zimbatm: yeah I know, though I feel like I wish null had common lisp nil-like semantics
<inquisitiv3>
zimbatm: I got problem loading Eventbrite's parts even if I allow everything in uMatrix :&
<inquisitiv3>
Works if I just go to the URL. So no problems.
<inquisitiv3>
What's the "living" (is that the correct word if it's temporary?) costs?
<zimbatm>
:/ I know Eventbrite is not ideal, they loove their analytics
<MichaelRaskin>
thekolb: I love Common Lisp, but please no. nil semantics can only be excused by long hstory
<zimbatm>
how did you find the URL?
<srk>
If I allow everything in noscript for that page I won't be able to use this computer for next 15 minutes :D
<zimbatm>
inquisitiv3: count ~80.- GBP / day I would say, maybe less if you share a room
<inquisitiv3>
zimbatm: That sounds reasonable, but a little expansive. How long before the prices go up do you think?
owickstrom has joined #nixos
<thblt>
Hi! Is it possible with NixOps to deploy a network of virtualbox machines to an existing Debian host, or should I convert the Debian install to NixOS first?
<MichaelRaskin>
thekolb: wait, undefined explicit keyword argument is something even Common Lisp misses
<thekolb>
true (-:
<thblt>
Context: my Debian server is getting messy because it has a lots of different services. I want to clean the mess. NixOps seems fine, but my hosting provider doesn't have NixOS in its OS choice.
winem_ has quit [Ping timeout: 240 seconds]
<srk>
thblt: if you can run libvirt for example you can deploy with nixops from that debian machine
<srk>
thblt: onto a libvirt network. or containers
<srk>
nixops uses nixos-infect for most providers
<srk>
(who don't carry nixos templates)
<thblt>
srk: thanks a lot, will look into this!
<thekolb>
MichaelRaskin: still, any idea how I could pull this off though? I am thinking remove all null attributes from the map before passing it along...
<srk>
thblt: desire to get rid of the non-nixos machines comes gradually after some exposure
<inquisitiv3>
Is there a nice way to disable the root account? I've declared that my user account should be in the wheel group.
<MichaelRaskin>
thekolb: then again, null is a sensible override in some cases
<thekolb>
MichaelRaskin: I think I found my solution in lib.filterAttrs
<MichaelRaskin>
srk: I gladly migrated off NixOS on my main laptop, though (still on Nix/Nixpkgs and running Nixpkgs kernel)
<MichaelRaskin>
thekolb: maybe you want to declare something stupidly special to use it as a marker
<MichaelRaskin>
inquisitiv3: I would use passwd -l unless you set mutableUsers=false
<inquisitiv3>
MichaelRaskin: I haven't set `mutableUsers` to false.
stanibanani has quit [Ping timeout: 264 seconds]
<MichaelRaskin>
then use passwd -l for now
<inquisitiv3>
Took a quick look at `passwd`'s manpage. Is there any negative consequences if I disable the root account with `usermod --expiredate 1` instead?
<inquisitiv3>
I couldn't find any comparison when I did a quick google search.
<inquisitiv3>
MichaelRaskin: But thanks for your tip :)
<MichaelRaskin>
You can set nologin as login shell, you can say that the password is just expired and can no longe rbe used
<MichaelRaskin>
It's a bit of a question of definitions
<inquisitiv3>
MichaelRaskin: Btw, why have you "gladly" migrated of NixOS?
<MichaelRaskin>
Well, systemd breaks some of the workflows I want
<MichaelRaskin>
I don't like NixOS module system
<MichaelRaskin>
I want mkfs of /tmp during boot which is trivial to script and hard to express in NixOS terms
<MichaelRaskin>
I use Nixpkgs, I call some of NixOS modules in a mostly-functional way, but the part about bringing everything together gives me more restrictions than value.
<inquisitiv3>
MichaelRaskin: So you are using your "own" system with Nix? Not Guix?
<MichaelRaskin>
(But I know Nix language well and I know what I want in term of underlying low-level commands and configuration, so I am confortable without abstractions)
<MichaelRaskin>
No, not Guix
<MichaelRaskin>
I want firmware for my WiFi card to be installable easily
<jluttine>
i'm trying to use node package serve. it's broken on node 6. and apparently it's not available on node 8, that is, there's no nodePackages_8_x.serve. why..?
<Guanin>
Hi, I'm trying to run a python script as systemd unit, and the script needs python36Packages.requests. I've added that to systemd.services.<name>.path, but python won't find it to import. Is there a better way? (running with nix-shell and the fitting shebang does not work)
<inquisitiv3>
clever: `preLVM` should be set to `true` by default according to the docs. I didn't see any `name` option in combination with `boot.initrd.luks.devices`?
<clever>
inquisitiv3: if you set boot.initrd.luks.devices.foo = { ... }; then the name will default to "foo"
<clever>
inquisitiv3: a lot of the dynamic options in nixos work like that
<hoshineko>
o and `localectl list-locales` returns no output
<inquisitiv3>
clever: Aha, I guess I misinterpreted the options documentation :)
<Guanin>
gchristensen, thanks, that was easy :)
<gchristensen>
:) that is creating a python3 executable which comes pre-packaged with requests :)
<Guanin>
Yes, I understand that so far, but I guess I've never stumbled over that function :)
<gchristensen>
cool
<Guanin>
Still learning, but I'm getting better slowly :D
Ralith__ has quit [Ping timeout: 240 seconds]
<inquisitiv3>
So... The installation finished.
<inquisitiv3>
Now, the moment of truth.
michalrus has left #nixos ["WeeChat 1.9.1"]
<Guanin>
Now I've got two crawlers running daily (one dumping parts of youtube, and one dumping another page)
<gchristensen>
nice
Ralith_ has joined #nixos
<MichaelRaskin>
inquisitiv3: manual (grep-ped: only builtins.fromJSON), wiki (searched: only in the type list) — any other place that clams there are no floats in Nix?
<djhoulihan>
Hey everyone, I've heard good things about NixOS and I'm considering investing some time in using it more seriously after I did an install and looked at the documentation last night
<djhoulihan>
Are there a lot of people using this in production?
<djhoulihan>
In place of, say, Debian or CentOS?
<JasonGrossman>
djhoulihan: Not as a proportion of all the Debian and CentOS users! But yes there are some.
<JasonGrossman>
djhoulihan: I'm fairly new to NixOS but my impression is that there are still plenty of teething problems when you want to install something that's not already packaged for it. On the other hand, it's wonderful - it really does solve a lot of sysadmin problems.
<djhoulihan>
JasonGrossman: Can you give a few examples? I'm interested in seeing how a production workflow would work in practice. Have any companies written about this?
<JasonGrossman>
djhoulihan: Companies? I have no idea.
<djhoulihan>
Yeah it's pretty attractive to me to be able to version an entire system as a snapshot in Grub
<JasonGrossman>
Right!
<infinisil>
There were a couple people doing talks about how they use NixOS in their companies at NixCon 2017
<JasonGrossman>
There are other ways of doing that, but none of those have all the advantages of NixOS IMO.
<djhoulihan>
But I'm wondering if running it as a main operational OS would require e.g. a build server for compilation, a testing server to check for breaking updates, etc
<MichaelRaskin>
djhoulihan: in a server setting, a lot of breaking changes can be tested on the same server, as in build new configuration, run tests in a container off the same store, in case of success, apply the new configuration.
<logzet>
Hi, does anyone know what where to find the plasmoidviewer executable on nixos?
init_6 has quit [Ping timeout: 248 seconds]
init_6 has joined #nixos
<logzet>
Nvm, it is contained within plasma-sdk which appears to be not packaged yet
<tilpner>
Oddly though, plasma-sdk is listed in the sources
lorne has joined #nixos
<logzet>
Yea
lorne is now known as Lorne1
<logzet>
Because the sources seem to be generated
<logzet>
I've already contributed 2 packages that where contained within the sources list but not packaged :)
softinio has joined #nixos
infinisil has quit [Quit: Configuring ZNC, sorry for the joins/quits!]
<{^_^}>
[nixpkgs] @roberth opened pull request #41800 → linux: Enable RT53XX wifi support → https://git.io/vhaTg
ixxie has joined #nixos
hoshineko has quit [Quit: hoshineko]
infinisil has joined #nixos
softinio_ has joined #nixos
<Lorne1>
Hi there, I'm trying to get xmonad to start from an xrdp connection. I'm new to nixos and trying to get this working on AWS EC2, starting from the AMI. I must be missing something, because after log in, I only get an undecorated xterm. Does anyone have experience with this?
<logzet>
Seems to be what you are looking for, at least for me
<logzet>
Oh, nvm
<Lorne1>
I *think* I have the right thing enabled from that list.
<tilpner>
Lorne1 - How do you tell it's not working?
<tilpner>
(I haven't used xmonad in a while, so I forgot what it looks like by default)
softinio_ has quit [Client Quit]
<Lorne1>
I log in via rdp fine. But I get an undecorated xterm instead of xmonad. I can run xmonad from there. But that's not ideal.
<logzet>
Have tried using a script instead or just xmonad without an absolute path?
<Lorne1>
logzet - sorry. I don't follow.
<Lorne1>
do you mean on the xrdp.defaultWindowManager config line?
<logzet>
Oh, yea
<Lorne1>
I haven't tried that.
<logzet>
I'd try creating a script and capturing xmonad's output, maybe it throws a useful error
<logzet>
Or does journalctl contain something useful?
<clever>
logzet: the journal should contain the logs
<clever>
also of note, there is a xterm window-manager that sometimes winds up as default, you may need to services.xserver.desktopManager.xterm.enable = false;
<clever>
or select the right one at the login screen
<Lorne1>
Checking journalctl.... Is there a way to filter by time/date?
<clever>
logzet: --since and --until
<Lorne1>
Thanks
softinio_ has joined #nixos
softinio_ has quit [Client Quit]
<thekolb>
which package contains modprobe?
<clever>
kmod.out 0 s /nix/store/jyfq8333jy09vh743jmzsqwvv12kdxxi-kmod-24/bin/modprobe
<{^_^}>
[nixpkgs] @xeji pushed commit from @volth to master « jogl: reflect recent changes in opengl (#41786) »: https://git.io/vhak9
<clever>
thekolb: but you may need to use the special wrapper in nixos
<clever>
ah, i cant find that wrapper anymore, it may not be needed
<bgamari>
how does one use nix HEAD within nixos?
* bgamari
tried building nix using the shell.nix included in the tree, but any attempt to use the resulting executable fails unhelpfully with "error: getting status of '/usr/local': No such file or directory"
<Lorne1>
journalctl has cannot find any mentions of "xmonad" But plenty of "xrdp" lines. My login screen is the default. I think it's called slim. It has a "session" dropbox with only "Xorg" listed.
<{^_^}>
[nixpkgs] @matthewbauer pushed 3 commits to master: https://git.io/vhak5
<clever>
Lorne1: from slim, you can hit f1 to cycle thru the desktop managers and window managers
<clever>
Lorne1: slim doesnt have any mouse interaction at all
<Lorne1>
Sorry. I might be wrong about it being slim. I'm not sure what the default is called. F1 doesn't seem to do anything.
<clever>
Lorne1: the journal should say what it is
superepic has joined #nixos
<{^_^}>
[nixpkgs] @bjornfor pushed 3 commits to release-17.09: https://git.io/vhaIJ
<Lorne1>
clever: Is there a search term I can use?
<clever>
Lorne1: you can also add `-b 0` to the command to limit it to the current boot
<clever>
the display manager should be near the top
<clever>
oh, and also `-u display-manager` to limit it further
<Lorne1>
"no entries" with -u display-manager
<Lorne1>
clever: This is an AWS EC2 instance, BTW.
<clever>
Lorne1: oh, then it wont be under the normal name
<clever>
Lorne1: maybe -u xrdp
<superepic>
Hi! May I ask one more question: how can I enable lex in nix-shell? nix-shell -p flex doesn't work
xcmw has joined #nixos
<tilpner>
superepic - flex provides flex, not lex. Do you need it to be called lex?
<Lorne1>
clever: These two lines are my best guess at what could be good info on it:
<Lorne1>
Jun 10 14:42:09 ip-172-31-32-111.ec2.internal xrdp[14002]: in xrdp_wm_init: Jun 10 14:42:09 ip-172-31-32-111.ec2.internal xrdp[14002]: xrdp_wm_init: no autologin / auto run detected, draw login window
<superepic>
tilpner: yep. Or how can I get lex?
<clever>
Lorne1: i'm guessing xrdp may also have its own integrated window manager, and it may also not obey the normal services.xserver options
<clever>
Lorne1: youll need to investigate how its starting by reading /etc/systemd/system/xrdp.service
<superepic>
it looks like stdenv don't provide lex
<clever>
Lorne1: line 12-16, it creates a bash script called startwm that sources /etc/profile, then runs whatever you set as the defaultWindowManager
<Lorne1>
clever: is there somewhere I can confirm what path is set for defaultWindowManager?
<clever>
Lorne1: read /etc/systemd/system/xrdp-sesman.service and find the directory called xrdp.conf
<clever>
Lorne1: then read the startwm.sh script inside that
<phry>
is someone here using a brother printer? I've added the derice-specific cupswrapper package (and a few more) to service.printing.drivers, but it's not showing up among the web interfaces available drivers :/
<Lorne1>
clever: I think this is getting me somewhere.... the contents of startwm point to: /nix/store/1j2gibl8zhpcwi5503gi42szmbkardkk-xmonad-with-packages/bin/xmonad however, if I run ls -l $(which xmonad) from the undecorated xterm I get a different path.
<Lorne1>
it gives: lrwxrwxrwx 1 root root 75 Jan 1 1970 /run/current-system/sw/bin/xmonad -> /nix/store/jpqkkvrqm4glwpjwfxzfh7c4lywyi5zx-xmonad-with-packages/bin/xmonad
<clever>
Lorne1: try running the one from startwm when your just at an xterm
<Lorne1>
clever: Hmmm. startwm works. It gets me xmonad
<clever>
Lorne1: does your user have a startwm.sh file in $HOME?
<Lorne1>
clever: An update. Solved. I found "startwm.sh" in the journalctl. It pointed to a different path in /nix/store than the one I found earlier with your guidance (the one that worked to start xmonad). The one that I found in the logs only started xterm. I rebooted the system and it started using the working startwm. I should have tried "unplugging and plugging it back in" I guess.
<phry>
but it doesn't always help, so I'm eager to see if clever has a better fix xD
<clever>
i'm in the middle of an upgrade right now, just battleing low disk space
<clever>
so i may break the locales locally, lol
xcmw has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xcmw has joined #nixos
<hoshineko>
phry: thanks, i'm trying it now
<symphorien>
I am writing tests for nix-du, and sometimes on travis nix-store --gc --print-roots exits with code 1
<symphorien>
do you know what this means, and why it could happen ?
<{^_^}>
[nixpkgs] @pSub pushed to master « init perlPackages.GetoptArgvFile at 1.11 »: https://git.io/vhatj
<phry>
clever: I'm just trying to add the "unstable"-channel and even after logging out and logging in, that doesn't seem to make it to my NIX_PATH. am I missing something? (the handling of channels ans NIX_PATH is highly confusing to me :/ )
<clever>
phry: its the `/nix/var/nix/profiles/per-user/root/channels` element in NIX_PATH
<clever>
phry: for entries lacking a prefix=, nix will search for foo inside that dir
<clever>
so <foo> with NIX_PATH=/bar will check for /bar/foo
<clever>
and NIX_PATH=foo=/bar will map <foo> to /bar
<phry>
clever: argh, my fault. I was accidently skipping the nixos/modules part... -.-
logiq_ has quit [Ping timeout: 256 seconds]
softinio has quit [Quit: Connection closed for inactivity]
<{^_^}>
[nixpkgs] @xeji pushed commit from @r-ryantm to master « xmr-stak: 2.4.3 -> 2.4.4 (#41506) »: https://git.io/vhamV
Garry has joined #nixos
<lejonet>
Okay, is there any clever ways to give a general "don't verify SSL certs" when using nixops? I accidentally pushed a new ca-certificates.crt file that had 1 (yes you read that right, 1!) space between beginning of the line and ---end certificate--- on one cert, which makes anything use that file throw it all away (instead of just ignoring just that cert...) and I can't push anything new
rihards has quit [Quit: rihards]
<lejonet>
Is it just use ssh-for-each and set the generation back with 1 or something nifty like that?
<octalsrc[m]>
Is there a straight-forward way to build "stale" Haskell packages that require not-the-most-recent versions of some dependencies?
<{^_^}>
[nixpkgs] @Assassinkin opened pull request #41804 → pythonPakchages.python-hosts: init at 0.4.1 → https://git.io/vhaYS
<octalsrc[m]>
`haskellPackages` of course only contains the most recent versions of packages, but since it is automatically generated it seems like one could automatically generate an older set that works for some specific version bounds
<octalsrc[m]>
Does a tool already exist that does that?
<{^_^}>
[nixpkgs] @yegortimoshenko pushed 2 commits to master: https://git.io/vhaYx
<octalsrc[m]>
The motivating case is that I want to build `gitit`, which depends on some rather old versions of libraries that would be complicated to update
<lejonet>
octalsrc[m]: sounds like you want to setup an overlay for it and modify the packages related to this (iirc this is the exact scenario that overlays are made for)
woodson has joined #nixos
<octalsrc[m]>
lejonet: Yes, but the chain of modifying dependencies and their dependencies and so on might go very deep and get really tedious
justanotheruser has quit [Ping timeout: 276 seconds]
<elvishjerricco>
octalsrc[m]: You can use stackage2nix if an old stackage snapshot would work. Also, I think it'd be pretty easy to make tool that takes cabal-install's plan.json and outputs nix expressions for the versions that cabal-installed planned.
justanotheruser has joined #nixos
woodson has quit [Ping timeout: 268 seconds]
<octalsrc[m]>
Ah well, I guess it only needs to be done once for any particular target package
<clever>
phry: and why are you trying to patch it?
vaninwagen has quit [Quit: WeeChat 2.1]
<phry>
I'm building a similar brother printer driver that needs an additional file patched like that - and I was just thinking that this seems like such a common use case that I was guessing that there was some kind of standard tool for that
<clever>
ah
<clever>
and you cant use a tool like libredirect to change the file its reading at runtime?
<phry>
clever: never heard of that xD
<phry>
I guess there's a lot of nix-specific voodoo I have yet to learn ^^
<lejonet>
libredirect, sounds evilh :P
<phry>
clever: so I'll use wrapProgram, add libredirect to the LD_PRELOAD and then set the NIX_REDIRECTS environment variable?
<clever>
phry: yeah, that should work for any executable you want to redirect
<phry>
nifty
nschoe has joined #nixos
<clever>
phry: the only time ive ever seen it fail, was when i discovered a nasty program that passed null pointers to things like stat()!
<clever>
surprisingly, the kernel doesnt throw a fit when you do that
<clever>
but libredirect does, lol
<lejonet>
The kernel is very resilient in some places and not so in some others :P
<lejonet>
Anyone here got a handy guide on how/where to put things for letsencrypt acme, if I already have an account and such on another server? This is hopefully the last step needed to be able to start using my nixosified mailserver :D
Lev_ has joined #nixos
<nschoe>
Hi guys, I have troubles mounting my external hard drive. I'm wondering what you guys used for this.
Lev_ is now known as ld50_
<clever>
nschoe: sudo mount
<nschoe>
I tried `devmon`, but then I cannot write on the hard drive: it says "read-only fs"
<{^_^}>
[nixpkgs] @xeji pushed commit from @volth to master « lib: bitAnd, bitOr, bitXor (bitsize-agnostic fallback function) (#41491) »: https://git.io/vhasc
ld50_ has quit [Client Quit]
<nschoe>
clever, yeah, I then tried `sudo mount -o rw,uid=1000,gid=100,user,exec,umask=003,blksize=4096 /dev/sdb1` but then got "wrong fs type, bad option, bad superblock on /dev/sdb1, missing codepage or helper program, or other error"
<clever>
nschoe: what does `blkid /dev/sdb1` say?
<YegorTimoshenko[>
lejonet: i'd suggest just adding `services.nginx.virtualHosts."example.com".enableACME = true;` to your config (you might also need `networking.firewall.allowedTCPPorts = [ 80 ];` if you have firewall enabled), certificate for the mail server will be in /var/lib/acme/example.com
Lev50 has joined #nixos
<nschoe>
clever, it says "/dev/sdb1: LABEL="Elements" UUID="4E1AEA7B1AEA6007" TYPE="ntfs" PARTUUID="d56873c4-01""
<lejonet>
YegorTimoshenko[: well the conf I know, but like, I already have certs, account files and stuff I want to migrate over :P
<clever>
nschoe: boot.supportedFilesystems = [ "ntfs" ]; and then nixos-rebuild
<Lev50>
I'm very new to nix, just started using it as my package manager on MacOS. Is this a good place to ask noob questions?
<nschoe>
clever, okay I'm trying this, thanks. But why is it in "boot"?
<clever>
nschoe: most kernel related stuff is in boot
<nschoe>
clever, okay :)
<gchristensen>
Lev50: you bet
<phry>
so... can two derivations reference each other's path somehow?
<clever>
phry: nix does not allow cycles in the dep graph
<phry>
feared so :/
<nschoe>
clever, thanks, it worked: I can mount it with a simple "sudo mount". However, everything is owned by "root:root" and permissions are "drwxrwxrwx". Is this something normal?
<YegorTimoshenko[>
lejonet: i haven't tested that, but i think you could place account file in `/var/lib/acme/example.com/account_key.json`, private key in key.pem, full cert chain in fullchain.pem, and `cat key.pem full.pem > full.pem`
<clever>
nschoe: thats normal when using fuse
<nschoe>
clever, erf okay. And there's no alternative?
<clever>
nschoe: check the man page for ntfs3g and see what options it supports when mounting
<YegorTimoshenko[>
additionally, on my machine, /var/lib/acme/example.com is 700 nginx:nginx, along with its contents
<nschoe>
clever, okay thanks for that
robstr has quit [Quit: WeeChat 1.9.1]
xcmw has joined #nixos
<YegorTimoshenko[>
lejonet: you could also issue new cert without migration at all, because let's encrypt certificates don't have price or significant meaning anyway
<lejonet>
YegorTimoshenko[: its mainly the account I want to keep, the certs I know, I'll just ask it to create new ones :P
nico202 has quit [Ping timeout: 240 seconds]
<YegorTimoshenko[>
lejonet: let's encrypt accounts are ephemeral, it's just for cert revokation. there won't be any difference if you create new one. nixos creates one account per domain anyway.
<phry>
so I now have two derivations, both contain binaries that I have to patch, both reference each other, none of them are on $PATH. how would one do that? :/
<lejonet>
YegorTimoshenko[: I guess so, seeing as I'm replacing an already existing server, it would've been nice to just extend the current cert over to the new server instead to keep continuity, but I guess just using current cert and put them in the appropriate places is enough
igo95862 has quit [Quit: igo95862]
<YegorTimoshenko[>
phry: this would cause a circular dependency. you could work around that by creating a third derivation that copies binaries from both and patches them
<lejonet>
Tho with how mails work, it doesn't matter too much if I have a little downtime I guess
oida has joined #nixos
<YegorTimoshenko[>
lejonet: you could copy cert and key from previous server over to /var/tmp, use that, switch DNS record to the new server, then replace that with declarative ACME on the new server. that would guarantee no downtime
<Lev50>
A lot of the documentation I'm reading uses `nix-env -i firefox` as an example. However on my machine nix-env -qa firefox finds nothing. Here's my nix-info: https://pastebin.com/CbRt9yWD
<Lev50>
Is that expected?
<YegorTimoshenko[>
Lev50: we should replace that with `nix-env -iA nixos.firefox`
<YegorTimoshenko[>
ah, you're on darwin
<LnL>
yes, we currently don't have a working firefox build for darwin
<LnL>
somebody made a wip pull request for it tho
<Lev50>
is nix-env -qa the best way to find what is and isn't available for my machine
<Lev50>
For example, there is also no chromium
halfbit has joined #nixos
<LnL>
try nix-env -iA nixpkgs.firefox, you'll get an error message that explains it's not supported
<lejonet>
YegorTimoshenko[: worth a shot :)
<gchristensen>
Lev50: for gUI stuff like browsers, on macos should probably not use Nix for it.
<LnL>
nix-env -qa will indeed only list packages available for your current platform
<YegorTimoshenko[>
LnL: maybe we should use `nix-env -f '<nixpkgs>' -iA firefox` in docs? that works across nixos, other linux distros and darwin
<Lev50>
LnL: no error message given for that command
<Lev50>
ld50:~ lev$ nix-env -iA nixpkgs.firefox
<Lev50>
ld50:~ lev$ nix-env -iA nixos.firefox
<Lev50>
error: attribute 'nixos' in selection path 'nixos.firefox' not found
<{^_^}>
[nixpkgs] @xeji pushed commit from @ckauhaus to release-18.03 « libtiff: 4.0.9 update ptches »: https://git.io/vhaGW
<LnL>
YegorTimoshenko[: yeah, I always use that if I don't know what platform people are on
<Lev50>
What does -f '<nixpkgs> do?
<LnL>
I sometimes wonder why we even have the channel namespacing
<Lev50>
Nvm, man page explains.
<LnL>
(same with the new cli)
<LnL>
even if we drop the weird flags, nix install nixpkgs.hello is still hard for new users
<gchristensen>
LnL: I agree
fendor has quit [Ping timeout: 256 seconds]
<rotaerk>
Ralith, you there?
matthewbauer has quit [Ping timeout: 256 seconds]
<YegorTimoshenko[>
LnL: i agree as well, for purposes of extending nixpkgs overlays work just fine, channel namespaces seem to be redundant
<gchristensen>
LnL: I think a hard thing is right now `nix` is used for 'package management' and 'building' annd that makes it all a lot more complicated
<gchristensen>
maybe there should be a separation somewhere
<LnL>
nix build works the same way currently, it doesn't use ./. by default
<Garry>
Hi all, qq. What's considered the idiomatic way to spin up dev postgres dbs in nixos?
<phry>
Garry: dbs are data, nixos will only help you to the level of installing & configuring a service
Intensity has quit [Ping timeout: 260 seconds]
civodul has quit [Quit: ERC (IRC client for Emacs 26.1)]
Intensity has joined #nixos
justanotheruser has quit [Ping timeout: 256 seconds]
<rotaerk>
hmm if I have a clone of nixpkgs, and I made a change to a derivation deep within pkgs, what's the easiest way to see the build output of that?
<{^_^}>
[nixpkgs] @xeji pushed commit from @Gerschtli to master « atom: patchelf ctags binary (#41811) »: https://git.io/vhaWZ
fendor has quit [Ping timeout: 245 seconds]
acarrico has quit [Ping timeout: 264 seconds]
Have-Quick has joined #nixos
fendor has joined #nixos
thc202 has quit [Ping timeout: 265 seconds]
semilattice has joined #nixos
<{^_^}>
[nixpkgs] @xeji merged pull request #41615 → pkgs/qemu: tell qemu where to find smbd → https://git.io/vhEr0
<{^_^}>
[nixpkgs] @xeji pushed commit from @eqyiel to master « pkgs/qemu: tell qemu where to find smbd if smbdSupport is true (#41615) »: https://git.io/vhaWS