worldofpeace changed the topic of #nixos to: NixOS 20.09 Nightingale ✨ https://discourse.nixos.org/t/nixos-20-09-release/9668 || https://nixos.org || Latest NixOS: https://nixos.org/nixos/download.html || Latest Nix: https://nixos.org/nix/download.html || Logs: https://logs.nix.samueldr.com/nixos/ || use ,channels for a list of Nix* related channels || nixcon videos: https://tinyurl.com/nixcon2019 || Link to the output of nix-inf
<moet> I've found a few approaches that seem like they'll work, but i'm wondering if theer's a recommended approach
<moet> this approach sets NIX_PATH right in the nixops machine configuration, but the author calls it "hacky" https://stackoverflow.com/questions/47961494/propagate-nixpkgs-checkout-to-nixops-machines
xcmw has joined #nixos
<moet> one of the responses here describes doing it via NIX_PATH in the shell environment from which you issue the nixops commands, but this seems very brittle to me: https://discourse.nixos.org/t/nixops-pinning-nixpkgs/734/2
cosimone has quit [Ping timeout: 260 seconds]
<moet> someone else in that thread points out that `nix.nixPath` can be set at a machine level.. this seems like the most "correct" to me so i'll try that and see if it works..
ym555 has joined #nixos
ym555 has quit [Client Quit]
ym555 has joined #nixos
ym555 has quit [Client Quit]
mbrgm_ has joined #nixos
mbrgm has quit [Ping timeout: 272 seconds]
mbrgm_ is now known as mbrgm
<{^_^}> Channel nixpkgs-unstable advanced to https://github.com/NixOS/nixpkgs/commit/9cb4d2f4903 (from 2 hours ago, history: https://channels.nix.gsc.io/nixpkgs-unstable)
mkaito has quit [Quit: WeeChat 2.9]
__monty__ has quit [Quit: leaving]
veleiro has quit [Ping timeout: 240 seconds]
xcmw has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xcmw has joined #nixos
xcmw has quit [Client Quit]
supersandro2000 has quit [Disconnected by services]
supersandro2000 has joined #nixos
philipcristiano has quit [Ping timeout: 258 seconds]
nz__ has quit [Ping timeout: 258 seconds]
TomosLad has quit [Read error: Connection reset by peer]
r0bby has quit [Ping timeout: 272 seconds]
wpcarro_ has quit [Read error: Connection reset by peer]
jared-w has quit [Read error: Connection reset by peer]
ctp has quit [Read error: Connection reset by peer]
bradparker has quit [Read error: Connection reset by peer]
ryjm has quit [Ping timeout: 258 seconds]
aristid has quit [Read error: Connection reset by peer]
davetapley has quit [Read error: Connection reset by peer]
vdemeester has quit [Read error: Connection reset by peer]
teozkr_ has quit [Read error: Connection reset by peer]
TomLad has quit [Read error: Connection reset by peer]
mitsuhiko has quit [Read error: Connection reset by peer]
SrPx has quit [Read error: Connection reset by peer]
alanz has quit [Ping timeout: 258 seconds]
lally has quit [Ping timeout: 272 seconds]
vdemeester has joined #nixos
aristid has joined #nixos
philipcristiano has joined #nixos
TomLad has joined #nixos
nz__ has joined #nixos
jared-w has joined #nixos
teozkr_ has joined #nixos
davetapley has joined #nixos
mitsuhiko has joined #nixos
ryjm has joined #nixos
bradparker has joined #nixos
SrPx has joined #nixos
wpcarro_ has joined #nixos
TomosLad has joined #nixos
r0bby has joined #nixos
lally has joined #nixos
ctp has joined #nixos
alanz has joined #nixos
Fare has quit [Ping timeout: 260 seconds]
sss2 has quit [Quit: Leaving]
veleiro has joined #nixos
cole-h has joined #nixos
medvid has quit [Ping timeout: 265 seconds]
medvid has joined #nixos
kaliumxyz has quit [*.net *.split]
shad has quit [*.net *.split]
troydm has quit [*.net *.split]
bvdw has quit [*.net *.split]
dadada_ has quit [*.net *.split]
coderobe has quit [*.net *.split]
leotaku_ has quit [*.net *.split]
statusfailed has quit [*.net *.split]
eyenx has quit [*.net *.split]
FireFly has quit [*.net *.split]
Aleksejs has quit [*.net *.split]
dominikh has quit [*.net *.split]
pjan has quit [*.net *.split]
ent has quit [*.net *.split]
cheriimoya has quit [*.net *.split]
tldr32 has quit [*.net *.split]
simukis_ has quit [*.net *.split]
Oslander has quit [*.net *.split]
evalexpr has quit [*.net *.split]
arianvp has quit [*.net *.split]
bpye has quit [*.net *.split]
mupf has quit [*.net *.split]
vk3wtf has quit [*.net *.split]
kozowu has quit [*.net *.split]
jonge has quit [*.net *.split]
m_hackerfoo has quit [*.net *.split]
mk_modrzew_ has quit [*.net *.split]
duairc has quit [*.net *.split]
DerHorst has quit [*.net *.split]
betaboon has quit [*.net *.split]
pinpox has quit [*.net *.split]
ericnoan has quit [*.net *.split]
nbp has quit [*.net *.split]
ikwildrpepper has quit [*.net *.split]
VulNix has quit [*.net *.split]
jtcs_ has quit [*.net *.split]
dirkx_ has quit [*.net *.split]
jeschli1 has quit [*.net *.split]
kandinski has quit [*.net *.split]
_cyril_ has quit [*.net *.split]
cjay has quit [*.net *.split]
veleiro` has joined #nixos
davidv7_ has joined #nixos
davidv7 has quit [Ping timeout: 268 seconds]
tsrt^ has quit []
shad has joined #nixos
troydm has joined #nixos
dadada_ has joined #nixos
kaliumxyz has joined #nixos
bvdw has joined #nixos
coderobe has joined #nixos
pjan has joined #nixos
Oslander has joined #nixos
leotaku_ has joined #nixos
Aleksejs has joined #nixos
betaboon has joined #nixos
jeschli1 has joined #nixos
ericnoan has joined #nixos
statusfailed has joined #nixos
simukis_ has joined #nixos
tldr32 has joined #nixos
m_hackerfoo has joined #nixos
mk_modrzew_ has joined #nixos
_cyril_ has joined #nixos
arianvp has joined #nixos
jonge has joined #nixos
VulNix has joined #nixos
dominikh has joined #nixos
eyenx has joined #nixos
nbp has joined #nixos
ikwildrpepper has joined #nixos
jtcs_ has joined #nixos
FireFly has joined #nixos
dirkx_ has joined #nixos
kozowu has joined #nixos
vk3wtf has joined #nixos
DerHorst has joined #nixos
kandinski has joined #nixos
ent has joined #nixos
cheriimoya has joined #nixos
pinpox has joined #nixos
evalexpr has joined #nixos
bpye has joined #nixos
mupf has joined #nixos
duairc has joined #nixos
cjay has joined #nixos
bvdw has quit [Max SendQ exceeded]
bvdw has joined #nixos
KarlJoad has quit [Quit: ERC (IRC client for Emacs 27.1)]
haritz has joined #nixos
haritz has joined #nixos
haritz has quit [Changing host]
supersandro2000 has quit [Quit: The Lounge - https://thelounge.chat]
supersandro2000 has joined #nixos
<Raito_Bezarius> does anyone see why I have cache misses with a nix-shell where I fully cached all store paths
<Raito_Bezarius> (using cachix)
joesventek has quit [Quit: Quit]
<Raito_Bezarius> (i don't believe I'm hit by a src = ./.; thing)
dstzd has quit [Quit: ZNC - https://znc.in]
nikivi has quit [Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net]
joesventek has joined #nixos
dstzd has joined #nixos
nikivi has joined #nixos
dstzd has quit [Client Quit]
dstzd has joined #nixos
Rusty1 has joined #nixos
dstzd has quit [Client Quit]
dstzd has joined #nixos
xcmw has joined #nixos
Lord_of_Life_ has joined #nixos
Lord_of_Life has quit [Ping timeout: 260 seconds]
Lord_of_Life_ is now known as Lord_of_Life
<moet> i think that the `nix.nixPath` solution worked
moet has quit [Quit: leaving]
* DigitalKiwi throws this in the ring https://mostlyabsurd.com/files/nixops-dummy.nix
<DigitalKiwi> really it's gchristensen and clever i think >.>
tff^ has joined #nixos
veleiro` has quit [Ping timeout: 272 seconds]
_rvl has quit [Quit: ZNC 1.8.1 - https://znc.in]
_rvl has joined #nixos
acarrico has quit [Ping timeout: 240 seconds]
rajivr has joined #nixos
<pie_> ,locate unbuffer
<{^_^}> Found in packages: expect
h0m1 has quit [Ping timeout: 268 seconds]
h0m1 has joined #nixos
sigmundv has quit [Ping timeout: 268 seconds]
kirelagin has joined #nixos
Darkmatter66 has joined #nixos
Fuzen has quit [Ping timeout: 260 seconds]
lordcirth has quit [Remote host closed the connection]
lordcirth has joined #nixos
<{^_^}> Channel nixos-20.09 advanced to https://github.com/NixOS/nixpkgs/commit/3d2d8f281a2 (from 14 hours ago, history: https://channels.nix.gsc.io/nixos-20.09)
ornxka has quit [Ping timeout: 240 seconds]
iwq has quit [Ping timeout: 265 seconds]
ben has quit [Ping timeout: 264 seconds]
m0rphism has quit [Ping timeout: 260 seconds]
Fare has joined #nixos
xcmw has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aw has quit [Quit: Quitting.]
spacefrogg has quit [Quit: Gone.]
aw has joined #nixos
spacefrogg has joined #nixos
copy has quit [Ping timeout: 265 seconds]
nwspk has quit [Quit: nwspk]
mzan has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
nwspk has joined #nixos
mzan has joined #nixos
ornxka has joined #nixos
kirelagin has quit [Ping timeout: 260 seconds]
LilleCarl has quit [Quit: WeeChat 2.9]
MidAutumnHotaru has quit [Quit: Ping timeout (120 seconds)]
ManiacOfMadness has quit [Ping timeout: 268 seconds]
MidAutumnHotaru has joined #nixos
Dotz0cat has quit [Ping timeout: 240 seconds]
Dotz0cat has joined #nixos
gustavderdrache has quit [Quit: Leaving.]
LnL has quit [Quit: exit 1]
LnL has joined #nixos
LnL has joined #nixos
LnL has quit [Changing host]
domogled has quit [Quit: domogled]
BenSima[m] is now known as bsima[m]
orivej has quit [Ping timeout: 246 seconds]
xcmw has joined #nixos
rail has quit [Quit: gone...]
zie has quit [Quit: ZNC 1.8.1 - https://znc.in]
rail has joined #nixos
zie has joined #nixos
Supersonic112 has joined #nixos
Supersonic has quit [Ping timeout: 256 seconds]
Supersonic112 is now known as Supersonic
maljub01 has quit [Read error: Connection reset by peer]
dbmikus has joined #nixos
maljub01 has joined #nixos
philr has quit [Ping timeout: 240 seconds]
<genevino> :D
dbmikus has quit [Ping timeout: 272 seconds]
LnL has quit [Quit: exit 1]
LnL has joined #nixos
LnL has joined #nixos
LnL has quit [Changing host]
<DigitalKiwi> shapr: :D
ddellacosta has quit [Ping timeout: 256 seconds]
pjt_tmp has joined #nixos
Fare has quit [Ping timeout: 260 seconds]
moet has joined #nixos
haritz has quit [Ping timeout: 246 seconds]
<matthewcroughan> Hey again guys
<matthewcroughan> Anyone got the patience to help me? lol
<matthewcroughan> at the top of a file, if I do `thing:` what have I done?
haritz has joined #nixos
haritz has joined #nixos
haritz has quit [Changing host]
<matthewcroughan> Rather than `{ thing, thing2, pkgs, config, ... }`
<moet> matthewcroughan: you've defined a function of one argument
<DigitalKiwi> don't all functions have one argument
<moet> matthewcroughan: rather than defining a function of several arguments
<matthewcroughan> moet: basically, I don't fully understand what these things at the top of the file do
<matthewcroughan> I either need to be directed to the right place in the manual, or saved from myself by a saviour like yourself :D
<moet> DigitalKiwi: then i haven't said anything incorrect
<DigitalKiwi> :D
<moet> matthewcroughan: do you know what a function is, in a programming language like haskell python java etc...?
<matthewcroughan> This file can't access `inputs.`
<matthewcroughan> but if I put it in hosts/t480/configuration.nix it will work fine
veleiro has quit [Read error: Connection reset by peer]
<moet> sorry, i'm not familiar with the @ syntax in function declarations in nix..
<matthewcroughan> I'm not sure where I'm screwing up in the layering, etc, but I'm really confused by it.
<matthewcroughan> moet: if there's a better way of doing it let me know :)
<moet> matthewcroughan: the example of that @ syntax on https://nixos.wiki/wiki/Nix_Expression_Language seems to have it in the other order, like `inputs@{ config, pkg, self, ...}:`
<moet> matthewcroughan: i'm probably not the best person to answer the "better way of doing things" question, sorry... also a beginner here
sangoma has joined #nixos
waleee-cl has quit [Quit: Connection closed for inactivity]
Darkmatter66 has quit [Quit: ZNC 1.7.5 - https://znc.in]
<moet> hi #nixos! i'm trying to make changes to a module in nixpkgs.. i've made the changes that i think make sense, and i've successfully built a configuration that _doesn't_ make use of my *new configuration option* using `nixos-rebuild build-vm --fast -I nixos-config=./configuration.nix -I nixpkgs=.`, however, when i attempt to build with a configuration that _does_ use the new configuration option, i get an
<moet> error "The option `.' defined in `.' does not exist."
<moet> is there something I need to do to make the new configuration "visible" from the top level, besides adding it alongside other options in the module defined using mkOption?
<matthewcroughan> what is `something:`?
<matthewcroughan> can someone tell me what this means at the top of a file?
<matthewcroughan> "it's a function" doesn't mean much since I can't search for that on Google, yknow?
<{^_^}> Channel nixos-20.09-small advanced to https://github.com/NixOS/nixpkgs/commit/16c0b79decb (from 6 hours ago, history: https://channels.nix.gsc.io/nixos-20.09-small)
<{^_^}> Channel nixpkgs-20.09-darwin advanced to https://github.com/NixOS/nixpkgs/commit/46f46a8c0b9 (from 4 hours ago, history: https://channels.nix.gsc.io/nixpkgs-20.09-darwin)
<{^_^}> Channel nixpkgs-unstable advanced to https://github.com/NixOS/nixpkgs/commit/e55f77277b5 (from 5 hours ago, history: https://channels.nix.gsc.io/nixpkgs-unstable)
<moet> matthewcroughan: `something:` is part of a function definition.. the part that's missing is the "body" .. so "something: body" is a function .. "something" is the argument and "body" is the body.. this page goes over the syntax of the nix language: https://nixos.wiki/wiki/Nix_Expression_Language
<moet> matthewcroughan: so for a real example you could enter the nix repl with `$ nix repl` and then enter the expression `let x = foo: [foo foo]; in x 3` (this defines a function x which takes one argument and returns a list containing two instances of that argument, and then calls the function x on the argument 3)
<matthewcroughan> moet: I want the man page
<matthewcroughan> I don't understand what you've just said
<matthewcroughan> read number 1 here,
<matthewcroughan> I want the man page for `something:` instead of `{ something: , ...}`
Rusty1 has quit [Quit: WeeChat 2.3]
justan0theruser has quit [Ping timeout: 260 seconds]
<moet> matthewcroughan: afaik, nix/nixos/nixpkgs focuses less on manpages for specific topics and more on three big manuals that cover a variety of topics.. try reading this section, it might help https://nixos.org/manual/nix/stable/#ch-expression-language
<DigitalKiwi> matthewcroughan: all functions take one argument, so thing: is just a different type of an argument than { a, b, c}: which is also a function taking one argument, but it's an attrset which makes it seem like it's taking multiple arguments
gerschtli has quit [Quit: WeeChat 2.9]
<moet> til
gerschtli has joined #nixos
<matthewcroughan> DigitalKiwi: did you look at my file?
<DigitalKiwi> which one
<matthewcroughan> Lines 7-9 work in this file
<matthewcroughan> then
<moet> matthewcroughan: i linked you to a couple of pages describing the syntax you're asking questions about; did you look at those pages? :)
<matthewcroughan> with pkgs; [ firefoxFlake.firefox-nightly-bin ]
<matthewcroughan> that works
mounty has quit [Ping timeout: 268 seconds]
<matthewcroughan> it does not
<matthewcroughan> And I cannot figure out why. Inputs can be accessed, but it complains that `attribute 'packages' missing` from `inputs.pkgs.firefox.packages.${pkgs.system};`
<DigitalKiwi> the syntax is wrong on that firefox.nix
<matthewcroughan> how so?
stoile has quit [Ping timeout: 265 seconds]
stoile has joined #nixos
<DigitalKiwi> args@{ a, b, ... }:
<DigitalKiwi> you have it on the wrong side
<matthewcroughan> it actually doesn't matter what side it's on
LnL has quit [Ping timeout: 240 seconds]
<matthewcroughan> either way produces the same error
xcmw has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cole-h has quit [Ping timeout: 246 seconds]
LnL has joined #nixos
LnL has joined #nixos
<matthewcroughan> even once I have accessed inputs., I always get some error about an attribute not existing
<matthewcroughan> but it works fine in hosts/t480/configuration.nix, I just don't get it
<matthewcroughan> attribute 'firefox' missing in "firefoxFlake = inputs.firefox.packages.${pkgs.system};"
<matthewcroughan> like, why? How can I debug this? Seems impossible
<matthewcroughan> if I put it in one file, it works, if I put it in another it doesn't, and I do not know what I am missing
<matthewcroughan> `matthew = import ./matthew self;
<matthewcroughan> How do I pass MORE than "self" to ./matthew
<moet> `matthew = import ./matthew.nix { foo = 123; bar = "what"; };`
<moet> this passes one attrset argument containing two attributes, foo and bar..
<matthewcroughan> but I can't define more than one function in this file
<moet> inside `./matthew.nix` you could write a single function which takes a single attrset argument: `{ foo, bar }: ...`
<matthewcroughan> self: is defined, if I try to define another thing like `inputs:` it won't do anything
<matthewcroughan> there is no matthew.nix
<moet> yes, i know that
<matthewcroughan> only folders with layered default.nix
<moet> i'm using your example to explain things
<matthewcroughan> Do you understand the issue or am I not doing a good enough job explaining it?
<matthewcroughan> in hosts/t480/configuration.nix, a LET/IN + referencing inputs.firefox.something *works*.
<matthewcroughan> Whereas in the files below `users/` I cannot access `inputs.` in the same way.
<matthewcroughan> I am wondering why.
<moet> sorry, i'm not sure i can fix this for you.. good luck!
<matthewcroughan> surely it has something to do with the tricks I've copy/pasted to allow ${self} to be addressable
LnL- has joined #nixos
LnL- has joined #nixos
LnL has quit [Ping timeout: 264 seconds]
justanotheruser has joined #nixos
xcmw has joined #nixos
guixos[m] has joined #nixos
<matthewcroughan> moet: thx for help ;D
<matthewcroughan> I'm a bit frustrated with it so sorry if I seem agitated lol.
<matthewcroughan> Going to bed now, will be happier in morning when not sleep deprived
palo1 has joined #nixos
zeta_0 has joined #nixos
zeta_0 has left #nixos [#nixos]
palo has quit [Ping timeout: 240 seconds]
palo1 is now known as palo
hmi has joined #nixos
srk has quit [Ping timeout: 240 seconds]
sorki has joined #nixos
<moet> matthewcroughan: sleep always helps!
sorki is now known as srk
hmi has quit [Quit: WeeChat 2.9]
sangoma has quit [Ping timeout: 240 seconds]
hmi has joined #nixos
hmi has quit [Ping timeout: 272 seconds]
moet has quit [Quit: leaving]
cfricke has joined #nixos
sangoma has joined #nixos
zeta_0 has joined #nixos
parsnip has joined #nixos
hmi has joined #nixos
malook has joined #nixos
zupo has joined #nixos
mallox has joined #nixos
davidv7_ has quit [Ping timeout: 240 seconds]
davidv7 has joined #nixos
tff^ has quit []
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<{^_^}> Channel nixos-20.09-small advanced to https://github.com/NixOS/nixpkgs/commit/46f46a8c0b9 (from 5 hours ago, history: https://channels.nix.gsc.io/nixos-20.09-small)
sb000 has joined #nixos
kfiz has quit [Quit: ZNC 1.8.1 - https://znc.in]
<sb000> how to reinstall the bootloader (for switching from systemd-boot to grub) on nixops managed machines?
kfiz has joined #nixos
<sb000> also some nixops copies failed with "too many open files" similar to https://github.com/NixOS/nixpkgs/issues/101459... urgh
<{^_^}> #101459 (by FRidh, 8 weeks ago, open): "Bad file descriptor" and "Too many open files"
proofofkeags_ has quit [Ping timeout: 268 seconds]
tsrt^ has joined #nixos
sb000 has quit [Quit: Leaving]
respawn_ has joined #nixos
<clever> --install-bootloader, too late
zeta_0 has quit [Quit: rcirc on GNU Emacs 27.1]
sb000 has joined #nixos
<sb000> manually running "NIXOS_INSTALL_BOOTLOADER=1 /nix/var/nix/profiles/system/bin/switch-to-configuration boot" on the machines does *not* work
<clever> sb000: `man nixos-rebuild` -> --install-bootloader
<sb000> it says it installs grub but then after reboot it's still systemd
<sb000> clever, that's a nixops managed machine
<sb000> not using nixos-rebuild
<clever> sb000: legacy or efi?
<sb000> efi
malook has quit [Quit: malook]
<clever> sb000: `efibootmgr -v` ?
<clever> Boot0004* UEFI OS HD(1,GPT,27c99b08-455d-4dfe-a44f-6150cbc09ef8,0x800,0x100000)/File(\EFI\BOOT\BOOTX64.EFI)..BO
<clever> for me, this is the key line it prints
<sb000> Boot0000* Linux Boot ManagerHD(2,GPT,5e3ce1ec-dc15-435d-bdcd-8481a53fb319,0x800,0xff800)/File(\EFI\SYSTEMD\SYSTEMD-BOOTX64.EFI)
<clever> /dev/nvme0n1p1: UUID="7DBC-2698" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="27c99b08-455d-4dfe-a44f-6150cbc09ef8"
<sb000> Boot0002* NixOS-bootHD(2,GPT,5e3ce1ec-dc15-435d-bdcd-8481a53fb319,0x800,0xff800)/File(\EFI\NIXOS-BOOT\GRUBX64.EFI)
<Ke> my experience is that some component caches the state on the efi partition and bails out, if it thinks things are ok
<clever> looks like you didnt update the efi vars
<sb000> I have boot.loader.efi.canTouchEfiVariables = true
<clever> sb000: boot.loader.efi.canTouchEfiVariables = true;
<sb000> isn't it supposed to do it automatically?
<clever> 47 if ($action eq "switch" || $action eq "boot") {
<clever> 48 system("/nix/store/0fizwf7p1qd5laazw5gy16y7j4a7jjl4-install-grub.sh $out") == 0 or exit 1;
<clever> 688 if (($ENV{'NIXOS_INSTALL_GRUB'} // "") eq "1") {
<clever> 689 warn "NIXOS_INSTALL_GRUB env var deprecated, use NIXOS_INSTALL_BOOTLOADER";
<clever> 690 $ENV{'NIXOS_INSTALL_BOOTLOADER'} = "1";
<clever> 692 my $requireNewInstall = $devicesDiffer || $extraGrubInstallArgsDiffer || $nameDiffer || $versionDiffer || $efiDiffer || $efiMountPointDiffer || (($ENV{'NIXOS_INSTALL_BOOTLOADER'} // "") eq "1");
<clever> sb000: if any of those config params are different from before, or the env var was set, it forces a reinstall
<clever> 716 if (($requireNewInstall != 0) && ($efiTarget eq "only" || $efiTarget eq "both")) {
<clever> 717 print STDERR "installing the GRUB $grubVersion EFI boot loader into $efiSysMountPoint...\n";
<clever> 718 my @command = ("$grubEfi/sbin/grub-install", "--recheck", "--target=$grubTargetEfi", "--boot-directory=$bootPath", "--efi-directory=$efiSysMountPoint", @extraGrubInstallArgs);
<clever> which then tells grub-install to do the rest
<clever> sb000: what does `switch-to-configuration boot` print to the console?
<sb000> installing the GRUB 2 EFI boot loader into /boot...
<sb000> Installing for x86_64-efi platform.
<sb000> Installation finished. No error reported.
<sb000> it does seem like efi vars weren't updated for some reason
zeta_0 has joined #nixos
<clever> the print on 717 wasnt printed
<clever> oh wait, that was the first line you pasted
<sb000> I do have this "Boot0002* NixOS-boot" efi option which is grub
<clever> ahh, so it did work
<clever> you just have to go into the bios and change the default (or use efibootmgr)
<sb000> yes, but the computer still selects "Boot0000* Linux Boot Manager" which is systemd, for some reason
<clever> you want to change the BoorOrder that `efibootmgr -v` lists
<sb000> okay but on other machines I didn't have to do that. is that because of nixops or because of BIOS peculiarities?
<clever> probably the bios
<sb000> okay, rebooting...
sb000 has quit [Quit: Leaving]
werner291 has joined #nixos
sb000 has joined #nixos
<clever> well, its not bricked :P
<sb000> okay, I couldn't select it with efibootmgr
<clever> what cmd did you try?
<sb000> sudo efibootmgr -a -b 2. but my BIOS had some wacko interface to set advanced boot options, where I could select grub, and that worked
<sb000> clever, thanks
zeta_0 has quit [Quit: rcirc on GNU Emacs 27.1]
<clever> -a -b2, will let you modify #2
<clever> -o | --bootorder XXXX,YYYY,ZZZZ
<sb000> ah, -o not -a
<clever> sb000: i think you want -o, to change the BoorOrder to only include 2
<sb000> alright, I
<sb000> 'll try that on the other machines in the office..
<clever> you can confirm it worked, with efibootmgr -v again
FRidh has joined #nixos
<sb000> well turns out the other machines don't have this wacko bios and they had the boot order set right already... i chose the wrong nixops machine to test first
zeta_0 has joined #nixos
<clever> sb000: ive also heard of machines that entirely ignore efi vars, and just boot the .efi file windows used
<clever> "it booted windows, ship it"
LilleCarl has joined #nixos
<DigitalKiwi> isn't that what secure boot is for :)
werner291 has quit [Quit: werner291]
werner292 has joined #nixos
pjt_tmp has quit [Ping timeout: 256 seconds]
pjt_tmp has joined #nixos
werner292 is now known as werner291
berberman_ has joined #nixos
jonringer has quit [Ping timeout: 258 seconds]
berberman has quit [Ping timeout: 268 seconds]
berberman_ has quit [Max SendQ exceeded]
berberman has joined #nixos
ky0ko has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
<pinpox> ryantm: are you here?
<ronthecookie> whats a windows?
<ronthecookie> \s (please dont kill me)
<DigitalKiwi> ohhi pinpox
asheshambasta has joined #nixos
<pinpox> ryantm: you are listed as the maintainer of the monit package, (https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/monitoring/monit.nix). I would like to suggest a change
<DigitalKiwi> pinpox: did you get mmonit working?
<pinpox> DigitalKiwi: Hi!
<pinpox> DigitalKiwi: yes :)
<DigitalKiwi> nice
<pinpox> DigitalKiwi: Thanks again for your help!
<ronthecookie> the linux freenode community feels like a little family, everywhere i go i see the same names
<DigitalKiwi> <2 minutes ago i was making notes and wrote you down lol
<pinpox> DigitalKiwi: I ended up creating a module like this: https://github.com/pinpox/nixos/blob/main/modules/mmonit.nix
<pinpox> I know it's a bit "hacky" but it works just fine
<DigitalKiwi> pinpox: i might be interested in helping update and maintain it
<pinpox> DigitalKiwi: Great!
<ronthecookie> pinpox: why is the binary for stopping called start on L20?
<zeta_0> ok so I finally got python-language-server working in emacs, it's because this lisp use-package code is a little off: https://github.com/emacs-lsp/lsp-python-ms#nixos
werner291 has quit [Quit: werner291]
<ronthecookie> zeta_0: congrats!
<DigitalKiwi> ronthecookie: windows is that thing we use when we want to install a piece of software without spending a few hours/days/months wrangling it ;P
<pinpox> ronthecookie: you are right, that is an error, it should be called mmonit-stop
riksteri has joined #nixos
civodul has joined #nixos
<zeta_0> it needs to be this order to work correctly: https://bpa.st/JOIA
<pinpox> DigitalKiwi: By helping "updating and maintainig it" do you mean I should create a pr on nixpkgs for it?
<pinpox> DigitalKiwi: I was trying to reach ryantm, he's the maintainer of the monit package. Atm it has just one option "config" for the monit config text, I'd like to see if it's possible to change that to "configfile", so that it accepts a path to a config.
<zeta_0> ronthecookie: thanks! I was 99% sure that it was my .emacs configuration, that was the reason for emacs not being able to detect the python-language-server binary that I installed with nix.
<pinpox> Having the config as text is not very nice
<pinpox> (especially because it may contain passwords for mmonit)
<pinpox> But before I decide to write my own module, I'll try to propose a change to the existing one
<{^_^}> Channel nixos-unstable-small advanced to https://github.com/NixOS/nixpkgs/commit/0446b8af52a (from 5 hours ago, history: https://channels.nix.gsc.io/nixos-unstable-small)
respawn_ has quit [Quit: Leaving]
<DigitalKiwi> pinpox: i'll look at it more in the next few days. if you didn't package it now i was probably going to take a shot at "soon" myself. it was on my list
<DigitalKiwi> the list that is always getting longer and rarely shorter :(
<pinpox> DigitalKiwi: I'd be happy to maintain it together with you if you want.
<DigitalKiwi> perfect
<pinpox> I'll create a PR draft and send you the link for review so we can discuss
<pinpox> Not that experienced with nix, I'm sure you can give me some pointers on what to change
<zeta_0> does all the nix functionality work when nix is installed wsl? I especially require home-manager and my (direnv+nix-direnv+emacs-direnv) to be able to work in wsl, here's the corresponding reddit issue, that I posted recently about this.
<zeta_0> ^
xcmw has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<DigitalKiwi> ok cool (and there's no rush either take your time i have a lot to finish in the next few days already)
<zeta_0> this link has some info on this, so i'm guessing all of nix's tooling/functionality should work fine in wsl? https://nixos.wiki/wiki/Nix_Installation_Guide#Windows_Subsystem_for_Linux_.28WSL.29
<DigitalKiwi> i still haven't updated my matomo PR from 2 weeks ago ;_; they've released a new version! https://github.com/NixOS/nixpkgs/pull/105983
<{^_^}> #105983 (by Kiwi, 2 weeks ago, open): matomo: 3.14.1 -> 4.0.4
<DigitalKiwi> ...or 6
vidbina has joined #nixos
<zeta_0> well, i'm going to head out because I need some sleep, post any responses you have on that reddit post, thanks!
<DigitalKiwi> 4.1.0-rc18 hours ago
<zeta_0> later everyone!
<ronthecookie> DigitalKiwi: nice github username
zeta_0 has quit [Quit: rcirc on GNU Emacs 27.1]
<DigitalKiwi> danke
<ronthecookie> he was chatting from emacs? crazy man
<DigitalKiwi> you should see my twitter name and avi ;) https://twitter.com/ArchKiwi
<ronthecookie> avi?
<DigitalKiwi> avatar
<DigitalKiwi> profile pic
zupo has joined #nixos
marco[m]3 has quit [Quit: Idle for 30+ days]
kaziemazie[m] has quit [Quit: Idle for 30+ days]
Layerex[m] has quit [Quit: Idle for 30+ days]
sb000 has quit [Remote host closed the connection]
sb000 has joined #nixos
sb000 has quit [Remote host closed the connection]
ravndal has quit [Remote host closed the connection]
ravndal has joined #nixos
<nf> my config sets networking.interfaces.enp0s25.useDHCP = true; so when i test it using build-vm it hangs for 1m30 on boot because the vm has no enp0s25 interface
<nf> is there a way to disable that if i'm in a vm?
<clever> nf: build-vm will include this module into your nixos build: https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/virtualisation/qemu-vm.nix
<nf> i know
<clever> nf: you could mkIf off anything in the config tree, starting on 529
<nf> ok, i was wondering if there was a canonical way to do it
<clever> nf: services.qemuGuest.enable looks like a nice and clean way
<nf> maybe mkIf (config.virtualisation ? qemu)
hnOsmium0001 has quit [Quit: Connection closed for inactivity]
thc202 has joined #nixos
<clever> that could also work
<nf> alternatively, is there a simple way to expose the host's network interfaces to the guest?
<nf> transparently
<nf> i'll check qemu's doc
<clever> not really, you would have to create multiple virtual interfaces, which get new names
<clever> and then bridge each into a diff host interface
<nf> ah
<clever> and the host would need to create one bridge per interface
<clever> if you wanted something fancy like a router in qemu
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zupo has joined #nixos
zupo has quit [Client Quit]
pjt_tmp has quit [Ping timeout: 256 seconds]
tsrt^ has quit []
nrh^ has joined #nixos
<siraben> How do I expire older nixos generations?
<ronthecookie> siraben: nix-collect-garbage or something like that
<siraben> ronthecookie: yeah I did that, nix-collect-garbage -d but they seem to persist still
<ronthecookie> you still see them in your bootloader or what? works fine for me
werner291 has joined #nixos
<siraben> ronthecookie: ah I have to run it as root
<patagonicus> siraben: You might have some garbage collection roots pointing to them. Try nix-store --gc --print-roots and see if there's something pointing to the old generations (such as a result symlink somewhere or an executable running via /proc if you haven't rebooted since you switched away from the old generation).
<patagonicus> Oh, yeah, that as well.
<siraben> been a while since I ran gc as root
xcmw has joined #nixos
<clever> you can also `nix-store --query --roots /nix/store/foo`
<clever> to see why foo is rooted
<patagonicus> There's nix.gc.automatic = true; :) With an optional nix.gc.options = "--delete-older-than 30d"
<siraben> Ok doing --install-bootloader updates the boot entries as well
<siraben> Yeah but automatic GC may lead to higher network use which is undesirable if my connection is spotty
<siraben> as in, more things get GC'd when i may not want them to be
<Ke> what's autoModules in nixos kernel build
<Ke> builds everything that's buildable as module as module?
cosimone has joined #nixos
<clever> Ke: i think so
<clever> pkgs/os-specific/linux/kernel/generate-config.pl: $answer = "m" if $autoModules && $alts =~ /\/m/ && !($preferBuiltin && $alts =~ /Y/);
<clever> it gets fed into this line of a perl script
<clever> 6 # Build whatever possible as a module, if not stated in the extra config.
<clever> 7 kernelAutoModules = true;
<clever> and the "pc" platform has this comment
<clever> pc32_simplekernel then inverts it
respawn_ has joined #nixos
FRidh has quit [Quit: Konversation terminated!]
__monty__ has joined #nixos
<Ke> thanks
<Ke> how does one find builds in hydra
<Ke> if I want to eg. find firefox on hydra for aarch64
cognemo has quit [Quit: cognemo]
werner291 has quit [Ping timeout: 258 seconds]
<Ke> nixos:release-20.09:nixpkgs.firefox-unwrapped.x86_64-linux
<Ke> is this like the main x86-64 firefox build for 20.09?
cognemo has joined #nixos
meh` has joined #nixos
knupfer1 has joined #nixos
hoijui has joined #nixos
<chrisaw> benley: Hoped you'd be on here! Do you have a link to your work on InSync (GUI version)? I'm itching to get this working on my setup and saw you had managed to get it working. :)
Darkmatter66 has joined #nixos
knupfer1 is now known as knupfer
hoijui has quit [Client Quit]
malook has joined #nixos
jboy has quit [Remote host closed the connection]
cosimone has quit [Remote host closed the connection]
cosimone has joined #nixos
malook has quit [Remote host closed the connection]
marsh has quit [Ping timeout: 246 seconds]
<aterius> seems to work if I replace latte after login
jboy has joined #nixos
__red__ has quit [Remote host closed the connection]
bridge[evilred] has quit [Quit: killed]
marsh has joined #nixos
sandy-claws has quit [Quit: updates]
Wraul[m] has joined #nixos
sangoma has quit [Quit: WeeChat 2.9]
zupo has joined #nixos
detran has quit [Quit: ZNC 1.8.1 - https://znc.in]
m0rphism has joined #nixos
xcmw has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
detran has joined #nixos
msouval has joined #nixos
m4ts has quit [Ping timeout: 272 seconds]
m4ts has joined #nixos
<msouval> hello and sorry if this has been asked before but I can't find an answer anywhere. I decided to switch to nixos to test the environment before implementing it in my workplace. I was playing around with configuration.nix and wanted to configure boot.plymouth.logo but everytime (no matter the right, ownership and path), nix-rebuild switch fails because "there is no such file or directory". Could anyone tell me what I'm doing wrong?
Kim has quit [Quit: WeeChat 2.6]
<lassulus> what did you try: I guess boot.plymouth.logo = ./path/to/logo.png; should work
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<msouval> thank you for your answer! I tried boot.plymouth.logo = "/path/to/logo.png";
<lassulus> ah yes, when the path is not quoted it is actually copied into the nix-store
<msouval> ah! thanks so much for that tip! i'm trying it right now
<nf> how can i add a directory to PATH in mkShell? (in my case .)
<lassulus> shellHook = '' export PATH=$PATH:${tostring ./.} '';
<msouval> thank you so much it worked perfectly!
sangoma has joined #nixos
fendor has joined #nixos
<nf> ok, shellHook = "PATH+=:."; works
<lassulus> that adds . to the PATH, so it depends on your current directory
<clever> while `${toString ./.}` adds the directory the nix file is in, even if thats not the current dir
<clever> and it will continue to work after you cd more
lgcl has joined #nixos
<nf> hm, the downside is it doesn't update if i edit the script, because this is in a flake
<clever> ah, flakes are evaled from a copy in /nix/store/
<clever> that complicates it
vidbina has quit [Ping timeout: 256 seconds]
<nf> i guess i don't really need a flake here, i might just use a shell.nix
<clever> oh, you can also load a flake in a shell.ix
parsnip has left #nixos [#nixos]
<nf> seems unnecessary
<clever> builtins.getFlake (toString ./.)
<clever> everything that flake.nix&friends does, is from /nix/store via flake rules
<clever> but shell.nix can then do ${toString ./.} and be impure
<clever> so shell.nix could fake inputs that the flake is exporting as outputs
philr has joined #nixos
lgcl has quit [Remote host closed the connection]
anjoletto[m] has joined #nixos
Darkmatter66 has quit [Ping timeout: 264 seconds]
knupfer has quit [Quit: knupfer]
mkaito has joined #nixos
mkaito has quit [Changing host]
mkaito has joined #nixos
nature has joined #nixos
<steveeJ> have there been any efforts to build something like a watchdog for clusters created with nixops, that ensures automatic failover of services if a node fails?
<pinpox> ryantm:
malook has joined #nixos
malook has quit [Client Quit]
miscalculated has quit [Ping timeout: 256 seconds]
malook has joined #nixos
werner291 has joined #nixos
fuzzypixelz has joined #nixos
malook has quit [Quit: malook]
respawn_ has quit [Quit: Leaving]
nixuser_ has joined #nixos
andymandias has quit [Quit: ZNC 1.8.1 - https://znc.in]
Robono has joined #nixos
<Robono> Just out of interest, is anyone else on nixos-unstable unable to install nixops?
andymandias has joined #nixos
Jerry0000009 has joined #nixos
Jerry0000009 has quit [Client Quit]
<Robono> ,channels
<{^_^}> Largest Nix channels: #nixos, #nixos-dev, #nixos-chat, #nixos-aarch64, #nixos-security, #nixcon, #nixos-officehours, #nixops, #haskell.nix, #nix-darwin, #nixos-de, #nixos-emacs, #nixos-on-your-router, #nixos-nur, #nix-lang, #nixos-fr, #nixos-systemd, #nixos-borg, #nixos-wiki
fuzzypixelz has quit [Quit: fuzzypixelz]
fuzzypixelz has joined #nixos
fuzzypixelz has quit [Remote host closed the connection]
fuzzypixelz has joined #nixos
fuzzypixelz has quit [Client Quit]
vidbina has joined #nixos
zimbatm_ has joined #nixos
zimbatm has quit [Ping timeout: 240 seconds]
<DigitalKiwi> Robono: which version?
<Robono> DigitalKiwi, both it seems.
<Robono> 1.6.1 and 2.0
<Robono> ERROR: Package 'prettytable' requires a different Python: 2.7.18 not in '>=3.6'
<Robono> I'm trying to figure out how to switch to another channel just for nixops to see if It's because of nixos-unstable
cfricke has quit [Ping timeout: 264 seconds]
cantstanya has quit [Remote host closed the connection]
cantstanya has joined #nixos
cfricke has joined #nixos
simonpe^^ has joined #nixos
<simonpe^^> When cross compiling I'm trying to run tests using qemu from the host system, but the buildInputs.qemu is different from the qemu I get without cross compiling. I'm not sure why
aswanson has joined #nixos
<simonpe^^> so the buildPackages.qemu basically recompiles the whole system
<simonpe^^> s/buildInputs/buildPackages/g
acarrico has joined #nixos
<simonpe^^> I think the binutils-wrapped is what differs
<DigitalKiwi> Robono: yeah... you can install it from a different channel ro try nixopsUnstable
bdju has quit [Read error: Connection reset by peer]
bdju has joined #nixos
BSD_guru has joined #nixos
h0m1 has quit [Quit: WeeChat 3.0]
BSD_guru has quit [Client Quit]
h0m1 has joined #nixos
endformationage has joined #nixos
h0m1 has quit [Client Quit]
h0m1 has joined #nixos
<matthewcroughan> clever: is there anything about my layered config that's preventing me from passing `inputs` to my files?
<matthewcroughan> firefoxFlake = inputs.firefox.packages.${pkgs.system}; programs.firefox.package = firefoxFlake.firefox-nightly-bin;
<matthewcroughan> this returns "attribute 'firefox' missing
<matthewcroughan> but in my hosts/t480/configuration.nix, this would work fine
<clever> { config, pkgs, self, ... }@inputs:
<clever> matthewcroughan: thats not where inputs comes from
<clever> the flake stuff isnt passed into modules like that
<matthewcroughan> yeah I was just trying everything
<matthewcroughan> if I just passs { stuff, inputs, ... } it still fails
<clever> simplest option is to create your own nixos option
<clever> and stick the attrset in that option
<matthewcroughan> have you got an example of doing that in your repo?
sbetrium has quit [Quit: sbetrium]
<clever> matthewcroughan: a really simple example is to just set system.build.flake-inputs = inputs;
<clever> from a file that has access to the inputs
<matthewcroughan> Remember, I said it works like this just fine in hosts/t480/configuration.nix
<clever> *looks*
<matthewcroughan> so why would this work there, but not in this layered stuff?
bridge[evilred] has joined #nixos
<clever> { config, pkgs, inputs, ... }:
<clever> that is an argument named inputs
<clever> rather then putting all args into a set, that you then name inputs
<clever> the 1st one, would use inputs.inputs.firefox, assuming the arg is passed the same way
<matthewcroughan> if I copy `{ config, pkgs, inputs, ... }:` into my users/ it won't work of course
<clever> yeah, this line adds inputs to the args for every module
<clever> so you can do " { config, pkgs, inputs, ... }:"
<clever> but you need to add it to the specialArgs of home-manager too
<matthewcroughan> ah.. awesome
<matthewcroughan> clever: what's the syntax on that?
<matthewcroughan> oh nvm, it's literally just attr = something
<matthewcroughan> Was confused by the ]; above it ;D
chaoflow has joined #nixos
<matthewcroughan> clever: if I put that in users/default.nix I get "undefined variable 'inputs'"
<clever> it gets passed thru to the lib.evalModules function, which takes a list of modules
<clever> you need to find out where home-manager calls lib.evalModules, and if it allows setting specialArgs
<matthewcroughan> Have asked rycee about it in #home-manager
<matthewcroughan> couldn't find anything in `man home-configuration.nix`
<clever> check the source, grep it for evalModules
<clever> and it doesnt let you customize specialArgs
konobi has quit [Remote host closed the connection]
<clever> so youll need to go the other route
<matthewcroughan> which is?
<matthewcroughan> Importing home-manager in the flake.nix rather than in configuration.nix for hosts/t480?
<clever> _module.args.inputs = inputs;
<clever> that lets any module add args, which are then consumed by all modules
<matthewcroughan> I still get "undefined variable 'inputs'"
<clever> you must set it, from a context which does have access
<matthewcroughan> so hosts/t480/configuration.nix?
<matthewcroughan> or can I add this in the flake?
<matthewcroughan> `anonymous function at /nix/store/cig3zz9li4b3cv2pvh7f32glb2h7l4c2-source/nixos/lib/eval-config.nix:11:1 called with unexpected argument '_module'`
<clever> matthewcroughan: line 28-32 is a nixos module
justanotheruser has quit [Ping timeout: 268 seconds]
<clever> how do you then pass home-manager an HM module, from nixos?
<matthewcroughan> right, I think I see
fuzzypixelz has joined #nixos
<matthewcroughan> clever: are you asking me seriously?
<matthewcroughan> Because I don't know if I know the actual answer :D
<clever> i dont use home-manager, so i dont know the asnwer exactly
<clever> modules = [
<clever> (import ./hosts/t480/configuration.nix)
<clever> also, dont use import there, that makes the error messages worse
<clever> modules and imports can take files, lib.evalModules will import for you
<matthewcroughan> where then should I import it?
<matthewcroughan> I'm just copying colemickens
<matthewcroughan> is your repo "nixos-configs"?
<clever> yeah
<matthewcroughan> A distinctive lack of flake.nix :D
<clever> yeah, i dont use flakes much yet
<clever> matthew = import ./matthew self; # pass 'self' in order to allow ./users/default.nix -> ./users/matthew/default.nix to access ${self}, to provide a path relative to flake.nix.
<matthewcroughan> yeah
<clever> matthewcroughan: note here, you are passing the flake "self" to matthew/default.nix
<clever> matthewcroughan: so the self in here, contains a self.inputs
<clever> and this is an HM module
<matthewcroughan> this is necessary for this line to work: https://github.com/MatthewCroughan/nixcfg/blob/master/users/matthew/default.nix#L18
<clever> so _module.args.inputs = self.inputs; and your done
<matthewcroughan> without this, L18 will never be allowed to access ${self}
<matthewcroughan> lol you've gotta be kidding me
<{^_^}> Channel nixos-20.03 advanced to https://github.com/NixOS/nixpkgs/commit/929768261a3 (from 5 days ago, history: https://channels.nix.gsc.io/nixos-20.03)
<matthewcroughan> trace: `mkStrict' is obsolete; use `mkOverride 0' instead.
<matthewcroughan> The option `home-manager.users._module.args' does not exist. Definition values:
<clever> from which default.nix?
<matthewcroughan> users/default.nix
<matthewcroughan> ah sorry sorry
gustavderdrache has joined #nixos
<pinpox> Hi, I'm searching for a simple example on how to have my home-manager config be a flake in a separate repo that get's pulled in in my system config (which is using flakes)
<matthewcroughan> clever: if I were to write a comment for what I'm doing, what would it be?
<matthewcroughan> You've unblocked me from using home-manager theoretically forever with this, because I had no idea why I couldn't pass certain things, thanks for it
<clever> matthewcroughan: passing the inputs from the self that just one module gets, to every other module
<matthewcroughan> what is the "just one module" that gets it?
<pinpox> I've seen the README entry about flakes in home-manager, the example there just imports ./home.nix, what I want is to import a repo instead of a separate file
<pinpox> The point is to have the home-manager config separate so it can also be used independently of my nixos systems configs
<clever> matthewcroughan: when you did `import ./matthew self`, you passed it a copy of self
<matthewcroughan> clever: you're saying that only flake.nix L26 gets it? https://github.com/MatthewCroughan/nixcfg/blob/master/flake.nix#L26
<clever> matthewcroughan: the `self:` then ate that arg, and returned `{ config, lib, pkgs, inputs, ... }:`, line 3-onward, which is a module
<clever> matthewcroughan: so only that one module has `self` in scope
<matthewcroughan> clever: yeah, why does this now block anything lower from using {inputs} ?
jonringer has joined #nixos
<clever> because inputs is an attribute of self
<clever> and self is only in scope for that one file
<matthewcroughan> does that mean pkgs and config are also now out of scope?
<clever> pkgs is being added by something in home-manager
<clever> config is coming from lib.evalModules
zupo has joined #nixos
<matthewcroughan> Holy crap it worked
<matthewcroughan> now I can have firefox nightly with plugins defined :O
<clever> matthewcroughan: its mostly due to how the nix language is pure, variables are only in scope if you received them as args to a function
<matthewcroughan> clever: the way you've described this demystifies everything for me.
<matthewcroughan> thank you
<matthewcroughan> but I do not understand quite how what I do in users/default.nix strips scope
<clever> it doesnt strip anything
<matthewcroughan> you say "self" ate the arg
<matthewcroughan> you're talking about L1? `self:` ?
<clever> matthew = import ./matthew self; # pass 'self' in order to allow ./users/default.nix -> ./users/matthew/default.nix to access ${self}, to provide a path relative to flake.nix.
<clever> that will import the other default.nix, and then treat it as a function, passing it 1 arg
<matthewcroughan> and that 1 arg is?
<matthewcroughan> self: ?
<clever> the "self" that it received as an input, from flake.nix
<matthewcroughan> so, users/default.nix could, if it wanted to, access `inputs`?
<clever> this file, then puts that "self" into a new variable, also called self
konobi has joined #nixos
<matthewcroughan> but anything users/default.nix imports, cannot?
<clever> and returns a 2nd function
<clever> so the `users/default.nix` is effectively just doing `matthew = { config, lib, pkgs, inputs, ... }: ...`
<clever> matthewcroughan: any time you import a file, that file is evaluated in an entirely clean scope, with no variables leaking over, at all
<matthewcroughan> right, but I put `{ config, lib, pkgs, inputs, ... }:` everywhere
<clever> that function is fed to lib.evalModules
<clever> which will pass the _module.args to every module
<clever> and you must somehow set _module.args.inputs
hurricanehrndz has joined #nixos
<clever> lib.evalModules is practically magic
<clever> it will run every module, recursively (checking each for an imports attr)
<clever> it will then merge the return value from every module (according to the merge rules defined in options)
<matthewcroughan> clever: wait, so could I have had `{ config, lib, pkgs, self.inputs, ... }:` ?
<matthewcroughan> lol
<clever> and then it will pass the final merged result back into every module
<clever> so you get your own return value, as an argument
<raboof> no more PR notifications? they were noisy, but I kinda liked them :D
<clever> `{ config, lib, pkgs, self.inputs, ... }:` is not valid, you cant have a . in an arg name
<ryantm> pinpox since monit supports an include file statement you can support a separate config file with that.
<matthewcroughan> clever: if you could, would I be correct in my thinking?
<clever> matthewcroughan: any time you do `{ foo, bar }:` your just creating a function that accepts "one argument", that argument MUST be a set, which contains a .foo and .bar attr
<clever> and it only works one layer deep, so it would be `{ config, lib, pkgs, self, ... }:`
<pinpox> ryantm: Does it? I searched for stuff like "passcommand" or things like bash evaluation using $(...), even env vars. How can I put the pass in a separate file?
<clever> and you would still have to set _module.args.self somewhere
<matthewcroughan> clever: so the thinking would be `self.self.inputs` ?
<matthewcroughan> or is that not what happened still?
<clever> that doesnt make any sense
Skallwar has left #nixos ["User left"]
turlando has quit [Ping timeout: 268 seconds]
<matthewcroughan> users/deafult.nix sets `self:` as a function, that func -> `users/matthew/default.nix`. Inputs is therefore not available, because?
* pinpox facepalms
<pinpox> ryantm: sorry to bother you, I totally missed that
<clever> matthewcroughan: that self.inputs will only exist, if the thing calling it, passes it a set containing inputs
<clever> matthewcroughan: but you could also do `{ inputs, ... }: { config, lib, pkgs, ... }:`
<matthewcroughan> clever: so how can I pass it in users/default.nix ?
<clever> matthewcroughan: as i said: 2020-12-21 10:43:56 < clever> matthewcroughan: any time you do `{ foo, bar }:` your just creating a function that accepts "one argument", that argument MUST be a set, which contains a .foo and .bar attr
<ryantm> pinpox np, I'm happy you are packaging mmonit. I have an ubuntu server running it still.
<pinpox> ryantm: Yep, I've got it running on my local setup and am testing it for a few days before opening a PR
<pinpox> The password thing was bugging me, even though it is in a private VPN
<pinpox> In case you want to take a look, this it what I'm currently running it with: https://github.com/pinpox/nixos/blob/main/packages/mmonit/default.nix
<matthewcroughan> clever: https://pad.1312.media/p/clever
<matthewcroughan> this is a live etherpad
<clever> matthewcroughan: i think passing self thru like that is the simplest option, it already works, and gives you access to a few things
<clever> the way you already have it working
<matthewcroughan> yeah, but if I want to set `_module.args.inputs = self.inputs;` in users/default.nix instead of users/matthew/default.nix, what can I do?
<matthewcroughan> Or can't I?
<matthewcroughan> have I missed the point if I still think this?
<clever> like so
<clever> matthewcroughan: the matthew key, can either be a list of HM modules, or a naked HM module
<clever> and a module can either be a set or a function
<clever> or a path
<matthewcroughan> >value is a function while a set was expected
<clever> you have to modify matthew/default.nix to remove the self: now
<clever> since your not passing it a self anymore
<clever> and i just added self, so you can now do { config, pkgs, self, ... }:
<matthewcroughan> yeah but that makes my `builtins.readFile "${self}/dotfiles/bashrc";` fail
meh` has quit [Ping timeout: 272 seconds]
<matthewcroughan> ah ok
<matthewcroughan> have pasted the result in etherpad
<clever> did you add the .args.self?
<matthewcroughan> you mean _module.args.inputs = self.inputs; ?
<matthewcroughan> oh sorry you edited it, I see
<clever> look closer, i added a 2nd line
<clever> now you have 2 extra args, self and inputs
<matthewcroughan> this way is less simple, but at least I'm interfacing with stuff
<matthewcroughan> is there any docs on this _module stuff?
<clever> its internals of how lib.evalModules works
<clever> one sec...
<matthewcroughan> So if I were gonna comment this, I'd want a link to what you gave earlier, and maybe some lib.evalModules stuff?
<clever> maybe link this one?
<clever> that has a collection of custom modules, that are entirely self-contained, not nixos or HM
<matthewcroughan> Is what I commented fair?
<clever> probably
<ryantm> @pinpox module comments: use systemd StateDirectory and Dynamic user to get rid of init and explicit users. In nixpkgs, you'd want an option to open the firewall instead of just doing it
<matthewcroughan> "his manipulates pkgs.lib.evalModules in order to manipulate what is available in the scope of imported nix files."
<matthewcroughan> This*
rb2k has joined #nixos
<pinpox> ryantm: Thanks for the input, I'll get right to it
<matthewcroughan> clever: you've upgraded my life, thank you.
<matthewcroughan> never in a million years would I have figured that out and have gotten a much better understanding of how things work.
<rb2k> flokli do you happen to have a minute for a review: https://github.com/NixOS/nixpkgs/pull/107207 ? That's the last dependency before I can upload the libdnf/microdnf derivation without having dozens of unrelated libraries in there :)
<{^_^}> #107207 (by rb2k, 1 day ago, open): libsmartcols: init at v2.36.1
<rb2k> also: the first one that I adde myself as the maintainer :)
respawn_ has joined #nixos
<matthewcroughan> clever: just to clarify, I am passing functions in the opening {stuff,thing,...}, right?
<matthewcroughan> Previously, I was passing `self` as `self:`
<clever> matthewcroughan: your defining a function, that takes a single argument
<matthewcroughan> Now I am passing it as `{stuff, self, ...}` what is the difference?
<clever> and that argument must be a set, containing the listed keys
<clever> the module system will then supply that set to you
<matthewcroughan> so previously, I was DEFINING a function?
nly has joined #nixos
<matthewcroughan> Now I am PASSING a function?
<clever> nope, in both cases you where defining a function
<dminuoso> matthewcroughan: the shape of a function is `a: b`, where `a` may be a variable name or a pattern
<matthewcroughan> so what's the difference between `{ config, lib, pkgs, inputs, self, ... }:` and `self:` ?
<clever> previously, it was a function that took 2 args, which can also be thought of as a function that takes 1 arg, and returns a second function
<clever> matthewcroughan: the 1st only accepts a set, which must contain the listed keys, the 2nd can accept any type
<dminuoso> matthewcroughan: {stuff, self, ...}` is a type of pattern that matches any attr set that has at least two attributes, stuff and self, and binds their corresponding values to them
orivej has joined #nixos
<dminuoso> matthewcroughan: are you, perhaps, aware of some languages permitting `let [x|xs] = ...` or maybe `let [x] = ...` that would in the first case match the head of the list into x and the tail into xs, or in the second case match a singleton list, binding the sole value to x?
<matthewcroughan> all of that is a bit above my head :D
<matthewcroughan> dminuoso: basically, clever has blown my mind and provided me a new way of doing things here
<matthewcroughan> I'm now trying to comment so that I understand roughly what's going on when I come back to it in the future
<matthewcroughan> can you see if what I'm saying is right? And follow it through to the file in ./users/matthew/default.nix, as is stated on L19
nixuser_ has quit [Read error: Connection reset by peer]
<simpson> > let f = a: a; in f { a = 2; }
<{^_^}> { a = 2; }
<simpson> > let f = {a}: a; in f { a = 2; }
<{^_^}> 2
<simpson> matthewcroughan: ^^ Does this help? Hopefully this should just click for you as part of how Nix works, rather than needing a big explanatory justification.
Robono has quit [Remote host closed the connection]
fendor_ has joined #nixos
fendor has quit [Ping timeout: 260 seconds]
nhs has joined #nixos
waleee-cl has joined #nixos
tlaxkit has joined #nixos
monotux has quit [Quit: WeeChat 2.8]
monotux has joined #nixos
dbmikus has joined #nixos
ManiacOfMadness has joined #nixos
Regalium has joined #nixos
<Regalium> ,channels
<{^_^}> Largest Nix channels: #nixos, #nixos-dev, #nixos-chat, #nixos-aarch64, #nixos-security, #nixcon, #nixos-officehours, #nixops, #haskell.nix, #nix-darwin, #nixos-de, #nixos-emacs, #nixos-on-your-router, #nixos-nur, #nix-lang, #nixos-fr, #nixos-systemd, #nixos-borg, #nixos-wiki
oyren[m] has quit [Quit: Idle for 30+ days]
justanotheruser has joined #nixos
growpotkin has joined #nixos
atlasznctestf has quit [Quit: ZNC 1.8.2 - https://znc.in]
<Regalium> I have a `packageOverrides` in my ~/.config/nixpkgs/config.nix, it's the same file on two systems, same nix version, and same NixOS version
<Regalium> But on ONE of the systems, I get: warning: there are multiple derivations named 'regalium'; using the first one
<Regalium> When installing my overridden package. The warning makes sense, but I'm confused why I don't get this on my other identical system
<clever> Regalium: what does `nix-channel --list` and `sudo nix-channel --list` report?
<Regalium> nix-channel --list is empty (for the user) on both systems, as root: nixos https://nixos.org/channels/nixos-unstable
<clever> Regalium: does your override use the same attribute name for the replacement?
<clever> like, foo = self.foo.override....;
<Regalium> No, just: packageOverrides = pkgs: rec { regalium = pkgs.buildEnv { name = "regalium"; paths = [ ... ] } }
<clever> Regalium: you probably still want to use -iA
<clever> -i will search for any package with the right .name, while -iA tells it exactly what to use
<clever> nix-env -iA nixos.regalium, will use your exact override, from a channel named nixos in --list
<Regalium> clever, I'm an idiot and ran nix-channel on the wrong system, there are two channels on the second system, so that does explain it
<Regalium> I didn't realise I'd typo'd the --add on the second system
<Regalium> I'll use -iA from now on, thanks for helping me out
<clever> Regalium: without -A, it will search every channel for the given pkg
<clever> Regalium: but every channel also respects config.txt, so both channels are going to have the same override
<clever> config.nix*
<Regalium> Yeah, that makes sense, the warning was a little confusing because I thought it was implying that I'd defined regalium twice
<Regalium> Which I did implicitly I guess, but I meant written out in the file twice somehow
<clever> there was probably a nixos.regalium and a nixoops.regalium
<Regalium> Yup
TonyTheLion has joined #nixos
<{^_^}> Channel nixpkgs-20.09-darwin advanced to https://github.com/NixOS/nixpkgs/commit/a3a3dda3bac (from 2 hours ago, history: https://channels.nix.gsc.io/nixpkgs-20.09-darwin)
<ryantm> pinpox: Thank you. Please @ me when you PR mmonit to nixpkgs, and you can also add me as a maintainer to the module and package.
sangoma has quit [Ping timeout: 260 seconds]
temp_kiwi has joined #nixos
tlaxkit has quit [Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/]
ymatsiuk has joined #nixos
<ymatsiuk> can someone point me to an example of pkg where actual pkg depends on external (dnsmasq in my case) they communicate via dbus, use systemd to start services?
dbmikus has quit [Ping timeout: 256 seconds]
<ymatsiuk> I'm trying to make VPN client (appgate-sdp) work in nixos, which is somewhat complicated as it has too many moving parts like the app itself contains service, GUI and driver (3 separate binaries) + depend on systemd and dnsmasq.
bvdw has quit [Quit: The Lounge - https://thelounge.chat]
bvdw has joined #nixos
Regalium has quit [Remote host closed the connection]
<leonardp> ymatsiuk: i know lxd uses dnsmasq but i am not quite sure if that is what you are looking for https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/admin/lxd/default.nix
<leonardp> libvirt would also be a candidate
sangoma has joined #nixos
jophish has quit [Ping timeout: 272 seconds]
jophish has joined #nixos
<ymatsiuk> leonardp thanks! checking
<ymatsiuk> is it even the right place for these kinds of questions ?
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
supersandro2000 has quit [Ping timeout: 246 seconds]
cfricke has quit [Quit: WeeChat 3.0]
supersandro2000 has joined #nixos
NeoCron has joined #nixos
<sphalerite> ymatsiuk: yep :)
noonien has quit [Quit: Ping timeout (120 seconds)]
noonien has joined #nixos
aw has quit [Quit: Quitting.]
aw has joined #nixos
Jackneill has quit [Ping timeout: 240 seconds]
philr has quit [Ping timeout: 240 seconds]
malook has joined #nixos
malook has quit [Client Quit]
turlando has joined #nixos
jumper149 has joined #nixos
respawn_ has quit [Quit: Leaving]
<jumper149> Is it possible to configure `nix repl` to have a vi-mode like `set -o vi` in bash for example?
<clever> jumper149: i believe its using libreadline, so check if that has env vars to switch its mode
dbmikus has joined #nixos
kirelagin has joined #nixos
cosimone has quit [Ping timeout: 256 seconds]
turlando has quit [Remote host closed the connection]
turlando has joined #nixos
Jackneill has joined #nixos
rb2k has quit [Ping timeout: 264 seconds]
turlando has quit [Ping timeout: 264 seconds]
<jumper149> clever: Hmm, I tried editing ~/.inputrc as explained here: https://tiswww.case.edu/php/chet/readline/readline.html#SEC9 but that doesnt seem to have any effect
<clever> jumper149: it might also need the program to tell readline to read the cfg file, do the docs say anything about that?
cole-h has joined #nixos
<jumper149> It says the config is read on startup of a program that uses readline
<jumper149> In addition there is the keybinding C-x C-r to reread this file, but that doesnt have an effect for me either
cfricke has joined #nixos
<jumper149> could someone check on their machine: `echo "set editing-mode vi" > ~/.inputrc` and then check if they have vi mode in the repl?
Dotz0cat has quit [Ping timeout: 268 seconds]
<sphalerite> jumper149: bash definitely reads ~/.inputrc for me, I checked with strace
Dotz0cat has joined #nixos
<sphalerite> jumper149: what are you using?
<jumper149> sphalerite: `nix repl`
<sphalerite> aah. nix repl doesn't use readline, so that would explain it :)
<clever> jumper149: i did C-x C-r while strace'ing the repl, and it didnt read any cfg files
<clever> sphalerite: ah, has it changed? i thought it did
<jumper149> Ok well at least everything is working as expected then^^
<sphalerite> clever: it's used libeditline for quite a while now, because of GPL concerns iirc
<clever> sphalerite: ah, that explains why i thought it was readline
<sphalerite> I think nix _might_ still support readline, but it isn't built with it by default
raoul9 has quit [Read error: Connection reset by peer]
raoul9 has joined #nixos
pepesza has quit [Ping timeout: 246 seconds]
pepesza has joined #nixos
cfricke has quit [Quit: WeeChat 3.0]
hurricanehrndz has quit [Ping timeout: 260 seconds]
<jumper149> Sooo, I guess there is no vi mode for editline?
<sphalerite> I don't think so
<jumper149> F*cking licenses man... :(
<sphalerite> I think you can build nix against readline though
<clever> i just throw code at github and ignore the license file, lol
simonpe^^ has quit [Remote host closed the connection]
<sphalerite> > nix.override { editline = readline; }
<{^_^}> "<derivation /nix/store/p9xrwilrpb08pq0180hkazn43m4r1rjv-nix-2.3.10.drv>"
<sphalerite> that might work
rb2k has joined #nixos
<jumper149> I'll see what happens :D
<sphalerite> nope never mind, doesn't work…
mallox has quit [Quit: WeeChat 3.0]
mallox has joined #nixos
zie has quit [Quit: ZNC 1.8.1 - https://znc.in]
zie has joined #nixos
goodwill has quit [Ping timeout: 246 seconds]
epta has quit [Ping timeout: 246 seconds]
dfordvm has quit [Ping timeout: 246 seconds]
evax has quit [Ping timeout: 264 seconds]
grw1 has quit [Ping timeout: 264 seconds]
tristanC has quit [Ping timeout: 246 seconds]
AtnNn has quit [Ping timeout: 246 seconds]
dramaturg has quit [Ping timeout: 246 seconds]
AtnNn has joined #nixos
epta has joined #nixos
dfordvm has joined #nixos
grw1 has joined #nixos
solene has quit [Ping timeout: 246 seconds]
sjlnk has quit [Ping timeout: 246 seconds]
page has quit [Ping timeout: 246 seconds]
evax has joined #nixos
nly has quit [Remote host closed the connection]
solene has joined #nixos
goodwill has joined #nixos
cruxeternus has quit [Ping timeout: 264 seconds]
mg has quit [Ping timeout: 264 seconds]
jkt has quit [Ping timeout: 264 seconds]
myme has quit [Ping timeout: 264 seconds]
jkt has joined #nixos
nly has joined #nixos
mg has joined #nixos
myme has joined #nixos
page has joined #nixos
sjlnk has joined #nixos
dramaturg has joined #nixos
cruxeternus has joined #nixos
tristanC has joined #nixos
KarlJoad has joined #nixos
cosimone has joined #nixos
fuzzypixelz has quit [Quit: fuzzypixelz]
asheshambasta has quit [Ping timeout: 258 seconds]
KarlJoad` has joined #nixos
evax has quit [Ping timeout: 246 seconds]
KarlJoad has quit [Read error: Connection reset by peer]
evax has joined #nixos
dfordvm has quit [Ping timeout: 264 seconds]
nore has quit [Ping timeout: 264 seconds]
AtnNn has quit [Ping timeout: 264 seconds]
dbmikus has quit [Quit: WeeChat 2.9]
AtnNn has joined #nixos
dfordvm has joined #nixos
nore has joined #nixos
miscalculated has joined #nixos
<esotericn> does the nix daemon deal with dogpiling etc properly? e.g. do I need to lock around potentially building the same derivation twice or can I run nix-build in parallel as much as I want without fear?
<Yaniel> I think it has its own lock?
miscalculated2 has joined #nixos
hurricanehrndz has joined #nixos
miscalculated has quit [Ping timeout: 264 seconds]
miscalculated2 is now known as miscalculated
sigmundv has joined #nixos
sss2 has joined #nixos
ymatsiuk has quit [Remote host closed the connection]
Cale has joined #nixos
<simpson> Yeah, you should be fine.
hurricanehrndz has quit [Ping timeout: 258 seconds]
hurricanehrndz has joined #nixos
mallox has quit [Quit: WeeChat 3.0]
johnw has quit [Quit: ZNC - http://znc.in]
pushqrdx has joined #nixos
<pushqrdx> can i use parallel build with nixos-rebuild?
<pushqrdx> it's building some huge stuff without parallel and is talking ages
<Yaniel> is that huge stuff flagged as supporting parallel builds?
<pushqrdx> i think it's currently building wine, which i believe has a parallel flag
<pushqrdx> but i am looking for a more global flag or something to enable parallel for all during nixos-rebuild switch
cosimone has quit [Remote host closed the connection]
<simpson> pushqrdx: What's your /etc/nix/nix.conf have for max-jobs? That would control parallelism of independent builds.
<simpson> I don't think nixos-rebuild does anything special which would limit that parallelism; I've seen it build stuff in parallel before.
<pushqrdx> max-jobs 8, which is correct
<pushqrdx> idk why it builds wine without parallel though, this is the second time it does this
<pushqrdx> and it's so slow
<pushqrdx> but cores are set to 0 though.. hm?
<simpson> IIRC 0 means to autodetect at runtime, but I'm probably wrong.
<andi-> yeah
<bigvalen> sphalerite, Oh, from yesterday... turns out that I needed a two-second sleep, after initrd started. Otherwise 'btrfs device scan' wouldn't spot my root drives. Took...quite a while to find someone else who had debugged it :)
hurricanehrndz has quit [Ping timeout: 264 seconds]
<andi-> It is a bit weird as 0 in the nix cli means none but nixpkgs treats it as "auto discover"
<andi-> and nix explicitly sets it to 0 to do so..
<pushqrdx> welp.. i want this build to finish today and it won't building like that
<pushqrdx> i want to override whatever is screwing up and building in serial
<andi-> --option cores <your cores>
<simpson> pushqrdx: Does it *look* like it's building in parallel? If you check your CPU top of choice, are the CPUs busy running C compilers?
cosimone has joined #nixos
<pushqrdx> simpson no it doesn't, and it's creating 1 object file at a time even in the terminal
<simpson> Okay, good, just double-checking.
<bigvalen> Is there any reason to leave nix-store mounted rw for a while ? (I just changed btrfs to use compression, and wanted to re-compress everything).
rajivr has quit [Quit: Connection closed for inactivity]
<pushqrdx> andi- --options cores seems to have done the trick, it's now hammering all 8 cores
<pushqrdx> this is weird though that i had to specify it myself
copy has joined #nixos
copy has quit [Client Quit]
<andi-> there are two knobs:
<andi-> - jobs
<andi-> - cores
<andi-> jobs = parallel builds executed
copy has joined #nixos
copy has quit [Client Quit]
<andi-> cores = the amount of cores a single build can (should) consume
copy has joined #nixos
copy has joined #nixos
copy has quit [Client Quit]
copy has joined #nixos
copy has quit [Client Quit]
<pushqrdx> it seems like nix doesn't auto detect the cores right in my case then?
<pushqrdx> what is weird is that in nix-shell builds it's using all cpu alright
<andi-> apparently not. I am not sure what the default value is
<andi-> nix-shell is not some kind of fancy sandbox. In a nutshell it just sets PATH (and a few more vars)
<pushqrdx> but nixos-rebuild is a sandbox?
<pushqrdx> is that what you're trying to say
<andi-> yeah, proper nix build are done with sandboxing
M86ul[m] is now known as helpidentify[m]
hurricanehrndz has joined #nixos
<andi-> nix-shell is pretty much an impure way to jump into an environment that looks like the one the build was done in. And with environment I mean environment variables.
<pushqrdx> nix.conf has my cores set to 0 which should auto detect as far as you and others said, so idk why it's messed up then
<andi-> well 0 is a weird case as it *should* autodetect. But some derivations (those that handle NIX_BUILD_CORES them self and not via e.g. stdenv) just pass it to make which then is obviously not the desired outcome. stdenv calls `nproc` in case it is set to 0.
<andi-> You were building what? Wine?
<andi-> That derivation actually looks fine.
<simpson> And FWIW calling `nproc` is the right thing to do, so that's probably not the problem. You can experiment with it yourself to see if it's being fed wrong information, though.
<andi-> IIRC there was some weird issue where builds from within a nix-shell would be constrained to a single build core on single-user isntalls.
<andi-> since nix-shell would set the cpu masks..
gustavderdrache has quit [Quit: Leaving.]
vidbina has quit [Ping timeout: 256 seconds]
<pushqrdx> andi- yeah building wine, it doesn't make much sense why it's acting that way
berberman_ has joined #nixos
fuzzypixelz has joined #nixos
<fuzzypixelz> hello
<andi-> ho
berberman has quit [Ping timeout: 272 seconds]
<fuzzypixelz> can someone please help me with a rather specific problem?
<fuzzypixelz> I'm trying to setup the Haskell Layer on Spacemacs
<fuzzypixelz> It requires some cabal packages
<{^_^}> Channel nixos-20.09-small advanced to https://github.com/NixOS/nixpkgs/commit/a3a3dda3bac (from 5 hours ago, history: https://channels.nix.gsc.io/nixos-20.09-small)
<fuzzypixelz> I _think_ simply installing haskellPackages.apply-refact wouldn't make the package available to spacemacs, would it?
m4tsa_ has joined #nixos
zupo has joined #nixos
m4ts- has joined #nixos
m4ts has quit [Ping timeout: 260 seconds]
<{^_^}> Channel nixpkgs-unstable advanced to https://github.com/NixOS/nixpkgs/commit/d8375c5b79a (from 12 hours ago, history: https://channels.nix.gsc.io/nixpkgs-unstable)
mallox has joined #nixos
lord| has quit [Ping timeout: 265 seconds]
m4tsa_ has quit [Ping timeout: 240 seconds]
lord| has joined #nixos
davidv7 has quit [Ping timeout: 268 seconds]
m4ts- has quit [Ping timeout: 240 seconds]
<sphalerite> bigvalen: ouch!
m4ts has joined #nixos
m4tsa_ has joined #nixos
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
m4ts has quit [Ping timeout: 264 seconds]
hnOsmium0001 has joined #nixos
<{^_^}> #36604 (by mrVanDalo, 2 years ago, closed): haskellPackages.ghc-mod is broken
<fuzzypixelz> ghc-mod is still broken on 20.09
<fuzzypixelz> as of today, it's been more than two years
<palo> fuzzypixelz: so sad
* palo is mrvandalo
<palo> I'm not using ghc-mod anyway anymore, this language server approach works a bit better for me
<fuzzypixelz> It's deprecated and unmaintained, my bad
m4ts has joined #nixos
m4tsa_ has quit [Ping timeout: 246 seconds]
sangoma has quit [Quit: WeeChat 2.9]
dsg has quit [Remote host closed the connection]
zupo has joined #nixos
fuzzypixelz has quit [Quit: fuzzypixelz]
fuzzypixelz has joined #nixos
lord| has quit [Ping timeout: 256 seconds]
lord| has joined #nixos
<matthewcroughan> clever: I can't really thank you enough for explaining that stuff to me earlier.
<matthewcroughan> Is there anything you'd recommend reading, to learn about scope?
<matthewcroughan> Scoping things in Nix I feel is one of the hardest aspects to understand.
<matthewcroughan> It's easy when you do not use home-manager or flakes, but the reality is that people will build and use things like home-manager.
dsg has joined #nixos
<clever> matthewcroughan: basically, every nix file is evaluated in its own private scope, it never gets any context from whatever imported it
<matthewcroughan> but what about implicitness?
<clever> matthewcroughan: the only way to get things into a nix file, is for the file to return a function, then you call that function and pass it things
<matthewcroughan> how do I know if I need or do not need to put `{ config }`
<matthewcroughan> how do I know if something else is adding it for me, etc
<clever> whatever is calling the function, is passing it things
<matthewcroughan> Yeah but it's impossible to start from scratch almost, yknow?
<clever> modules are always in the form of { config, lib, ... }:
<clever> a module always returns a set containing 3 keys, options, imports, and config
<matthewcroughan> Is that noted down anywhere official?
<matthewcroughan> Does that have to be the case? How official is that?
<clever> it should be in the nixos module docs
<matthewcroughan> and by definition, what is a module?
<matthewcroughan> Any nix file that can be imported?
<clever> a module is a function that looks like this:
<clever> { config, lib, ... }: { options = {}; imports = []; config = {}; }
<clever> the module system can take either a naked function, the path to a file containing that function, or a list of either
<clever> when you where doing `import ./matthew self`, you where passing the home-manager module system a naked function
<matthewcroughan> "home manage module system" ?
<clever> the function part is optional, if you dont need anything, you can reduce it to { options = {}; imports = []; config = {}; }
pushqrdx has quit [Remote host closed the connection]
<matthewcroughan> so, the home-manager module system is a completely diverged thing from the standard nix module system?
<clever> its using lib.evalModules, so it works the same general way as nixos
<benley> iirc it uses the same module system, but it provides its own modules.
<clever> but it has its own set of modules, so things like systemd.services arent an option within HM
<clever> matthewcroughan: the options and config keys are also optional
<clever> if both options and config are missing, your module gets wrapped in config automatically
<clever> so if a module returns { foo = 42; }, the module system will behave as-if you had done { config = { foo = 42; }; }
<matthewcroughan> That's the sort of thing I want to see written
<matthewcroughan> do you think those sorts of implicit things are docced?
<clever> that also tripped me up, because when you do { foo = 42; } it works
<clever> then you see some places refering to config.bar
<clever> so you set { foo = 42; config.bar = 24; }
<clever> and everything blows up :P
<matthewcroughan> strangeee
<clever> 2020-12-21 16:21:52 < clever> if both options and config are missing, your module gets wrapped in config automatically
<clever> once you set config.bar, config isnt missing
<clever> and foo isnt a valid root key, only config/imports/options are valid root keys
fendor_ is now known as fendor
aasg has quit [Quit: Bridge terminating on SIGTERM]
nikivi has quit [Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net]
dstzd has quit [Quit: ZNC - https://znc.in]
aasg has joined #nixos
<{^_^}> Channel nixos-unstable-small advanced to https://github.com/NixOS/nixpkgs/commit/af69f39c996 (from 3 hours ago, history: https://channels.nix.gsc.io/nixos-unstable-small)
dstzd has joined #nixos
aasg has quit [Client Quit]
nrh^ has quit []
nikivi has joined #nixos
nikivi has quit [Client Quit]
nikivi has joined #nixos
bkv has joined #nixos
bqv has quit [Ping timeout: 260 seconds]
bkv is now known as bqv
tsrt^ has joined #nixos
Dotz0cat_ has joined #nixos
cosimone_ has joined #nixos
Dotz0cat has quit [Ping timeout: 260 seconds]
cosimone has quit [Ping timeout: 260 seconds]
cosimone_ is now known as cosimone
nikivi has quit [Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net]
cosimone has quit [Client Quit]
cosimone has joined #nixos
dstzd has quit [Quit: ZNC - https://znc.in]
dstzd has joined #nixos
nikivi has joined #nixos
vidbina has joined #nixos
<{^_^}> Channel nixpkgs-20.09-darwin advanced to https://github.com/NixOS/nixpkgs/commit/659dd335505 (from 3 hours ago, history: https://channels.nix.gsc.io/nixpkgs-20.09-darwin)
aasg has joined #nixos
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
thc202 has quit [Quit: thc202]
<abathur> has anyone needed to adapt a pypi2nix-generated requirements.nix to changes in python packaging in the past few months? I started getting a 'value is a function while a set was expected' after updating channel for the first time in a bit today
xelxebar has quit [Remote host closed the connection]
xelxebar has joined #nixos
ddellacosta has joined #nixos
zupo has joined #nixos
mallox has quit [Quit: WeeChat 3.0]
xelxebar has quit [Remote host closed the connection]
xelxebar has joined #nixos
dstzd has quit [Quit: ZNC - https://znc.in]
nikivi has quit [Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net]
<bgamari_> has anyone else ever found that cmake's pkg_check_modules() logic fails under nix due to missing transitive dependencies?
joesventek has quit [Quit: Quit]
joesventek has joined #nixos
nikivi has joined #nixos
<bgamari_> it seems that pkg_check_modules(X libX) will look for the .pc file of libX, then recurse on all of `libX`'s dependencies
<bgamari_> but these aren't in scope if they are in buildInputs and not propagatedBuildInputs
dstzd has joined #nixos
dstzd has quit [Client Quit]
nikivi has quit [Client Quit]
proofofkeags_ has joined #nixos
joesventek has quit [Client Quit]
<LilleCarl> If i just wanna download an extra file in a package and put it in $out/x/y/z how do it do it (libsForQt5) used to call the package. If i set installPhase the app itself isn't built and i would prefer not to do the generated work manually
<LilleCarl> I have put the file in a variable with file = fetchurl {}
<hexa-> that, then cp ${file} in postInstall
<LilleCarl> cheers
OCCASVS__ has joined #nixos
<hexa-> ah yeah, you usually don't touch the phase itself, but only pre and post, else you'd override stuff
<LilleCarl> Will i know all this if i RTFM?
nikivi has joined #nixos
<LilleCarl> It feels to me like a lot of stuff is "you just know" kinda :p
<LilleCarl> hexa-: It's hilarious how close i was: postInstallPhase = ''
nikivi has quit [Client Quit]
<hexa-> uh, good question :)
LnL- is now known as LnL
xcmw has joined #nixos
nikivi has joined #nixos
dsal has quit [Ping timeout: 244 seconds]
chpatrick has quit [Ping timeout: 244 seconds]
mgsk has quit [Ping timeout: 244 seconds]
nly has quit [Ping timeout: 260 seconds]
dstzd has joined #nixos
sneakweb_ has joined #nixos
lukego has quit [Ping timeout: 258 seconds]
sneakweb has quit [Ping timeout: 258 seconds]
mfernandez has quit [Ping timeout: 258 seconds]
joedevivo has quit [Ping timeout: 258 seconds]
pingveno has quit [Ping timeout: 244 seconds]
parseval has quit [Ping timeout: 244 seconds]
pointfree has quit [Ping timeout: 244 seconds]
ghuntley has quit [Ping timeout: 244 seconds]
taktoa[c] has quit [Ping timeout: 244 seconds]
ris has quit [Remote host closed the connection]
mfernandez has joined #nixos
ris has joined #nixos
taktoa[c] has joined #nixos
chpatrick has joined #nixos
lukego has joined #nixos
parseval has joined #nixos
mgsk has joined #nixos
joedevivo has joined #nixos
pingveno has joined #nixos
dsal has joined #nixos
pointfree has joined #nixos
joesventek has joined #nixos
ghuntley has joined #nixos
<bgamari_> hmm, seems to be something to do with the fact that it uses --libs-only-l
<bgamari_> ahh, but only with --static
<fuzzypixelz> hello again, I want to have a `shell.nix` for my small Haskell scripts, but only for including packages
<fuzzypixelz> can anyone link me an example?
neiluj has joined #nixos
neiluj has quit [Changing host]
neiluj has joined #nixos
<neiluj> hi
<neiluj> I've got some issues with a bluetooth mouse, it freezes a bit when it's not used
<neiluj> it works fine on ubuntu so maybe some drivers are missing?
<HedgeMage> neiluj: 9/10 it's not a driver issue, but something to do with your BT or USB (if you really mean a BT USB dongle) power settings.
mounty has joined #nixos
<HedgeMage> Check through those thoroughly and you may find the problem, i.e. the mouse is being put to a sleep state prematurely.
<neiluj> yeah blutooth usb dongle
<Raito_Bezarius> is it possible to use llvm in stdenv as a replacement for GCC?
<neiluj> thanks for the recommandations HedgeMage, going to look at this
wsh has joined #nixos
<simpson> Raito_Bezarius: Yeah, use `clangStdenv` instead. Note that this doesn't replace GCC's backend with LLVM, but replaces stdenv's C compiler with Clang.
<HedgeMage> neiluj: You're welcome and good luck.
<Raito_Bezarius> simpson: and is it possible to get a cross-compiling shell with clangStdenv ? :>
<notgne2[m]> I think technically all BT adapters are USB
<notgne2[m]> even the internal ones
<simpson> neiluj: You can use `powertop` to look at the power-saving settings for all peripherals in one place. Be careful, as it *is* possible to tell powertop to e.g. turn off your only USB hub.
<neiluj> simpson: oh i'm using powertop! that might be the configuration which is too aggressive
<neiluj> thanks you've probably saved me some time ^^
<simpson> Raito_Bezarius: Probably. e.g. it looks like `pkgsCross.raspberryPi.clangStdenv` is workable. But it might not work as-is for the embedded platforms; YMMV. Good luck.
<Raito_Bezarius> indeed, it looks like crossSystem = systems.examples.riscv32-embedded // { useLLVM = true; } has done the trick !
<Raito_Bezarius> thanks simpson !
<Raito_Bezarius> simpson++
<{^_^}> simpson's karma got increased to 45
Zer000 has joined #nixos
<Zer000> folks I'm having a wild time setting up lets encrypt certs. getting this error and neither me nor my buddies i've asked know what to do: https://dpaste.com/F3KNLUG6T.txt
<Zer000> it seems that letsencrypt cannot read the certificate, but when I navigate to /var/lib/acme there's no files in acme-challenge
cYmen has quit [Quit: No Ping reply in 180 seconds.]
<matthewcroughan> Does anyone know if there's a way to address imports kinda like flakes can be with nix-build?
<matthewcroughan> nid-build -L .#t480 for example
matthewcroughan has quit [Remote host closed the connection]
wsh has quit [Quit: ERC (IRC client for Emacs 27.1)]
matthewcroughan has joined #nixos
<Zer000> I will post my webserver nix configuration: https://dpaste.com/8MPA8RSDS.txt
cYmen has joined #nixos
<Raito_Bezarius> simpson: maybe do you know how to replace the llvm being used by crossSystem? it's using an old llvm 8 and I'd need llvm9 at least for RV32 support
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
andi- has quit [Remote host closed the connection]
<Raito_Bezarius> in fact, it looks like pkgs/stdenv/cross/default.nix contains the logic to select the llvm package
<Raito_Bezarius> but unsure if I have a way to override this without patching nixpkgs
andi- has joined #nixos
philr has joined #nixos
wentasah has joined #nixos
<emilsp> Is there a nice way to build a VM image that'd just boot from a nix configuration? Seemingly, I can't even get nix-build '<nixpkgs>' -A config.system.build.vm to work
nature has quit [Ping timeout: 268 seconds]
<qyliss> emilsp: you mean '<nixpkgs/nixos>'
<emilsp> qyliss: yep, but that doens't work either
<qyliss> what does it say?
<emilsp> error: attribute 'vm' in selection path 'config.system.build.vm' not found
<qyliss> emilsp: try just -A vm
<clever> and it will only work with <nixpkgs/nixos>
<emilsp> qyliss: gah, that works just fine :) thanks. I guess this will build a script that runs qemu, is there a way just to build an image on it's own?
<qyliss> don't know
<qyliss> presumably you could just extract it
<emilsp> that's fair, I'll spelunk on my own :)
ddellacosta has quit [Quit: WeeChat 2.8]
fresheyeball has quit [Ping timeout: 256 seconds]
fresheyeball has joined #nixos
<infinisil> emilsp: Are there "qemu images"?
<infinisil> If you look at the `-A vm` build you'll see that it just runs a qemu command
vidbina has quit [Ping timeout: 272 seconds]
ddellacosta has joined #nixos
davidv7 has joined #nixos
neiluj has quit [Quit: leaving]
aswanson has quit [Quit: aswanson]
Rusty1 has joined #nixos
marsh has quit [Ping timeout: 272 seconds]
marsh has joined #nixos
fendor has quit [Remote host closed the connection]
civodul has quit [Quit: ERC (IRC client for Emacs 27.1)]
<{^_^}> Channel nixos-20.09-small advanced to https://github.com/NixOS/nixpkgs/commit/659dd335505 (from 5 hours ago, history: https://channels.nix.gsc.io/nixos-20.09-small)
dani- has quit [Ping timeout: 244 seconds]
OCCASVS__ has quit [Ping timeout: 258 seconds]
kristjansson has quit [Ping timeout: 258 seconds]
joedevivo has quit [Ping timeout: 268 seconds]
valwal_ has quit [Ping timeout: 260 seconds]
jackdk has quit [Ping timeout: 260 seconds]
mgsk has quit [Ping timeout: 264 seconds]
ynotperez has quit [Ping timeout: 264 seconds]
kozowu has quit [Ping timeout: 260 seconds]
jmeredith has quit [Ping timeout: 268 seconds]
victorbjelkholm has quit [Ping timeout: 272 seconds]
jkkm has quit [Ping timeout: 260 seconds]
englishm has quit [Ping timeout: 264 seconds]
abbe has quit [Ping timeout: 264 seconds]
manveru has quit [Ping timeout: 264 seconds]
ocharles has quit [Ping timeout: 264 seconds]
heatm1s3r has quit [Ping timeout: 240 seconds]
lord| has quit [Ping timeout: 240 seconds]
agander_m has quit [Ping timeout: 246 seconds]
ghuntley has quit [Ping timeout: 268 seconds]
hugolgst has quit [Ping timeout: 268 seconds]
typetetris has quit [Ping timeout: 260 seconds]
rpgwaiter has quit [Ping timeout: 264 seconds]
taktoa[c] has quit [Ping timeout: 260 seconds]
bkv has joined #nixos
sneakweb_ has quit [Ping timeout: 268 seconds]
pointfree has quit [Ping timeout: 264 seconds]
dvim has quit [Ping timeout: 264 seconds]
CustosLimen has quit [Ping timeout: 272 seconds]
lord| has joined #nixos
ddellacosta has quit [Ping timeout: 264 seconds]
<{^_^}> Channel nixpkgs-unstable advanced to https://github.com/NixOS/nixpkgs/commit/2a058487cb7 (from 10 hours ago, history: https://channels.nix.gsc.io/nixpkgs-unstable)
bn_work has joined #nixos
bqv has quit [Ping timeout: 272 seconds]
bkv is now known as bqv
sandy-claws has joined #nixos
kirelagin has quit [Ping timeout: 268 seconds]
fresheyeball has quit [Ping timeout: 258 seconds]
fresheyeball has joined #nixos
hurricanehrndz has quit [Quit: WeeChat 2.8]
proofofkeags_ has quit [Read error: Connection reset by peer]
proofofkeags has joined #nixos
__monty__ has quit [Quit: leaving]