<mizmorYodh>
well I'm obviously gonna choose the declarative way since it's pure and amazing haha! The only thing i'm not sure rn is how to integrate my dotfiles with all this
<jasongrossman>
,declarative
<{^_^}>
There are multiple ways of managing declarative profiles. 1) Attrset, compatible with imperative use of nix-env https://git.io/fAQHW ; 2) buildEnv, providing more control over the paths that are linked into the profile https://git.io/fp0aU ; 3) home-manager, providing nixos-like config for your ~ https://github.com/rycee/home-manager
<jasongrossman>
mizmorYodh: If that seems too complicated for dotfiles, I agree. I manage my dotfiles outside NixOS (but with very good backups).
<jasongrossman>
mizmorYodh: The priority in NixOS has been OS-level stuff plus getting important packages to work. One day, NixOS will proably make something like home-manager official, but that hasn't happened yet.
rprije has joined #nixos
<mizmorYodh>
jasongrossman: yea that would be pretty awesome! I found home-manager but i didnt if it was the way to go tbh! the thing is i find it awkward for many programs to input the whole config file in a long string directly into the configuration.nix
<mizmorYodh>
also, i'd like to be able to use my dotfiles outside of nixos so i'd still like to keep the config files if possible
<ottidmes>
mizmorYodh: you could point to those files from your configuration, it will just create symlinks to them
<jasongrossman>
mizmorYodh: Right.
<jcob>
gah. Im really annoyed by this rn. Ive been trying to set up znc for hours. All I want is nix to get out of the way and let me manage the config files. Does anyone have a setup like that that I could borrow? Thanks
<jasongrossman>
mizmorYodh: The important thing to realise is that you can manage dotfiles however you like, while some system-wide things (especially system services) HAVE to be managed by NixOS.
<mizmorYodh>
jasongrossman: yeah and that really makes sense! I think i'm gonna go the symlinks way
<mizmorYodh>
ottidmes: how would one do this tho? im not that familiar with the nix langage yet and with the config options
<ottidmes>
mizmorYodh: if you are OK and allowed by the relevant programs, the easiest way is to just put things in /etc, the other option would be to create a systemd service that creates them for you
xkapastel has quit [Quit: Connection closed for inactivity]
JonReed has quit [Quit: Page closed]
<suzu>
sed: can't read azure/mgmt/compute/computemanagement.py: No such file or directory
<suzu>
builder for '/nix/store/wbvwarpgp5wjfcl4jrfbabc3jc7r7xa7-python2.7-azure-mgmt-compute-4.4.0.drv' failed with exit code 2
<suzu>
wtf?
<suzu>
i'm trying to just do nix-env -i nixops
<ottidmes>
suzu: do nix-env -f '<nixpkgs>' -iA nixops instead
<suzu>
hmm ok
<suzu>
whats the difference?
<mizmorYodh>
ottidmes: hmm i see! so like for instance, since vim in installed as a system service, it's default config file will be in /etc, right? and then i just have to make that file point to the actual file i wanna use?
<ottidmes>
mizmorYodh: yep
jluttine has quit [Ping timeout: 255 seconds]
<ottidmes>
suzu: not much of a nix-env user myself, so probably someone as can give a better answer, but I believe nix-env -i nixops tries to evaluate the whole of nixpkgs filtering their names to determine if it matches nixops, while with -A short for --attr it will interpret the nixops argument as an attribute name and install that directly (what you want)
<mizmorYodh>
ottidmes: ok sounds good!
<ottidmes>
mizmorYodh: personally I still have something in place that installs certain config files in my $HOME directory, thinking that was the only way to do it, but I found out that all my cases are actually doable from /etc, since all (that I use anyway) always look at some location in /etc at some point
<noonien>
do i use wrapProgram to wrap a python script? or is there something like wrapPythonProgram?
<mizmorYodh>
ottidmes: ohhh ok nice! and since i'm the only one using my laptop, i dont really care putting my dotfiles directly there
<ottidmes>
suzu: the -f (short for --file) points to the file defining the attrset you want to install something from, I just specified it explicitly, its necessary in my setup, but not in your probably, doesnt harm though
<ottidmes>
mizmorYodh: right, and as a bonus your $HOME is somewhat cleaner
<suzu>
seems to be necessary in mine
<suzu>
why is this
<ottidmes>
suzu: ah right, I think I remember
<ottidmes>
suzu: I assume you use nix-channel?
<mizmorYodh>
ottidmes: alright! thanks a lot :)
<suzu>
yeah
<ottidmes>
I think the default channel name is called nixpkgs, then nix-env -iA nixpkgs.nixops would have worked (or maybe the name is nixos, then its nix-env -iA nixos.nixops), check nix-channel --list I guess
<suzu>
oh, i've got this nixos-small channel here too
<suzu>
that must be it i guess..?
<suzu>
ill rmeove it
<ottidmes>
no
<ottidmes>
thats not it
<suzu>
oh
<suzu>
ok
<suzu>
idk
<suzu>
wtf
<ottidmes>
its just that nix-env by default uses ~/.nix-defexpr
<suzu>
so it looks in the wrong place by default?
<ottidmes>
no
<ottidmes>
it needs to know which channel to use
<suzu>
i see
<ottidmes>
when not specifying a --file
<suzu>
what is it doing by default?
jcob has quit [Remote host closed the connection]
<suzu>
additionally, i can't upgrade nixops' nixpkgs wtf
sicklorkin has quit [Quit: Changing server]
<suzu>
it only works with -I nixpkgs=https://github.com/nixos/nixpkgs-channels/archive/nixos-18.09.tar.gz
<ottidmes>
I checked the source recently, it binds the channels directory to an attribute name, and its subdirectories as attribute names to (i.e. the channel names), so they become available as top-level attributes
<suzu>
but i wnat to use 19.03
<suzu>
and if i nixops deploy i get this
<suzu>
error: 'mkOption' at /home/user/.nix-defexpr/channels/nixpkgs/lib/options.nix:30:5 called with unexpected argument 'options', at /nix/store/4lfs1751qc86lidq55x70g6ipzzwdgnk-nixops-1.6.1/share/nix/nixops/gce.nix:382:19
<ottidmes>
ah, thats a somewhat recent change, seems like nixops 1.6.1 is not compatible with that change, not sure if there is a more recent version that has it fixed
<das_j>
Is there a way to get system config variables via nix eval?
<das_j>
something like config.services.nginx.enabled
leothrix has joined #nixos
<ottidmes>
suzu: but ^ delroth gave you a solution for your nixops issue, you need to use nixopsUnstable, the person saying it was still broken was using stable nixops as well, and delroth is the author of the closed issue, so they should know best
<ottidmes>
das_j: sure, just use with import <nixpkgs/nixos> { };
<ottidmes>
there might be people around that do, I only use nix2cabal for my projects
<das_j>
ottidmes: Is there also a way if I have something like this? ((import <nixpkgs/nixos>) { configuration = ./configuration.nix; }).system
<das_j>
(it's not the local system)
<suzu>
it's doing some shit i dont understand at all, and then dying with no error information
<suzu>
ghc is a dep but stack then goes on and downloads it's own
<suzu>
and then it exits with 'error 1'
<{^_^}>
[nixpkgs] @strager opened pull request #56740 → kitty: support macOS → https://git.io/fhAFO
<suzu>
Configuring GHC ...
<suzu>
Received ExitFailure 1 when running
<boomshroom>
Is it possible to tell GCC a different target from the system's config?
<ottidmes>
das_j: if its just about config.services.nginx.enable than probably, but it would be much easier if you had access to the configuration, you really dont?
<das_j>
ottidmes: I'm testing a module and I'd like to know whether it sets the proper variables
<boomshroom>
Ie: tell nixos about a x86_64-linux-relibc target, but have it give something else like x86_64-linux-newlib and pretend that relibc is actually newlib?
mizmorYodh has joined #nixos
<ottidmes>
das_j: sure, but my question to you is whether you only have like the out path of the system, or if on that other machine, you can also just access its config, <nixpkgs/nixos> should default to the default impure locations (NIXOS_CONFIG, <nixos-configuration>, or /etc/nixos/configuration.nix)
<ottidmes>
ehh <nixos-config>
<das_j>
ottidmes: I think this is it: (with import <nixpkgs/nixos> { configuration = ./configuration.nix; }; config.services.nginx.enable)
<ottidmes>
das_j: yeah that is saying explicitly where the configuration can be found, if that is working, great, than I must have misunderstood your question when you showed: ((import <nixpkgs/nixos>) { configuration = ./configuration.nix; }).system
<das_j>
I think it was the .system
<das_j>
instead of .config
<ottidmes>
das_j: yeah obviously :P but I thought that you somehow did not had access to .config, but only like the path produced by .system
<das_j>
so .system is the out path?
<ottidmes>
das_j: no, its a string like "x86_64-linux"
<scientist>
hello guys, I just finished creating my own custom keyboard layout but but some of the keys on my keyboard are not working, I think it is because of this: https://hastebin.com/epoyunohoz.rb , do you guys know a simple and easy way to fix this ?
<oldandwise>
simpson: seems so. Wondered why. These tools were very handy
<scientist>
simpson: my custom keyboard layout is done, it's a few of the keys are not working when pressed, I think it is because of this: https://hastebin.com/epoyunohoz.rb
<oldandwise>
and there is no equivalent functionality offered by bluetoothctl
<justanotheruser>
When I try to `nixos-rebuild switch`, it complains about the line `--set XORG_DRI_DRIVER_PATH ${super.mesa}/lib/dri \` https://paste.debian.net/plain/1071145 Why does it complain when I have mesa_noglu in environment.systemPackages
<{^_^}>
[nixpkgs] @matthewbauer opened pull request #56744 → Update macOS to 10.12 → https://git.io/fhAFo
simukis has quit [Quit: simukis]
<suzu>
ok i just upgraded nixops to unstable
<suzu>
now i upgrade my local nix and maybe that'll fix everything
init_6 has joined #nixos
scientist has quit [Quit: WeeChat 2.2]
mobile_c has joined #nixos
<ottidmes>
justanotheruser: its saying it in the error, because apparantly the mesa attribute does not exist on super
<ottidmes>
justanotheruser: you probably want ${super.mesa_noglu}
<{^_^}>
[nixpkgs] @jtojnar opened pull request #56745 → ffado: port to qt5 → https://git.io/fhAFK
<ottidmes>
justanotheruser: but probably better even is to use: /run/opengl-driver/lib/dri, which AFAIK will differ depending on what driver you have installed, which is what you most likely want
mobile_c has quit [Read error: Connection reset by peer]
leothrix has quit [Remote host closed the connection]
<justanotheruser>
mesa_noglu fixed it
leothrix has joined #nixos
<justanotheruser>
unfortunately now there appears to be an error that doesn't even reference my configuration.nix. I'm struggling to figure out what I'm supposed to be looking for https://paste.debian.net/plain/1071146
<ottidmes>
justanotheruser: or if xorgserver is already made overridable, instead of calling lib.overrideDerivation call overrideDerivation directly on it, since that will do as the line I just linked for you
<hyperfekt>
is there any way to see the point where two derivations and their dependency trees diverge?
mobile_c has quit [Quit: Konversation terminated!]
<jcob>
hm
<ottidmes>
hyperfekt: nix-diff?
<justanotheruser>
ottidmes: isn't overrideDerivation being directly called on it on line 5 already?
silver_ has quit [Read error: Connection reset by peer]
<hyperfekt>
oh my god id didn't expect that to exist. awesome, thank you!
<ottidmes>
justanotheruser: which line 5? you mean in xwayland.nix? if so, thats the problem, it used to exist, but the moment you call lib.overrideDerivation a new derivation gets made and those extra attributes get trimmed away, so they will have to be readded, which is what the overrideDerivation as attribute does for you automatically, but that page you linked just used the lib function directly, i.e. removing the
<boomshroom>
`addAttrsToDerivation` Where was this when I was hacking on nixpkgs last?!
<suzu>
ottidmes: i still get that bug which should be supposedly fixed
<ottidmes>
justanotheruser: again lib.overrideDerivation is indeed the function, but what is expected in xwayland.nix is that the attribute overrideDerivation exists, which is a lambda that calls lib.overrideDerivation and ensures that the attribute is added again after the new derivation is made
<suzu>
how do i confirm that i've updated my nixpkgs and such?
<ottidmes>
justanotheruser: the passthru attribute exists for a reason, any time you recreate a derivation, it generates a fresh attribute set representing a derivation, all attributes strictly not part of the derivation will be removed in the process, which includes the lambdas/functions added by makeOverridable.
scientist has joined #nixos
<{^_^}>
[nixpkgs] @andrew-d opened pull request #56748 → xournalpp: init at 1.0.8 → https://git.io/fhAFH
leothrix has joined #nixos
<scientist>
this directory is unwritable: [tjg@tjg:~]$ nano /etc/X11/xkb/symbols/us , how do I make it writable ?
<clever>
scientist: you dont, you make an override to change it at nixos-rebuild time, in an automated way
<clever>
scientist: so you want to write a derivation that will create a copy of ${pkgs.xkeyboard_config}/etc/X11/xkb with changes, and then put the path to that copy inside services.xserver.xkbDir
<hyperfekt>
buildEnv = callPackage ../build-support/buildenv { }; # not actually a package --- so much for my instantiating it and inspecting with nix-diff
<suzu>
hmmm okay
<clever>
hyperfekt: yeah, its a function, that takes more args to create a package
<suzu>
i'll wrestle with stack2nix then clever
<suzu>
clever: do you know why haskell.lib.buildStackProject wont work in the first place?
<clever>
suzu: not really
<suzu>
lol ok
<suzu>
i have spent several hours ripping my hair out
<hyperfekt>
well the only things used in producing builder.pl are substituteAll and builtins.storeDir. is suspect the latter is the reason for my divergence, but i can't tell why
<clever>
hyperfekt: can you diff the 2 builder.pl files?
<hyperfekt>
clever: There's no difference, that's the weird thing
<scientist>
infinisil: are you there, I could really use your help right now
<hyperfekt>
clever: Except for the path, of course.
<hyperfekt>
clever: wait, they have a different mode? could that be it?
<clever>
hyperfekt: yeah, the mode is included in the hash i believe
<hyperfekt>
so i gotta copy nixpkgs with the right mode to keep package equivalence? that doesn't seem like it should be :|
<clever>
hyperfekt: the nix files expect +x files to remain +x'd
<hyperfekt>
alright, i guess i found the fix then. thanks for your help!
<{^_^}>
[nixpkgs] @worldofpeace pushed 2 commits to master: https://git.io/fhAbt
<justanotheruser>
I'm still working on this file. Now I'm stuck on this error: `cannot coerce a function to a string, at /etc/nixos/russian-dvorak.nix:129:27` https://paste.debian.net/plain/1071153
<boomshroom>
Sometimes I get frustrated with how fixed nixpkgs and gnu are, and other times I get amazed by how customisable it all is.
<hyperfekt>
oh my god that did it
<hyperfekt>
the derivations are almost identical
<hyperfekt>
i cant believe i did it, im so hyped right now
<hyperfekt>
thank you clever (and also ottidmes), i would've been puzzled for ages
<hyperfekt>
I now have an option that I can point to a list of patch files and that will change the source of NixOS that I got via nix-channel and build my system with that
<ottidmes>
justanotheruser: maybe paste that russian-dvorak.nix file? you probably have not fully applied a function (i.e. given it all its arguments)
<justanotheruser>
ottidmes: thats what the link is
<ottidmes>
justanotheruser: thats a diff though, how am I to know what line 129 is?
<Ashy>
oh, qutebrowser appears to fail to build on unstable atm
leothrix has joined #nixos
mizmorYodh has joined #nixos
slack1256 has joined #nixos
<mizmorYodh>
I set the boot.loader.timeout option to null so that the boot screen shows indefinitely but it doesn't display at all. Any idea why? I tried setting it to 30 and it worked but when it is set to null, it just skip the boot screen and it chooses the current generation
<jasongrossman>
Ashy: Refuses to build? Isn't there a cached binary for it?
<ottidmes>
mizmoryodh: you probably want to set it to 0
<Ashy>
`nix-shell -p qutebrowser` fails and has sed errors in what looks like a patching step
<jasongrossman>
Ashy: I see.
<Ashy>
related to azure-mgmt-storage and azure-mgmt-resourcemanager
<jasongrossman>
Ashy: When I do nix-shell -p qutebrowser, it downloads the cached binary.
<clever>
jasongrossman: your trying to call overrideAttrs on something that lacks overrideAttrs
<mizmorYodh>
ottidmes: "Timeout (in seconds) until loader boots the default menu item. Use null if the loader menu should be displayed indefinitely." that's what it says in the option description tho :( haha
<jasongrossman>
clever: Did you mean to reference me?
<jasongrossman>
Ashy: But I still can't think why it's building for you, rather than using the binary.
<clever>
mizmoryodh: so it will either write "timeout 30" or "timeout " to your loader.conf file
mobile_c has quit [Quit: Konversation terminated!]
<jasongrossman>
Can anyone think of why Nix might be building qutebrowser for Ashy, even though there's a good binary using the latest derivation in the cache?
<clever>
jasongrossman: any overrides in config.nix?
<jasongrossman>
Ashy: ^
<justanotheruser>
ottidmes: as recommended, it looks like this now https://paste.debian.net/plain/1071157 however, I am still getting the error `cannot coerce a function to a string, at /etc/nixos/russian-dvorak.nix:131:27`
<Ashy>
not that i know of, i havent dug into overrides yet
<ottidmes>
Ashy: any overlays?
<Ashy>
ah, i have an overlay for vagrant
<mizmorYodh>
clever: as i understand it, if i set the timeout to null, it will be set to an empty string, and if it's set to an empty string it will never use the timeout attribute and take the default generation, no?
noonien has quit [Quit: Connection closed for inactivity]
<clever>
mizmoryodh: depends on what systemd itself will do when you have "timeout " in the config file
<ottidmes>
otherwise you could pin nixpkgs to a commit that has it in the cache for sure, or get the .drv. somehow else, and compare your qutebrowser .drv with that of the cache via nix-diff
dramforever has joined #nixos
<clever>
mizmoryodh: you can also read the loader.conf in /boot to confirm its doing that
<mizmorYodh>
clever: timeout is not specified in the file, which makes sense since the line of code you linked said that if the @timeout@ value != "", it will write the timeout value and in my case, it is equal to "" since i specified null
<clever>
ah, missed that if
<clever>
then i would expect it to not have a timeout
<mizmorYodh>
clever: idk how systemd-boot timeout works, im gonna go read on that rn
<mizmorYodh>
clever: "timeout – menu timeout in seconds before the default entry is booted. If this is not set, the menu will only be shown on Space key (or most other keys actually work too) press during boot."
<clever>
so it wont have any timeout, and will boot immediately, if you not holding space
mobile_c has joined #nixos
<ottidmes>
mizmoryodh: ah my bad, apparantly -1 is indefinitely: "A timeout of ‘0’ means to boot the default entry immediately without displaying the menu; a timeout of ‘-1’ (or unset) means to wait indefinitely."
<pie___>
E_CONTRADICTION, /me back to the drawing board :p
<pie___>
clever, i dont suppose I can just get the path relative to the current nix file
<clever>
pie___: not easily
<pie___>
ij
<pie___>
* ok
mobile_c has quit [Read error: Connection reset by peer]
<aanderse>
anyone else using kde and have wine installed and when they click on links in konversation an infinite loop of wine programs try to open and almost crash your system unless you kill all wine processes?
<slack1256>
on the fetchFromGithub function, the sha256 arguments to pass is of the tar.gz file it will download?
<infinisil>
slack1256: Nope, it's of the unpacked contents
hamishmack has joined #nixos
hamishmack has quit [Client Quit]
<clever>
slack1256: to be specific, its the sha256 of the NAR of the unpacked contents
<samueldr>
,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.
<samueldr>
if it isn't because you want to independently double-verify
<{^_^}>
[nixpkgs] @worldofpeace pushed 2 commits to master: https://git.io/fhANG
hamishmack has joined #nixos
<pie__>
is there a way to construct a derivation as if i was constructing a nix shell so that i can get environment variables and stuff as well?
<pie__>
implicitly i mean. so i would like to get an executable i can run that would behave as if it was whichever thing, in a nix shell with some list of packages
<pie__>
(usually i would just use a nix shell)
vk3wtf has joined #nixos
gspia has joined #nixos
<pbb>
Is there a way to use packageOverrides to replace a kernel module in all linuxPackages?
<{^_^}>
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.
<slack1256>
Hahaha so it is a pretty common question
<boomshroom>
I can't remember how many digits to use, so I just copy the hash of another package and change 1 character
<Izorkin>
Not work this wariant with optionalString mainCfg.enableRootless - https://pastebin.com/mvpVgdpz How to fix? error syntax error, unexpected ID, expecting '.' or '=', at ../apache-httpd/default.nix:753:11
<Myrl-saki>
bash: echo: write error: Operation not permitted
<Myrl-saki>
:C
<clever>
its a special write-once file
<Myrl-saki>
Ah.
<Myrl-saki>
Does that mean I should patch chrootenv.c?
<clever>
so a malicious program cant just give itself more perms
<clever>
probably
<kisik21>
Any tips on how to create a hybrid bootable NixOS system without burning a read-only ISO? The use case is a self-updatable self-contained flash drive with NixOS that can be plugged into both BIOS and UEFI-based systems.
<clever>
kisik21: just do a normal nixos-install against a usb stick, set the removable efi flag, and make a bios boot partition
<kisik21>
what about Secure Boot? is something like shim would be present or would I need to enroll my own keys?
<kisik21>
How does NixOS handle Secure Boot anyway?
<clever>
kisik21: last i checked, nixos doesnt really support secureboot, so you have to disable it in the firmware config
<kisik21>
oh crap
<kisik21>
I guess if I want secure boot I'll have to manage EFI system partition myself
ixxie has quit [Ping timeout: 246 seconds]
<clever>
with my laptop, i have the option to whitelist an efi binary
<clever>
so i can allow a given grub.efi file, without having to manage any keypairs
<clever>
but grub itself, doesnt support verifying the config or kernel, so it wont really do any good, since anybody can modify /boot maliciously
<clever>
as long as the grub itself is unmodified
<kisik21>
I'm actually ok with enrolling my own keys if that's what I need to do, the laptop is my mom's and she probably won't protest since Windows should still boot...
<kisik21>
she often does Windows-only work (M$ Office)
orivej has quit [Ping timeout: 250 seconds]
<kisik21>
I'm an UEFI noob though, never worked with UEFI aside from disabling secure boot on an Intel Atom-based tablet to (unsuccessfully) boot Linux
<clever>
if you use that option, grub will use a special filename, meant for removable media
<clever>
which UEFI can then boot, without having the right things in the efi vars
<clever>
without that, you must setup efi vars before you can boot a given os
<clever>
and you can only configure efi vars if you boot via efi
<Myrl-saki>
clever: I don't think this is possible anymore. :/
<kisik21>
does GRUB support f2fs?
<clever>
kisik21: dont see it listed in /boot/grub/i386-pc
<clever>
kisik21: but grub only has to support the /boot fs, linux deals with /
<kisik21>
oh right and /boot could be merged with ESP
<kisik21>
arch linux does that IIRC
<clever>
by default, nixos wants /boot to be the ESP, and its formated fat32
<clever>
but, if you set boot.loader.efi.efiSysMountPoint = "/boot/EFI";, then you can make /boot/ ext4, (or even a subdir of /)
<clever>
and /boot/EFI will be the fat32 ESP
<kisik21>
nah, I'm used to /boot meaning a boot partition, whatever it should be for the current system (bootloader and ESP for EFI, just bootloader for legacy)
<clever>
you could even have a seperate fs for / /boot and /boot/EFI, if you wanted
<Myrl-saki>
X Error of failed request: BadValue (integer parameter out of range for operation)
<Myrl-saki>
Major opcode of failed request: 151 (GLX)
<Myrl-saki>
Minor opcode of failed request: 24 (X_GLXCreateNewContext)
<clever>
Myrl-saki: what about the xserver logs?
<kisik21>
clever: I have disabled Secure Boot temporarily, because the hassle of enrolling my own keys seems to be... too much for now. And with risk of breaking Windows.
<clever>
kisik21: my laptop appears to have full control of the secureboot cfg, including just whitelisting a binary without signing
<Myrl-saki>
Says nothing.
<clever>
kisik21: my desktop, only has on or off, and "on" is M$ keys only
<Myrl-saki>
tail -f /var/log/X.0.log
<Myrl-saki>
-f is follow, right?
<clever>
Myrl-saki: strace xserver?
<Myrl-saki>
Oh boi
<kisik21>
clever: How do you manage NixOS booting on your laptop?
<clever>
yeah, lol
<kisik21>
do you sign kernels?
<Myrl-saki>
That's gonna be a bit complicated lmao
<clever>
kisik21: i whitelisted grub.efi, but thats it
<Myrl-saki>
I'll have to change the display-manmager module, right?
<clever>
kisik21: and grub's config isnt signed, so anybody could mess with that cfg
<kisik21>
ugh totally defeats the purpose of secure boot
<clever>
Myrl-saki: you can attach to a pid thats already running, strace -p <pid>
<clever>
kisik21: grub would need to be modified to verify future things, and have a cert baked into it
<clever>
kisik21: i think systemd-boot may have better options
<kisik21>
how about having grub.cfg on an encrypted partition? i.e. separate /boot from ESP
<kisik21>
would that be more secure?
<kisik21>
is it even possible?
<kisik21>
I launched GRUB with cryptodisk one time on my NixOS system by mistake
<clever>
kisik21: grub does support crypto, but i dont know how it deals with encrypted /boot/
<kisik21>
It asks for password.
<Myrl-saki>
clever: I think I know what's wrong now.
<Myrl-saki>
Wait.
<Myrl-saki>
Yeah.
<Myrl-saki>
primusrun glxgears
<Myrl-saki>
X Error of failed request: BadMatch (invalid parameter attributes)
<Myrl-saki>
Major opcode of failed request: 152 (GLX)
<Myrl-saki>
Minor opcode of failed request: 11 (X_GLXSwapBuffers)
<Myrl-saki>
I probably just need to reboot.
simukis has joined #nixos
ng0 has joined #nixos
<clever>
[root@amd-nixos:~]$ grep Groups /proc/3010/status
<clever>
Myrl-saki: this will show what groups a given pid is in
<clever>
Myrl-saki: because group membership can include things not in the groups file
iyzsong has quit [Read error: Connection reset by peer]
init_6 has quit [Ping timeout: 245 seconds]
<{^_^}>
[nixpkgs] @peti pushed to haskell-updates « hackage-packages.nix: automatic Haskell package set update »: https://git.io/fhApE
<Myrl-saki>
Welps, apparently changing owner to users doesn't seem to work. :c
init_6 has joined #nixos
<{^_^}>
[nixpkgs] @bendlas opened pull request #56775 → azure-mgmt-*: re-init older versions for use with nixops → https://git.io/fhApu
jasongrossman has quit [Ping timeout: 245 seconds]
<Myrl-saki>
ls -l /var/run/bumblebee.socket
<Myrl-saki>
srw-rw---- 1 nobody users 0 Mar 3 17:35 /var/run/bumblebee.socket
<srhb>
Myrl-saki: Hmm, what are we suspecting is the problem currently?
<clever>
Myrl-saki: what daemon is listening on that socket, try strace'ign that?
<Myrl-saki>
clever: bumblebeed.
ericsagnes has joined #nixos
<Myrl-saki>
srhb: I honestly have no idea.
<srhb>
Myrl-saki: I suspect the primusrun error is just a problem with libglvnd though
<Myrl-saki>
What if you set GAME_DEBUGGER to primusrun?
<clever>
maybe
<Myrl-saki>
That aside. I didn't get it wor.
<Myrl-saki>
Anyways, some more strace shenanigans.
<Myrl-saki>
Oh fuck, right. glxgears works fine. Everything else doesn't.
<{^_^}>
[nixpkgs] @bendlas pushed to master « nixopsUnstable: mark as broken »: https://git.io/fhApj
rfold has joined #nixos
linarcx has joined #nixos
<Myrl-saki>
Oh okay, I think I'm starting to do something.
<Myrl-saki>
I just need to know what shouts "X Error of failed request: BadValue"
<clever>
Myrl-saki: something else, is that X11 errors are async, so it can be hard to pair an error with a request
<clever>
but x11 has a sync mode (via an env var) that makes every req wait for the reply (or error)
<Myrl-saki>
clever: libx11 is synchronous tho, right?
<Myrl-saki>
s/libx11/Xlib/
<clever>
not sure
<linarcx>
Hi. i want to auto mount some ntfs partitions in config file. but i get this error message: The option value `fileSystems./run/media/linarcx/C/' in `/etc/nixos/configuration.nix' is not of type `submodule'.
<linarcx>
and this is the line in configurarion: # Auto Mount Partitions
<Myrl-saki>
From what I understand, the primus/optimus library hardcodes unix/8
<clever>
this can also be used to create an annonymous file, which you can then mmap, and forward to children, or unix socket peers
<clever>
and then use for shm
<Myrl-saki>
And the daemon also uses unix/8.
<clever>
you can use $DISPLAY to change which unix socket is used
<Myrl-saki>
Right, but the library itself hardcodes unix/8.
<clever>
srwxrwxrwx 1 root root 0 Jan 20 20:39 /tmp/.X11-unix/X0
<clever>
:0 uses that socket
<Myrl-saki>
I'll be changing the output display, but not the "render display"
<rnhmjoj>
i have updated a fixed update derivation and apparently it's no longer deterministic. is there any trick or tool to detect the source of nondeterminism?
<clever>
rnhmjoj: zero out a few digits of the hash
<clever>
rnhmjoj: if the hash hasnt changed, nix belives that the output also hasnt changed, and keeps using the cached result
<clever>
Myrl-saki: if you change DISPLAY=:1, you can make it try a different socket
<rnhmjoj>
clever: so i should try to rebuild it multiple times and compare for changes?
<clever>
Myrl-saki: finding the next thing...
<clever>
rnhmjoj: yeah, you typically will make the hash invalid, build it once, and then use the error to get the real hash
<{^_^}>
[nixpkgs] @vbgl pushed to master « ocamlPackages.stdlib-shims: init at 0.1.0 »: https://git.io/fhAha
<clever>
rnhmjoj: ah, then its not pure, and you need to compare what the 2 outputs are with diff -ru
__monty__ has joined #nixos
<Myrl-saki>
I think htere's a way actually.
<rnhmjoj>
clever: ok, i'll try. the problem is this is a binary font so it's going to be tricky
<teto>
so when packaging wireshark 3 i get a "cycle detected in the references of" . I am afraid removeReferencesTo might break anything ? https://github.com/NixOS/nixpkgs/pull/56776
<clever>
teto: which files are involved in the reference cycle?
<MichaelRaskin>
Hm. I don't understand anything. I am trying to fix python2Packages.pyside build. The failure is inability to #include <GL/gl.h> so I add mesa to nativeBuildInputs and nothing changes
<MichaelRaskin>
Ah, oops
<MichaelRaskin>
Stupid me
<clever>
MichaelRaskin: mesa goes into the buildInputs, not nativeBuildInputs
linarcx has quit [Ping timeout: 245 seconds]
<MichaelRaskin>
Yes, I understood
<MichaelRaskin>
For Python I had the two notions mixed up
<MichaelRaskin>
(there are different level of native inputs)
<teto>
clever: I don't know it's not said, I noticed that $dev/pkgconfig/wireshark.pc was referring to $out (and had a broken libdir=${execprefix}//nix/store/....) while includiedir is properly patched. I wonder if that'sok
<MichaelRaskin>
Well, we do force libdir
<Myrl-saki>
clever: Ping. Hacky hacks!
<Myrl-saki>
PRIMUS_DISPLAY=:8 primusrun glxgears
<Myrl-saki>
So I can make that into :7 then do the TCP + wireshark.
<MichaelRaskin>
Do you actually use CUDA?
<clever>
teto: and how does $out refer back to $dev? because that breaks the entire point of split outputs
<therealwaphire[m>
guys if I'm booting NixOS from a 18.09 liveusb, can I install 19.03 into the resultant system?
<clever>
therealwaphire[m: 19.03 isnt stable yet
<therealwaphire[m>
I know
<clever>
therealwaphire[m: but you can just mess with nix-channel before running nixos-install
<therealwaphire[m>
but can I do that?
<clever>
therealwaphire[m: it will use whatever the nixos channel points to
<therealwaphire[m>
yeah, the thing is I did
<therealwaphire[m>
but it still ended up installing 18.09
<teto>
clever: any script to find out ?
<clever>
therealwaphire[m: and you did nix-channel --update?
<therealwaphire[m>
oh shit
<therealwaphire[m>
right
<clever>
teto: grep -r
<therealwaphire[m>
rookie mistake
<clever>
teto: nix will leave $out and $dev in /nix/store after the failure
<Myrl-saki>
clever: Got it!
<Myrl-saki>
nix run nixpkgs.socat -c socat TCP-LISTEN:9090,fork UNIX:/tmp/.X11-unix/X8
<Myrl-saki>
nix run nixpkgs.socat -c socat UNIX-LISTEN:/tmp/.X11-unix/X7,fork TCP:localhost:9090
kisik21 has quit [Remote host closed the connection]
_kwstas has joined #nixos
_kwstas has quit [Client Quit]
_kwstas has joined #nixos
silver has joined #nixos
orivej_ has joined #nixos
<palo>
I released terranix 2.0.2 with an example : https://github.com/mrVanDalo/terranix/tree/master/example (I add some un-opinionated modules about backends and remote_states, but there is still a lot of work to do, to make it nice to use) Feedback welcome.
<countingsort>
makefu: got it to work, thanks again
orivej has quit [Ping timeout: 255 seconds]
_kwstas has quit [Quit: _kwstas]
<gchristensen>
palo: wow!
alex`` has quit [Ping timeout: 250 seconds]
xkapastel has quit [Quit: Connection closed for inactivity]
jomik has joined #nixos
<jomik>
When was 19.03 released? :o
alex`` has joined #nixos
<palo>
gchristensen: you like it? do you have some ideas ?
<jomik>
Guess it may not be an official sort of release tho? :O
<symphorien>
it is a beta release iirc
<symphorien>
the real release will come later this month
<MichaelRaskin>
Releases usually happen in the _end_ of the month in the version
<jomik>
Ahhh, jumped the gun a bit then I guess. Woops :P Oh well~
freeman42x has joined #nixos
<MichaelRaskin>
(or get delayed to the early next month, but that's considered a bug)
<jomik>
MichaelRaskin: Well, I saw that this was modified end of february, so thought it was released.
<MichaelRaskin>
Nope, that's just release branch for shaking out stuff away from master branch
<jomik>
Makes sense, yeah.
<jomik>
Oh well, my system works on that channel, so guess I'll just leave it there till end of march, if that is the expected release.
<jomik>
I didn't think it'd be called release before it was released :P
jtojnar has quit [Quit: jtojnar]
alex`` has quit [Ping timeout: 255 seconds]
noogie has quit [Read error: Connection reset by peer]
alex`` has joined #nixos
noogie has joined #nixos
Melkor333 has quit [Quit: WeeChat 2.4]
<aanderse>
Izorkin: that is one way to do it. seems more like a temporary solution, though, as it does break functionality (but functionality a user may not need...)
<{^_^}>
[nixpkgs] @buffet opened pull request #56780 → filet: init at 0.1.0 → https://git.io/fhAjb
<Izorkin>
aanderse: Yes, this is a temporary solution. Functionality does not break
alex`` has quit [Read error: Connection timed out]
alex`` has joined #nixos
manpaige has quit [Ping timeout: 256 seconds]
<{^_^}>
[nixpkgs] @Kjuvi opened pull request #56784 → torrential: init at 1.1.1 → https://git.io/fhxeo
<talqu>
hi, i have this default.nix file in obelisk template. https://pastebin.com/7Qpgrs2H alias hoogle="nix-shell --arg withHoogle true -A shells.ghc --command \"hoogle server -p 8080 --local\"" running this command, however, does not give the docs for reflex functions. Why? dynText, prerender, mainWidget none are found when queried
<Myrl-saki>
Can we all agree that NVidia a crap? :C
<symphorien>
pie__: it's worse, it uses a custom builder, so no phases :)
<pie__>
symphorien, dooh
<pie__>
where do i see that
<pie__>
ah
<symphorien>
builders =
<pie__>
builder = builder.sh >_>
<symphorien>
you may have more luck with postFetch
<pie__>
theres a postFetch hook though
<pie__>
yeah
NightTrain has joined #nixos
troydm has quit [Ping timeout: 250 seconds]
<pie__>
symphorien, thanks
_kwstas has quit [Quit: _kwstas]
<pie__>
,locate patch
<{^_^}>
Found in packages: lv2, cheat, petsc, gitlab, busybox, gnupatch, sonic-pi, linux.dev, lv2Unstable, phabricator, bashCompletion, linux-libre.dev, linux_mptcp.dev, linux_mptcp_93.dev, linuxPackages_4_4.kernel.dev, linuxPackages_4_9.kernel.dev, linuxPackages_4_19.kernel.dev, linuxPackages_hardened.kernel.dev, linuxPackages_xen_dom0.kernel.dev, linuxPackages_latest-libre.kernel.dev, linuxPackages_latest_hardened.kernel.dev, and 5 more
* pie__
couldnt remember the name of the bot
<Myrl-saki>
I have no idea what the hell is happening. I specifically disabled indirect glx but wireshark still tells me that it's in indirect. That's some good stuff right there.
<pie__>
symphorien, hm, might be nice if mkDerivation could give you an error about nonexistsnt phases
<symphorien>
the current design is "if it is an attribute, then it is an envvar for the builder" so there is no signature
<pie__>
that would of course require specifying on some manner (detecting doesnt sound like a good idea) whats in the builder script, and that might be a bit annoying
<pie__>
symphorien, right
<pie__>
its really great that there's so many helpful people in the community, but i wonder how much the simple-ish question load could be decreased with more support for...im not sure
<pie__>
i guess an easy hack would be to give a warning if a builder is set and it doesnt contain the name of a phase that someone attempts to use
<pie__>
(just a string search for patchPhase on the set builder.sh or whatever)
ixxie has joined #nixos
<Myrl-saki>
Sweet jesus. Any patch results in a mass rebuild.
<pie__>
:D
<pie__>
Myrl-saki, OHNO
<Myrl-saki>
:C
<Myrl-saki>
How long ago was NVidia 304.137
<Myrl-saki>
Version: 304.137
<Myrl-saki>
Release Date: 2017.9.19
<Myrl-saki>
Hm.
<Myrl-saki>
Maybe it's okay.
<MichaelRaskin>
Give up and use nouveau
<Myrl-saki>
But I have a 1050.
<Myrl-saki>
MichaelRaskin: I have a 10 series.
<Myrl-saki>
why am i even alive
<Myrl-saki>
that's it. this card's for auction lmao
<MichaelRaskin>
You say philosophy, and then you write an automated decision system in uncertain environment, and suddenly this is very much applied questions in probability theory
<simpson>
MichaelRaskin: Indeed, one of the paradoxes in this lecture series is directly related to the order in which we compose non-commuting samplers.
<Myrl-saki>
Oh fuck. I think I know what happened now.
<Myrl-saki>
I hate this even more now.
<Myrl-saki>
So basically, there's some stupidity that's happening because my 32-bit drivers is a different version from my 64-bit drivers.
<Myrl-saki>
I believe that's what's happening.
<clever>
Myrl-saki: ah
<clever>
Myrl-saki: there are seperate nixos options to configure each
<Myrl-saki>
Oh wtf. This is kind of funny.
sondr3 has joined #nixos
<Myrl-saki>
I have /etc/nixos/nixpkgs-config.nix, and I didn't even know that /etc/nix/nixpkgs-config.nix exists.
<pie__>
yeah its a fetchgit argument but if I want to stay with the scheme i pasted, im not sure how id override it?
<noonien>
i seem to have borked my nixos install, i can't get it to fully boot (NetworkManager seems to hang on boot), i cant get a shell running, old generations don't work either (i garbage collected, but the entries didn't seem to remove themselves)
<noonien>
can i trigger a rebuild or something? or do i have to create a live os?
<linarcx>
Hi. i get this error when i want to rebuild the configurations: error: build of '/nix/store/g1jb5x6xqjzakpda0g3s4620zgvr0m6g-nixos-system-unnamed-19.09pre171582.26d8a8c0eb2.drv' failed.
<symphorien>
the actual error is probably printed a few lines above this one
<Myrl-saki>
I was correct.
<Myrl-saki>
OTOH, you have to be using a year and a half old driver.
<Myrl-saki>
But that's not exactly a bad thing, I guess.
<symphorien>
comment it out in your config and rebuild
<Myrl-saki>
Sweet jesus.
<linarcx>
it's not in my config. i guess it is dependency of ranger.
<Myrl-saki>
There's a shittonne of latency in primusrun.
<symphorien>
cannot build derivation '/nix/store/8varg5ji8a196xflz2mpz2lq75f1r94d-qutebrowser-1.6.0.drv': 1 dependencies couldn't be built << qutebrowser apparently
<linarcx>
yes. shit. i just switch to unstable channel and this happen.
<symphorien>
well it is called unstable for a reason
<symphorien>
:)
<linarcx>
XD
<linarcx>
but in arch every thing works fine
<linarcx>
i have it 3 years and more than 1 or 2 time, it does not complain.
<symphorien>
you could attempt to fix the problem yourself: clone nixpkgs, fiddle with things until pykeepass builds, make a pr
<symphorien>
here I would bet that relaxing the version bounds works
<symphorien>
mmh no, rather addind futures as inputs
ErAsMuS has joined #nixos
<Myrl-saki>
srhb: Ping. NVidia's dirty af. Apparently, the x86 drivers have a shim to make them work with x86-64 drivers which involves indirect rendering.
<Myrl-saki>
Not dirty like, business dirty, but that's a weird way to solve a problem.
linarcx has quit [Ping timeout: 250 seconds]
init_6 has quit []
<laalf>
Myrl-saki:typical nvidia. but dual gpus never work properly. only if you use displays on them
<ilmu>
hey does the unoconv package work for you guys?
m0rphism has quit [Quit: WeeChat 2.2]
<emily>
,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.
<emily>
sorry, I needed to copy it T_T
Makaveli7 has quit [Ping timeout: 250 seconds]
<MichaelRaskin>
emily: there is also #bottest; and in many editors you can quickly insert 64 zeros just by knowing you need 64
zupo has joined #nixos
<jw358>
hi all, i'm trying to use async-pool but i get a version range problem with base, where should i look to turn off version range checks?
<pie__>
symphorien, ok it turns out the problem was that fetchgit was putting the result in the output location and i was patching in /build, but idk why patch didnt complain
kisik21 has joined #nixos
<kisik21>
assuming building a hybrid-bootable drive with GRUB (which means GRUB should both boot in EFI and BIOS mode), what is the correct value for boot.loader.grub.devices?
<kisik21>
I have a BIOS boot partition as /dev/sdb1 (the first one on my flash drive) and I have a ESP mounted at /boot.
fusion809 has joined #nixos
<srhb>
Myrl-saki: Huh, interesting
<pie__>
also using git apply instead of patch seems to have actually applied the damn patch now, tfw I dont know how to use patch properly
<pie__>
though i did use git diff to generate it
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
m0rphism has quit [Quit: WeeChat 2.2]
m0rphism has joined #nixos
<rycee>
laalf: HM is installable through Nixpkgs mainly because somebody added it at some point. I recommend against installing from there because it typically is very out of date.
<clever>
kisik21: boot.loader.grub.devices must be /dev/sdb
<laalf>
rycee:alright. will there be plans on adding services to nixos or will home-manager stay like that?
<kisik21>
clever: ok then
<clever>
kisik21: it will search the partition table and find the BBP on its own, and then setup the MBR to chainload sdb1
<kisik21>
What about EFI? I've enabled EFI support in GRUB via some option
<clever>
kisik21: then it will install both legacy (in the mbr+bbp) and efi at the same time
<rycee>
laalf: I don't have any plans on creating a NixOS module inside Nixpkgs.
<kisik21>
clever++
<{^_^}>
clever's karma got increased to 112
<clever>
kisik21: both will share the same grub.cfg file, and /boot/
<kisik21>
Nice
<rycee>
If you want to work on it I would be happy to review 😃
<rycee>
I'm losing connection now. On a ferry, will be near the coast again in a few hours 😃
technoid- has joined #nixos
<laalf>
rycee: yeah sure
<kisik21>
Is /dev/disk/by-id/<...> not gonna change when I plug my flash drive into another port/usb controller/computer/universe? if it changes, what is a better way to say "this exact flashdrive composed of these exact atoms and molecules"? 😂
zupo has joined #nixos
technoidX has quit [Ping timeout: 246 seconds]
<arianvp>
What are the rules for linux package versions in the stable channel?
<arianvp>
I was on kernel 4_18 but that kernel suddenly disappeared after nix-channel --update
<arianvp>
:/
<arianvp>
on 18.09
<arianvp>
is that a bug?
<symphorien>
it is EOL. try linuxPackages_latest or a LTS version
<arianvp>
ah
<arianvp>
I see, will switch to 4_19 then
m0rphism has quit [Quit: WeeChat 2.2]
vmandela_ has joined #nixos
<laalf>
arianvp: just do latest. makes more sense for upgrades
m0rphism has joined #nixos
<arianvp>
oh my boot partition is full and switch failed
<arianvp>
last time I did this I somehow deleted _all_ my generations when trying to fix it
zupo_ has joined #nixos
<arianvp>
what is the proper procedure now?
<laalf>
arianvp:why not garbage collect anything older than 14d for example?
<arianvp>
I did but it doesnt do anything
<arianvp>
all the kernels are still there
<laalf>
do you copy the kernels to boot?
<arianvp>
yes
<laalf>
i dont.
<arianvp>
that's what efi does by default
vmandela has quit [Ping timeout: 250 seconds]
<laalf>
yes it does
<laalf>
but... why does my garbage collect collect kernels then?
<kisik21>
wait, which package provides the nixos-install command?
<laalf>
arianvp: might wanna build a vm to be sure, delete kernels, rebuild with installing bootloader? very ugly but might work. have a usb ready to fix it up.
<arianvp>
AAAH
<arianvp>
running `nixos-rebuild boot` fixes it
arjen-jonathan has quit [Ping timeout: 258 seconds]
<kisik21>
laalf: it says /nix/store/*-nixos-install/bin/nixos-install, but when I try to mention nixos-install in environment.systemPackages it spews an error
<laalf>
hm... i dont know how to find the package via the path
Makaveli7 has joined #nixos
zupo_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kp__ has joined #nixos
<kisik21>
laalf: hm i think it gets installed by default somehow
<noonien>
`nix-channel --update` seems to return the same operation not permitted error
<siers>
woo hoo, that's amazing
<clever>
noonien: it may be a bug between nix-channel and nixos-enter
<evanm>
I am trying to use two haskell packages containers and containers-unicode-symbols
<evanm>
the project requires quickcheck which implicitly requires containers 0.6.0.1
JonReed has joined #nixos
<evanm>
containers-unicode -symbols latest version has a limit <0.6
<clever>
evanm: containers is a boot package, so you can only change the version by picking a different ghc
<clever>
evanm: haskell.packages.ghc863 for example
<evanm>
I created an override with cabal2nix --jailbreak
rycwo has joined #nixos
<ottidmes>
I haven't packaged anything using mulitple outputs yet, I was thinking of using it in one of my packages, because I might want to test the manpage while building the release (Rust) of the package takes too much time to do on every manpage change, can I use multiple outputs to work around that? From the documentation it seems that I would still have to build everything, but the outputs are just organized
<ottidmes>
differently, so it would not help me, right?
<evanm>
when I run nix build the error I get is encountered missing dependencies when configuring containers-unicode-symbols
<evanm>
Thank you for any help
<clever>
ottidmes: a split output package must builds all the outputs as a single unit, so the binaries must be built at the same time as the man pages
<evanm>
clever: thank you
<ottidmes>
clever: was afraid of that, guess I will just create a seperate nix file that only builds the manpages or some such
<JonReed>
Does anybody know which NixOS package has perl's "Linux::FD"?
<evanm>
clever: I would prefer to have containers-unicode-symbols ignore the <0.6 constraint. Is that possible without changing the ghc version?
noctux has joined #nixos
<clever>
evanm: you will need an override against containers-unicode-symbols to jailbreak it
<weebull[m]>
Is there a good guide for maintaining your own nix packages separate from nixPkgs? I'm looking for best practises in how to structure things. I'm trying to standardise development environments which rely on a few in-house packages.
<weebull[m]>
Everything I read starts with "clone nixPkgs" and then....
<weebull[m]>
clever: Does that allow pulling stuff together at a later date?
<weebull[m]>
clever: ...and having stuff rely in each other?
<clever>
weebull[m]: for that, i do: with import <nixpkgs> {}; { foo = callPackage ./foo.nix {}; bar = callPackage ./bar.nix {}; } as a start
<laalf>
clever: alright. thank you so much!
<clever>
weebull[m]: if they need to rely on eachother, then i upgrade it to newScope, one sec
<noctux>
hello, I'm just starting to experiment with nixos (in the VM image), to see how it works. My current goal is to get a searx instance running with nginx and uwsgi. My current attempt is at https://paste.xinu.at/McsZ/, but somehow, uwsgi fails to find the python packages, even though they get specified in the uwsgi-config: https://paste.xinu.at/McsZ/#n66 and thus, I thought that python.withPackages
<evanm>
clever: what confuses me is that containers-unicode-symbols.nix has jailbreak=true so why is it still looking for containers<0.6? Thanks
astrofog has joined #nixos
hyperfekt has joined #nixos
gagbo has joined #nixos
shabius has joined #nixos
DanC has left #nixos ["Leaving"]
<clever>
evanm: yeah, that is strange, since line 54 says it was jailbroken
<clever>
evanm: if you build it with --keep-failed, and then look in the dir it says its keeping, does the cabal file look modified?
<evanm>
clever: will do.
phreedom_ has joined #nixos
JonReed has quit [Ping timeout: 256 seconds]
<evanm>
clever: The cabal file was not modified...it still depends on containers<.6
phreedom has quit [Remote host closed the connection]
<clever>
evanm: have you tried just editing it manually, before you run nix-build ?
<evanm>
clever. I have not tried. To be clear, I should modify the cabal file in /private/..../nix-build-containers-unicode-symbols-0.3.1.1.drv-0?
shabius has quit [Quit: Leaving]
<clever>
evanm: that wont help, since nix will re-unpack another copy
<clever>
evanm: ah, your not using a local dir, so its not easy to modify the cabal file
<evanm>
clever: where can I read about a local dir? I am not sure if I have seen that ....do you mean I should download local copy into a /deps folder
<clever>
evanm: when using `cabal2nix ./.` in the directory for containers-unicode-symbols's source
ErAsMuS has joined #nixos
<weebull[m]>
clever: Am I right in saying that a default.nix containing "import <nixpkgs>; stdenv.mkDerivation {....}" can't be called by callPackage?
<weebull[m]>
clever: So you choose one style and stick to it.
<clever>
weebull[m]: callPackage might work, but it wont actually pass in any packages, and the file will re-import its own copy of <nixpkgs>
<weebull[m]>
clever: Yeah, ok. You won't get the result you're after :-)
vmandela_ has left #nixos ["Leaving"]
<evanm>
clever: so I should download containers-unicode-symbols and cabal2nix on that? Apologies for not understanding your last msg.
<simpson>
weebull[m]: To read your mind a bit, do you want to add some proprietary (in-house, unfree) packages to your own local nixpkgs, but in a way that doesn't require maintaining a nixpkgs fork? You could use an overlay instead, and pin your nixpkgs.
<clever>
evanm: which ghc version are you trying to build it against?
alex`` has quit [Ping timeout: 255 seconds]
linarcx has joined #nixos
<linarcx>
Hi. what is the equivalent of aur in nixos?
<__monty__>
That's actually a feature of jailbreak-cabal.
<linarcx>
why sddm theme not work? services.xserver.displayManager.sddm.theme = "maldive
<__monty__>
Removing conditional bounds apparently lead to more problems not less.
<evanm>
clever: Thank you
<simpson>
weebull[m]: Yeah. Something I'm considering for my $DAYJOB is an overlay with the specific packages and versions that we need, of e.g. some older Python packages. An overlay clips onto nixpkgs in a way that would let you treat nixpkgs as a sort of core component or abstract component which is pinned to a specific version and only bumped with care and planning.
<clever>
__monty__: the package has a stupid upper bound, and breaks every time containers upgrades too far, and there is no way to force it to see if things are still compatible
<clever>
__monty__: and they have different bounds, based on cabal flags!
kp__ has quit [Quit: WeeChat 2.4]
<clever>
also, i have to run now
<evanm>
clever: me too
<__monty__>
clever: Yeah but someone complained about this jailbreak issue earlier and someone more knowledgeable than me gave a reason why it is the way it is.
kp__ has joined #nixos
<weebull[m]>
simpson: I'm not so worried about pinning right now, but wanting something that can be easily shared. Forking nixpkgs seems to be heavyweight.
<tilpner>
linarcx: I looked at the sddm output directory
<bricewge>
I'm trying to add a kernel module to nixpkgs, but I can't find how to test it. Usually for packages I use an overlay but in that case it doesn't work. Can I have some help?
<tilpner>
It appears there are "elarun", "maldives", and "maya" by default
<simpson>
weebull[m]: Oh hey, nice find! Those slides are more information than I knew before about overlays. Thanks.
<linarcx>
tilpner: Thank you. I'll try it now.
<tilpner>
simpson: TBF, developing modules that are already in nixpkgs without your own checkout can be annoying and needs more care than overlays
<linarcx>
tilpner: where is sddm output directory?
<simpson>
tilpner: Well, are we talking about checkouts or deployments? Clones or forks? Developer machines or production machines?
<tilpner>
linarcx: cd $(nix-build --no-out-link '<nixpkgs>' -A sddm)/share/sddm/themes
orivej_ has quit [Ping timeout: 255 seconds]
zupo has joined #nixos
<linarcx>
tilpner: Thank you so much.
xkapastel has joined #nixos
mariel__ has quit [Ping timeout: 258 seconds]
linarcx has quit [Remote host closed the connection]
JonReed has joined #nixos
<hyperfekt>
tilpner: btw, i got it to work, thanks to nix-diff and some help by clever
<tilpner>
simpson: That distinction is probably important, but I didn't mean to start that discussion. I just wanted to point out that while pinning feels cleaner, it does have disadvantages (IMO). I pin too, but it gets annoying when I want to contribute my changes back
<tilpner>
hyperfekt: Yay! What was the issue that caused the rebuild?
<exarkun1>
I'm trying to build an armv6l kernel to boot a nixos system with qemu-system-arm but my efforts all result in a hung qemu-system-arm that makes no progress. I'm providing a kernel and the versatile dtb. Do I need something else? an initrd?
<hyperfekt>
tilpner: Since cp copies the mode from the source and I was copying from the read-only nix store, I used no-preserve=mode, which dropped the execute bit off of a script, which changed its identity.
<simpson>
tilpner: Oh, sure. I just wanted to share a portion of an already-researched professional opinion with weebull[m] in an indirect way.
<tilpner>
hyperfekt: Oh, that makes sense
kisik21 has joined #nixos
<kisik21>
Oops! Seems like I forgot to add a module or two to my initrd! Does NixOS properly support booting from LVM thin pools? Adding "dm_thin_pool" to boot.initrd.something-something-kernelModules doesn't seem to help.
<tilpner>
exarkun1: Have you tried qemu-user? That's what I used for building my aarch64 kernels, and it worked great
<tilpner>
(There's even a module for it, that does all the work)
<tilpner>
simpson: Yeah, I shouldn't have nitpicked, sorry :)
<exarkun1>
tilpner: Use qemu-user to just run the build without booting a full system?
<tilpner>
exarkun1: Exactly. It tells Nix that it suddenly can build for that architecture too, and then it just works
<exarkun1>
sounds nice.
<kisik21>
tilpner: Woah! Any guides for setting it up on NixOS?
<tilpner>
The qemu-user packages are also defined in that repository
<exarkun1>
My build system is currently Ubuntu, though, which I assume makes it all much harder.
<tilpner>
Oh, yes, that might be a little bit more difficult. Still doable though, if you're sufficiently frustrated already
fusion809 has quit [Remote host closed the connection]
ilmu has quit [Ping timeout: 255 seconds]
<tilpner>
Though I think if you don't need riscv, you can just use proper qemu instead
<tilpner>
At least it works here
<tilpner>
(proper, as in "from nixpkgs")
<noonien>
how can i reinstall nixos using an existing confiuration, while keeping /home? i've booted from a live image and mounted everything
<kisik21>
noonien: Use nixos-install as usual. It does not destroy /home AFAIK.
estrom has joined #nixos
<hyperfekt>
noonien: NixOS itself will never touch /home. nixos-install is not too dissimilar to nixos-rebuild.
<kisik21>
It actually uses the same kind of stuff as nixos-rebuild internally.
<kisik21>
but it uses the new "nix" command instead of nix-build
<noonien>
hmm, what about /etc/nixos?
petersjt014 has quit [Read error: Connection reset by peer]
<kisik21>
/mnt/etc/nixos needs to contain the config you want to have
<kisik21>
same as when you installed it
<noonien>
oh, yeah, makes sense that it doesn't touch it
<hyperfekt>
noonien: That neither, unless you've used the env module to put files there. But even then I think it would only add, not overwrite.
<noonien>
will it delete everything else besides home?
<kisik21>
It shouldn't delete anything it hasn't created in the first place.
<noonien>
(because that's what i want it to do)
<kisik21>
Oh then just use `rm -rf /mnt/nix /mnt/etc /mnt/var`, I think it's enough
<kisik21>
oops do not delete /etc
<kisik21>
you'll nuke your config :3
<noonien>
i've got a backup of it, just in case :D
<noonien>
what about /boot?
<hyperfekt>
noonien: No, basically it just puts the new version of NixOS into the store and adds the boot entry. For example your /var should be safe, too.
<noonien>
cool cool
<kisik21>
hyperfekt: noonien specifically said they want the system to be nuked instead of home
<kisik21>
s/instead of/except/
yl has joined #nixos
<noonien>
i should not run ` nixos-generate-config --root /mnt`, since i've already got my config, right?
<noonien>
just nixos-install
<hyperfekt>
noonien: correct.
<noonien>
awesome!
<kisik21>
You don't need to. But if you wanna regenerate hardware-configuration.nix you could do it.
<kisik21>
I doubt it will be needed except if you change your partition table.
<hyperfekt>
Does nixos-install get rid of imperatively created users? I only ever used the module.
<kisik21>
Anything imperative is user's problem. Set users.mutableUsers if you want NixOS to manage users exclusively, but then you cannot use useradd command (and also you cannot change passwords with passwd).
<kisik21>
I personally have it set because I like my users set in stone and I rarely change passwords...
<hyperfekt>
Same here. Turns out it actually merges the declarative and mutable users on every activation. That's so awesome.
<rycee>
laalf: You can use `fetchGit` instead of `fetchTarball` or use nix-channel and instead import `<home-manager/nixos>`. I believe both those options should work for nixos-install.
<laalf>
rycee: fetchGit works? o...ok? i can see about that later maybe. there are no nix-channel options in nixos, right?
<rycee>
laalf: For the channel case you'd have to add and uppdate the channel using the nix-channel tool first.
<laalf>
rycee:still the question remains: will home-manager eventually get into nixos? with the options i am importing?
ErAsMuS has quit [Read error: Connection reset by peer]
<hyperfekt>
Setting home-manager as a channel requires me to trust you though, given that you could overwrite basically anything with that overlay, right rycee ?
<hyperfekt>
*trust you ultimately. Of course I already trust you to a degree, I would just prefer for you not to have full control over my computer available if you get what I mean. ;)
zupo has quit [Ping timeout: 246 seconds]
<rycee>
laalf: I don't know. It hasn't been discussed but I don't have anything against it if people think it is important. But I don't have time to work on it.
<tilpner>
hyperfekt: If you already use HM, it has a lot of power. Like sending away your private keys, installing a keylogger, etc.
<laalf>
rycee:id say that its rather important. home-manager is easy to use and as we all know: nix-env is eh. id think that getting that into the options wouldnt be such a hassle since you already did that
<pie__>
whats the function for getting the item at an indexin a list? :/
<tilpner>
builtins.elemAt
<tilpner>
(Also available via lib.elemAt)
<pie__>
ah, elemAt
<pie__>
i tried various variations in index and idk, heh
<hyperfekt>
tilpner: Well, I am using the home-manager from the 18.09 channel, which I trust someone has looked over like with all other packages.
<rycee>
hyperfekt: Yeah, that is true but HM is a relatively small piece of software so somebody who's interested could probably review all of it in a few days. Of course independent reviewers of PRs are always welcome. I try to keep an eye on each commit but more eyes are better.
<hyperfekt>
Ideally I'll move forward with my VM sandbox solution this year so I can actually put my private key on this system, though. :/
ErAsMuS has joined #nixos
lsyoyom has quit [Ping timeout: 255 seconds]
<rycee>
Btw. Security wise using nix-channel is better since you are in control over when the updates happen.
<tilpner>
hyperfekt: Well, maybe. I don't mean to incite paranoia, but it's probably fairly easy to sneak in an unreviewed version as a single person (or even two people). That also goes for many other packages though, it's all terrible :(
orivej has joined #nixos
<rycee>
The ferry is arriving now. Have to leave. Might beback later.
kisik21 has quit [Quit: ERC (IRC client for Emacs 26.1)]
<hyperfekt>
tilpner: Yeah, that's why I don't feel comfortable security-wise right now. Eventually my aim is to run every process in its own virtual machine.
<hyperfekt>
bye!
kisik21 has joined #nixos
<tilpner>
hyperfekt: Same here (Not every process, but every logical task)
<hyperfekt>
My previous distro was Qubes OS, but I couldn't really make it my own because the friction for doing anything was so high.
<hyperfekt>
tilpner: I didn't even remember I had! I'm not really into manually defined packages though, the hurdle is much too high for people to actually be running their stuff in VMs
<judson_>
NixOS desktop folks who use Chromium: do you have a "SingletonSocket" file at ~/.config/chromium/SingletonSocket ?
<judson_>
Trawling their source code, I think I should, but don't seem to.
<tilpner>
judson_: Only while running it
<MichaelRaskin>
I so far accept nsjail containers
crmlt has joined #nixos
<tilpner>
hyperfekt: So what else, if not this? There could be wrappers as easy as "mkAppVM evince"
<judson_>
tilpner, that's what I'd expect.
<judson_>
I've had a longstanding issue where Chromium doesn't behave as a singleton after an update.
<MichaelRaskin>
My run-as-subuser wrapper accepts quite a few parameters — what directories to pass, what to allow w.r.t. network… Sound…
<MichaelRaskin>
(… webcam … GPU …)
JonReed has quit [Ping timeout: 256 seconds]
<pie__>
i need a quick hack for stripping a trailing slash from a path...
<hyperfekt>
What MichaelRaskin details is main problem, there's just so much to define whether to pass or not. Maybe if we could get a solution into nixpkgs so every package is maintained with those definitions it would be feasible.
<pie__>
ooh are we talking about qubes on nix or something
* pie__
needs to read scroll later
<hyperfekt>
pie__: The holy grail
kisik21 has quit [Remote host closed the connection]
lsyoyom has joined #nixos
<MichaelRaskin>
Well, I guess with a VM-vs-nsjail-vs-firejail, too — that would be the least of worries
<pie__>
only when virtualization complexits goes down :p
<samueldr>
> builtins.toPath "/etc//" # pie__
<{^_^}>
"/etc"
<MichaelRaskin>
containers are cheap
<MichaelRaskin>
Also, this difference is not really per-package
<pie__>
all this separation stuff is great imho, but lately ive been increasingly convinced of code size not being great for the amount of holes youhave :(
<pie__>
samueldr, ty
kisik21 has joined #nixos
<hyperfekt>
pie__: What do you mean by complexities?
<MichaelRaskin>
The question is whether all the code runs in the vulnerability-relevant time
<tilpner>
hyperfekt: The user could globally set settings for all vms
<pie__>
MichaelRaskin, hm, didnt think of that
<tilpner>
hyperfekt: That's not perfect, but a lot better than what we currently have (and it would still allow for individual overrides)
<pie__>
MichaelRaskin, but thats also a "separation" thing :D
Supersonic has quit [Quit: Bye]
<pie__>
anyway i dont want to derail too much
<hyperfekt>
Containers aren't really good at security isolation though.
<pie__>
well, Containers, or containers
<pie__>
or containers?
<MichaelRaskin>
Well, the point is that by the time the browser runs, it should be in a pre-constructed sandbox, which is not supposed to change, and cannot be worse than running outside the sandbox on stock NixOS (where userns is already enabled)
mbrgm_ has joined #nixos
<MichaelRaskin>
hyperfekt: well, we have already seen a leak where containers would be better than VMs.
<MichaelRaskin>
Everything is terrible
<hyperfekt>
MichaelRaskin: Which one are you referring to?
crmlt has quit [Ping timeout: 255 seconds]
<MichaelRaskin>
One of the Intel-cannot-check-speculative-RAM-access-correctly leaks, where mapped-root-in-container would get mostly properly restricted, but root-in-VM would not and could infer something about host RAM
stepcut has joined #nixos
mbrgm has quit [Ping timeout: 264 seconds]
mbrgm_ is now known as mbrgm
ErAsMuS has quit [Quit: END-AUMF]
<hyperfekt>
I just don't trust root-in-container to stay in there, frankly.
<MichaelRaskin>
Well, then NixOS, Debian and Ubuntu default kernel settings are unacceptable for you (userns enabled)
ryantm has quit [Remote host closed the connection]
Supersonic has joined #nixos
endformationage has quit [Quit: WeeChat 2.3]
<hyperfekt>
It's less about the userns mechanism and more about the fact that the Linux kernel is not built to be safe and thus necessarily exposes an interface to all processes that is exploited on the regular.
zarel has joined #nixos
ErAsMuS has joined #nixos
<pie__>
hyperfekt, i was gonna say openbsd the holy grail but im not sure about that either sadly :p
<pie__>
woo kernels~
fendor has joined #nixos
<emily>
openbsd's syscall attack surface may be smaller than linux but it's still a big monolithic ring 0 kernel written in C
<hyperfekt>
judson_: I have the Singleton as well.
<tilpner>
Just buy a bunch of Pis and run every application on different machines :/
<judson_>
Thanks. What I found was that when I launched Chromium anew, I got the Singletons, which makes me wonder if they... expire? Get clobbered by updates?
<judson_>
Next time I nixos-rebuild, I need to check that they're present before. I kind of hope they get clobbered, because otherwise it means they go away on their own?
<tilpner>
No idea, I don't even have it installed properly
<hyperfekt>
Yeah, even paravirtualized memory management in the hypervisors is untrustworthy. Anything more complicated than the most basic hypercalls is going to get you exploited.
<hyperfekt>
tilpner: Not even necessarily better because the network drivers are all terrible :<
<tilpner>
hyperfekt: Ehh, still smaller interface?
<emily>
did you know that computers are bad?
<kisik21>
tilpner: Hasn't Joanna Rutkowska (the creator of Qubes) published a paper that proves that running separate applications/identities on separate machines isn't actually as secure as a hypervisor and a bunch of AppVMs?
<hyperfekt>
tilpner: Pretty much unaudited interface, though.
<tilpner>
kisik21: Maybe. Link it to me if you find it, please?
<kisik21>
I had it but I lost the link :3 I'll try to find it rn
alienpirate5 has joined #nixos
work_ has joined #nixos
<hyperfekt>
Yeah, Joanna's research is what I'm basing my statements here on.
<pie__>
emily, ye
Dagger has quit [Excess Flood]
<hyperfekt>
But with Spectre I'm not entirely sure that's true anymore. We should grind all the chips back into sand.
<pie__>
im still not quite sure wtf is going on but spectre is "ok" if you have things separated into different processes i think
<pie__>
"In the face of this reality, we have shifted the security model of the Chrome web browser and V8 to process isolation. " https://arxiv.org/abs/1902.05178
<samueldr>
no need to grind it back to sand, use them in "offline" computation only environments, at least for those that are worth it on the perfs side
orivej has quit [Ping timeout: 246 seconds]
<hyperfekt>
pie__: Not really. It's just a made harder by the mitigations implemented by the kernel (which tries to prevent access to gadgets), but not safe.
<pie__>
hyperfekt,please correct me: my limited understanding is "meltdown" is cross address space stuff? which is mitigated by flushing (known) side channel mechanisms on context switches (hence the performance debacle)
<hyperfekt>
Meltdown is just one of the Spectre-class vulnerabilities I'm referring to, which is the general principle of abusing speculative execution and timing info to leak data.
<pie__>
yeah, the taxonomy has changed a bit and im still not 100% sure what the essence of certain tings is
teh[m] has quit [Ping timeout: 264 seconds]
kisik21 has left #nixos ["ERC (IRC client for Emacs 26.1)"]
glasserc has quit [Read error: Connection reset by peer]
justanotheruser has quit [Ping timeout: 246 seconds]
kisik21 has joined #nixos
glasserc has joined #nixos
novakovic has quit [Remote host closed the connection]
<kisik21>
having a second /nix/store on a flash drive, how to copy paths from this /nix/store to the /nix/store to my hard drive? assuming the flash drive /nix/store is available at /mnt/loop/nix/store
<kisik21>
I surely can mount /nix/store read-write and copy paths with cp but it feels like a dirty hack
<symphorien>
cp won't work
fusion809 has quit [Read error: Connection reset by peer]
<hyperfekt>
pie__: Important things to know are: Never schedule contexts that don't trust each other on the same physical core until the processors are redesigned.
<hyperfekt>
pbb: Mind that stage-1.nix is a module, not a derivation, which is why you can use this mechanism. Just terminology. Although that module does create a derivation with the boot script.
<{^_^}>
[nixpkgs] @FRidh pushed commit from @r-ryantm to master « form: 4.2.0 -> 4.2.1 »: https://git.io/fhxIi
<pbb>
hyperfekt: thanks, but because it's a module I guess I can not use something like override, but I would have to add the complete module to my nix config?
<__monty__>
Dang son, some serious merging going on.
<pbb>
I love the copytoram option on the nixos install iso
<hyperfekt>
pbb: I don't really know anything about all this stuff but fsck -A does not seem to be the same as fsck.f2fs -a
<pbb>
whyere did you see -A?
<hyperfekt>
__monty__: Yeah, that autoupdate system is pretty cool!
<pbb>
imo nixos uses -a for all filesystems but btrfs, and cyanogenmod changed to -a to make the boot process faster
<hyperfekt>
sorry i'm a dumbo
<pbb>
so it should be fine
<pbb>
happens
johanot has joined #nixos
<hyperfekt>
i was just trying to figure out what -a does, looked in the manpage, found -A and forgot that it wasn't capitalized
<hyperfekt>
that resolves my confusion about the -A option's role in that script though
<pbb>
now the big question: do I want to enable automatic discards on f2fs? ssd manufacturers (intel) say it's best to leave it off and do manual trims once in a while for best performance. does f2fs do any magic that makes it worth to enable automatic discards?
<pbb>
I think they do the discards asynchronously, which should remove most of the performance penalty from automatic discards, but I'm still unsure
<hyperfekt>
well in upstream 4.19 it is on by default apparently
<pbb>
I guess I'll stick with the default options then
gagbo has quit [Ping timeout: 250 seconds]
<{^_^}>
[nixpkgs] @Ma27 opened pull request #56790 → nixos-install: tell the user what to do if setting a root password failed → https://git.io/fhxLW
wedens has quit [Quit: Connection closed for inactivity]
Thra11 has quit [Ping timeout: 240 seconds]
dansho has joined #nixos
<dansho>
i have a problem with the xfe file browser where it segfaults on startup, is there a way to fix it or an alternative file browser i could try?
<tilpner>
xfce uses thunar, right?
<tilpner>
You could try gnome3.nautilus
<tilpner>
And I think the KDE equivalent would be kdeApplications.dolphin
justanotheruser has joined #nixos
<tilpner>
Apparently spaceFM is a file manager too
<justanotheruser>
I am running into an issue with feh, when I have displayManager.sessionCommands = ''${pkgs.feh}/bin/feh --no-fehbg --bg-scale /home/andrew/wallpapers/space_wallpaper.png & # other commands below''; it doesn't set my background. however I can run that same command in my shell manually and it will show up and stay. Any idea what might be the issue here? I'm using lightdm
noonien has quit [Quit: Connection closed for inactivity]
<justanotheruser>
hmm, lightdm has a background attribute, let me try that actually
<dansho>
i'll give thunar a try
<justanotheruser>
oh thats for login screen background
<tilpner>
dansho: If you're xfce, that should be the default. I would expect it to segfault
<tilpner>
*you're using
<dansho>
justanotheruser: i place my background image in ~/.background-image and the displayManager.session should be configured to load it by default i think
<justanotheruser>
dansho: ty
<dansho>
tilpner: not sure if i'm "using" xfce, the only other xfce package i use is xfce.mousepad
arjen-jonathan has quit [Ping timeout: 259 seconds]
<tilpner>
dansho: Well, you said "i have a problem with the xfe file browser"
<jomik>
Hey guys - is there an easy way to override a module? That is I want to override the polybar configuration setup that home-manager has with my own instead.
<jomik>
I guess I could just make a `mypolybar` module, and use that.
<dansho>
how would i go about changing the appearance of the nix-shell prompt? i'd like to be able to tell if i'm in a nix shell or not
<jomik>
dansho:IIRC there is a IN_NIX_SHELL env variable set when you are in a nix-shell
<ToxicFrog>
dansho: you have to do that via your shell's normal mechanism for prompt configuration, all nix-shell does is set a bunch of environment variables (and possibly download some packages) and then invoke your normal shell.
<dansho>
ah, ok thanks
<ToxicFrog>
$IN_NIX_SHELL tells you if you're in a nix-shell or not, and you can make a decent guess at which packages the shell was invoked with by looking at $buildInputs
<tilpner>
You can use shellHook to set a new PS1
<ToxicFrog>
E.g. I do `local packages="$(echo $buildInputs | sed -E 's:/nix/store/[^-]+-::g')"`
drakonis has joined #nixos
<tilpner>
dansho: ^
zupo_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ToxicFrog>
And then insert `[❅ ${packages}]` into the prompt (with a bunch of extra formatting codes omitted for clarity)
bpierre has joined #nixos
<tilpner>
"Tight Trifoliate Snowflake" for anyone whose fonts also don't like that character
<ToxicFrog>
It was the closest thing I could find in unicode to the Nix logo
<tilpner>
Looks nice, but it might break for larger packages with more inputs
<tilpner>
(So probably add a cutoff at... maybe 5 packages)
<ToxicFrog>
There's more stuff not pictured there to truncate it if needed :)
<tilpner>
Oh :)
<ToxicFrog>
I'm also not generally using it for dev environments, but for "I need to run a one-off command and the package isn't in systemPackages"
<bpierre>
Hello I am trying to install NixOS but can’t get the display server to start. When checking `journalctl`, I get `(EE) no screens found(EE)`. It’s a Thinkpad P52 with a Nvidia GPU. I tried to load the nouveau driver (`modprobe nouveau`), but it doesn’t work either (`secboot: error during falcon reset: -110`). Any idea?
nikivi has quit [Read error: Connection reset by peer]
nikivi has joined #nixos
erictapen has joined #nixos
crmlt has joined #nixos
jomik has quit [Quit: WeeChat 2.4]
ddellacosta has joined #nixos
Olgierd has quit [Quit: WeeChat 1.9.1]
astrofog has quit [Remote host closed the connection]
zupo has joined #nixos
vk3wtf has joined #nixos
jomik has joined #nixos
<jomik>
clever: Should disabledModules work in home-manager? Cuz it does not seem to :/
Olgierd has joined #nixos
Olgierd has quit [Client Quit]
npmccallum has quit [Quit: npmccallum]
<clever>
jomik: not sure, and it can be tricky to know what the path should be
polman has quit [Ping timeout: 246 seconds]
johanot has quit [Ping timeout: 255 seconds]
<jomik>
I want to disable the file "modules/services/polybar.nix", in the git repo. Any idea how I can figure out how? It does not complain about the disabledModules attribute - it just complains that an option is defined twice.
<clever>
jomik: try services/polybar.nix, or something/modules/services/polybar.nix ?
<clever>
joepie91: ldd simply sets those debug vars, and then runs ld.so on the ELF file
<jomik>
Still no luck with those sadly. I can not find a reference to `disabledModules` in the code either :(
<clever>
joepie91: which is why ldd fails when using a dynamic qemu-user binary, the host ld.so reacts to the debug vars, and prints qemu's x86 deps, rather then the target arm deps!
<joepie91>
do we have any wiki documentation about packaging? the actual 'writing the expression' part, not the PR stuff etc.
<clever>
jomik: search the nixpkgs repo
* clever
heads to bed
<joepie91>
clever: nevertheless this is useful for packaging
<clever>
joepie91: related, minecraft will try to dlopen() a 64bit library inside java, and when it fails (due to rpath), it silently assumes its the wrong arch, and tries a 32bit variant, which then fails due to being the wrong arch
<clever>
joepie91: it then never shows the error the 64bit one had, and will only ever print an error about trying to load a 32bit lib in a 64bit proc
<joepie91>
lol
<clever>
i had to dig into the source to track that down
<jomik>
But this is a home-manager service, wouldn't home-manager need to support it?
<noonien>
hmm, does electrum fail to build on unstale only for me?
<clever>
strace helped some
<clever>
jomik: home-manager just calls lib.evalModules in nixpkgs
<jomik>
Anyone have any idea what the path for home-manager's modules is? I can't seem to get the `polybar` module disabled..
<jomik>
I am using home-manager, but I do not have it on a channel, I have it set to fetch master.tar.gz, I need to specify the path to polybar relative to the modules dir.
<{^_^}>
[nixpkgs] @timor opened pull request #56792 → libdwarf: add zlib to buildInputs → https://git.io/fhxq3
fendor has quit [Ping timeout: 246 seconds]
jackdk has joined #nixos
crmlt has quit [Ping timeout: 245 seconds]
<charukie1icz>
I'm trying to replicate something in the tutorial, running `nix-shell --run ghci -p haskellPackages.ghc haskellPackages.HTTP`, but it appears that the HTTP package never gets loaded. Running `import Network` or `import Network.HTTP` always results in: Could not find module 'Network'. Does anyone know what I am doing wrong?
<charukie1icz>
The same thing happens when I copy and paste an example Haskell script that uses #! /usr/bin/env nix-shell as an interpreter. The Haskell code can't import any packages loaded via the nix-shell -p flag.
<ottidmes>
noonien: I guess you could use https://nixos.org/nixos/options.html#nix+gc+options to specify a limit, but since its doing GC, its probably not what you want (its probably too aggresive)
gagbo has joined #nixos
<ottidmes>
charukie1icz: you will have to use ghcWithPackages to make them visible to ghc
goibhniu has joined #nixos
jomik has quit [Quit: WeeChat 2.4]
<noonien>
doing a gc does not delete past generation from the bootloader, it just makes them unbootable
<ottidmes>
noonien: you could also just create a systemd service that does what that option does, i.e. call GC and then nixos-rebuild boot to remove them
<noonien>
nixos-rebuilt switch doesn't remove them either
<ottidmes>
you might want to do a dry-build before calling GC+rebuild
<{^_^}>
#3542 (by jgeerds, 4 years ago, closed): "nix-collect-garbage -d" should also cleanup boot entries
<linarcx>
Hi. why zsh config not loaded like other config files. i put it in ~/.zshrc.
<noonien>
hmmm, when i get a few generations again, i'll do a garbace collect, rebuild and come back, i've just reinstalled my system
<linarcx>
Anybody can help me?
<ottidmes>
charukie1icz: here is an example BTW: nix-shell -p 'with import <nixpkgs> { }; haskellPackages.ghcWithPackages (pkgs: with pkgs; [ network ])'
<{^_^}>
[nixpkgs] @worldofpeace opened pull request #56793 → fragments: init at 1.3 → https://git.io/fhxqd
<ottidmes>
linarcx: its seems like its not loaded by NixOS by default, you could fix that by adding this to your configuration: programs.zsh.interactiveShellInit = ". ~/zshrc"; but better to use '' if ... some check ...; then ... source ...; fi ''
<noonien>
linarcx: what does `echo $ZSH_VERSION` say?
<linarcx>
ottidmes: Oh nice. what is unwrapped mean?
<Dedalo>
Hi guys, I could use some help. I'm trying to generate a Windows 10 USB from NixOS using woeusb, but it doesn't work. I get an error: Cannot create regular file /run/woeusb etc: Read-only filesystem.
erictapen has quit [Ping timeout: 250 seconds]
vk3wtf has quit [Ping timeout: 258 seconds]
<ottidmes>
linarcx: you can ignore that, its the way its packages, it uses the same metadata as rofi-unwrapped, while if you install rofi, its actually the wrapped one, and wrapped means that it adds a script that sets the right env variables before exec'ing the real thing
<laalf>
http://0x0.st/zoA0.nix is my config. if someone would tell me what to do in order to get sxhkd running that would be nice
Guest38658 has quit [Ping timeout: 240 seconds]
<justanotheruser>
sorry really basic question. How do I perform the user-equivalent to `sudo nixos-rebuild switch`, resulting in me building `~/.nixpkgs/config.nix`
<ottidmes>
justanotheruser: ehm, you don't "build" that file, it just configures nixpkgs
<ottidmes>
justanotheruser: what is it that you want to achieve?
<justanotheruser>
if, for example, I add pkgs to environment.packages in that file, I want to have those packages installed
<justanotheruser>
So is it just nix-channel --update?
linarcx has quit [Remote host closed the connection]
<ottidmes>
justanotheruser: to my knowledge config.nix does not have a environment.packages attribute
<justanotheruser>
okay, here is what I actually put there services.cron.systemCronJobs = [ "* * * * * echo 'Hello world' >>&/home/andrew/cron.log" ];
<ottidmes>
laalf: I just checked, I don't do anything special to get sxhkd working under NixOS, it just comes with bspwm
sigmundv has joined #nixos
<justanotheruser>
I want to define the job in config.nix rather than configuration.nix if possible
<laalf>
ottidmes: well for me it just doesnt work. i have been trying to get it running for solid 3 hours now.
<ottidmes>
justanotheruser: but config.nix just configures nixpkgs with a few options, like allowUnfree, its not like a seperate NixOS configuration, seperate worlds, one configures Nix packages (~/.nixpkgs/config.nix), the other NixOS (/etc/nixos/configuration.nix)
<justanotheruser>
I assumed that config.nix overrided configuration.nix
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
freeman42x has quit [Ping timeout: 259 seconds]
<laalf>
i should package for guixsd so i have less reasons to go back here
<justanotheruser>
anyways, as a general question, if I make changes to config.nix, what command can I run to apply the changes?
<ottidmes>
justanotheruser: you don't, config.nix will be imported each time nixpkgs is loaded without an explicit config
<justanotheruser>
oh okay, so is configuration.nix the appropriate place to put a specific users crons jobs?