2020-09-16
23:41
<
clever >
zanc: i believe its a set of every channel in ~/.nix-defexpr/
21:15
<
clever >
mvnetbiz_: it may only work on nix-instantiate, ive not looked at `nix eval` in depth yet
21:14
<
clever >
mvnetbiz_: --arg only applies when loading files from disk
20:36
<
clever >
NieDzejkob: it has to eval every single package in nixpkgs, to see if they depend on what you changed
20:36
<
clever >
cransom: not directly, youll need to look at how nixos containers work, and set i think boot.isContainer = true;
20:29
<
clever >
mvnetbiz_: i think it would need to be `{ num }:` and then use `--arg num`
03:29
<
clever >
cole-h: now it also has the iso-image.nix in the imports
03:29
<
clever >
cole-h: import "${inputs.nixpkgs}/nixos" { configuration = { imports = [ "${nixpkgs}/nixos/modules/installer/cd-dvd/iso-image.nix" ./stuff ]; }
03:29
<
clever >
cole-h: now its using flakes
03:28
<
clever >
cole-h: import "${inputs.nixpkgs}/nixos" { configuration = ./stuff.nix }
03:27
<
clever >
cole-h: <nixpkgs/nixos> calls evalModules for you, and passes it the right args
03:25
<
clever >
cole-h: then it will only affect builds that use extra-configuration.nix
03:25
<
clever >
cole-h: you could make a extra-configuration.nix, that has `imports = [ ./configuration.nix /path/to/iso-image.nix ];`
03:24
<
clever >
cole-h: `import <nixpkgs/nixos> { configuration = ./configuration.nix; }` would let you change the path to it
03:24
<
clever >
cole-h: you must import <nixpkgs/nixos> and put iso-image.nix into the imports of your configuration.nix
2020-09-15
05:34
<
clever >
matthuszagh: `sudo -i`
03:00
<
clever >
nerdypepper: thats the nixos module framework
2020-09-14
21:22
<
clever >
energizer: the build environment i believe
20:18
<
clever >
vifon: ive had trouble debugigng things too, because the steam DRM stops you from running the game outside of steam
20:16
<
clever >
vifon: if you want to run it without the gui, youll either need steam-run or patchelf
20:16
<
clever >
thats normal
20:13
<
clever >
does it show errors in the terminal when you try to run it from steam?
20:12
<
clever >
then i get the whole steam gui and things just work
20:12
<
clever >
vifon: just `steam` and nothing more
20:11
<
clever >
it uses a chroot env to avoid the need to patchelf
20:11
<
clever >
vifon: i have been running steam on nixos without too many issues
20:10
<
clever >
vifon: you have to patchelf it, like any other binary you get from outside of nixos
20:04
<
clever >
Ankhers: the compilers in nix arent meant to really work like that, you need to load into a nix-shell for the target you want to build for
20:04
<
clever >
NieDzejkob: nix-shell -p 'python.withPackages (ps: [ ps.z3 ])'
20:02
<
clever >
Ankhers: pkgsi686Linux.stdenv would give you a 32bit env
20:01
<
clever >
Ankhers: did you tell nix to give a cross compiler?
19:59
<
clever >
Ankhers: how are you doing the cross-compile? to which arch?
19:26
<
clever >
vifon: its possibly that you didnt have any /boot mounted at all, that is a common problem
19:25
<
clever >
vifon: 'fileSystems."/" = …' and 'fileSystems = { "/" = … }' are identical
19:20
<
clever >
astro: yeah, that sounds about right
19:09
<
clever >
vifon: i always use grub, even on efi
19:08
<
clever >
it may require them to be on the fat32
19:08
<
clever >
does systemd-boot even have ext4 support?
19:07
<
clever >
vifon: then your EFI partition must be at /boot/
19:06
<
clever >
vifon: depends on other config, what did you set your efi mount point to in configuration.nix?
19:03
<
clever >
vifon: is /boot mounted correctly?
19:03
<
clever >
{ a = 1; b = 2; }
19:03
<
clever >
trace: ["a","b"]
19:03
<
clever >
nix-repl> let input = { a=1; b=2; }; in builtins.trace (builtins.toJSON (builtins.attrNames input)) input>
18:59
<
clever >
try dumping builtins.attrNames on an input
18:59
<
clever >
if you try to treat it as a string, you wind up with the source instead
18:58
<
clever >
> let set = { outPath = "foo"; }; in "${set}"
18:58
<
clever >
astro: i believe they are a set, with an outPath
17:27
<
clever >
fetchGit doesnt keep the .git by default
17:27
<
clever >
GolDDranks: which fetcher are you using?
06:34
<
clever >
eyJhb: ah, then you do need that
06:33
<
clever >
eyJhb: if system is set right, you wont need -j0, because nothing can run on the x86 host
06:32
<
clever >
pjt_tmp: you must also import nixpkgs with system set, or it will just do a native build for the host
06:32
<
clever >
pjt_tmp: which is needed any time your mixing x86 and arm
06:32
<
clever >
pjt_tmp: i prefer using /etc/nix/builders, that lets you clearly specify what arch the remote cpu is
06:03
<
clever >
joehh1: you must use { config, pkgs, lib, ... }: to get a lib that doesnt depend on the results
06:03
<
clever >
joehh1: thats because pkgs depends on the result of that
05:49
<
clever >
then it will work a lot nicer
05:49
<
clever >
so you just do `imports = [ /path/to/module ];` and then `something.enable = true;`
05:49
<
clever >
you probably want a custom nixos module
05:48
<
clever >
just put it one let block higher
05:48
<
clever >
or, its already in the same file
05:47
<
clever >
just fetch it with import and dont involve the overlay
05:47
<
clever >
it would be a lot simpler if buildScheduledTask wasnt inside pkgs
05:47
<
clever >
the nixos module framework as a whole
05:47
<
clever >
but, the keys of { ... } must still be known ahead of time
05:46
<
clever >
that will inteligently merge the 2 for you
05:46
<
clever >
for example, mkMerge [ { environment.systemPackages = [ xx ]; nixpkgs.overlays = [ myOverlay ]; } { ... } ]
05:46
<
clever >
you must use mkMerge
05:45
<
clever >
joehh1: and yz depends on pkgs, which depends on .nixpkgs
05:45
<
clever >
joehh1: nix cant figure out what keys you return (.environment .nixpkgs and ????) until it knows what yz.service is
05:44
<
clever >
joehh1: yeah, // in modules is very bad
05:44
<
clever >
joehh1:
*looks*
04:46
<
clever >
shouldnt be
03:11
<
clever >
i looked for the exact file you wanted, so fftw wasnt in my results
03:09
<
clever >
fftw and fftwFloat have different libraries available
03:09
<
clever >
libfftw3f_omp.la libfftw3f_omp.so.3 libfftw3f.so libfftw3f.so.3.5.8 libfftw3f_threads.so libfftw3f_threads.so.3.5.8
03:09
<
clever >
[root@system76:~]# ls result/lib//
03:09
<
clever >
[root@system76:~]# nix-build '<nixpkgs>' -A fftwFloat
03:09
<
clever >
fftwFloat.out 0 s /nix/store/ya5akklsw0in27x51lf8s2425pwv1g99-fftw-single-3.3.6-pl1/lib/libfftw3f.so
03:09
<
clever >
the f variant is in fftwFloat
03:09
<
clever >
[clever@amd-nixos:~]$ nix-locate libfftw3f
03:08
<
clever >
its not in that derivation
03:08
<
clever >
oh, the f variant
03:08
<
clever >
which does have a libfftw3.so
03:08
<
clever >
[nix-shell:~]# echo $NIX_LDFLAGS
03:08
<
clever >
-L/nix/store/lxnwq0gqmbx94y7vq3cfjcm8fc1vj4l6-fftw-double-3.3.8/lib -L/nix/store/lxnwq0gqmbx94y7vq3cfjcm8fc1vj4l6-fftw-double-3.3.8/lib
03:07
<
clever >
Graypup_: that only has the compile flags, not the link flags
03:07
<
clever >
Graypup_: you dont want fftw in nativeBuildInputs
03:05
<
clever >
ornxka: can you pastebin your nix expression?
03:04
<
clever >
Graypup_: NIX_CFLAGS_COMPILE, which gcc (a bash script) will inject into the CLI as it runs gcc (the elf binary)
03:04
<
clever >
ornxka: buildInputs = [ fftwFloat ]; and it should just work
03:03
<
clever >
Graypup_: nix adds the /lib folder of every buildInput to -L automatically, so you dont even have to mess with pkgconfig for basic stuff
03:03
<
clever >
ornxka: it sounds like you need to add a library to the buildInputs
01:35
<
clever >
iwq: nix-locate can also be used to figure out the library -> package names
01:22
<
clever >
> autoPatchelfHook
2020-09-13
23:47
<
clever >
immae: `{ inherit foo; }`
23:47
<
clever >
immae: correct, you just have to `inherit foo;` somewhere
23:46
<
clever >
immae: args wont contain the default args
15:25
<
clever >
Henson: you want imports not plain import, then you can use { config, ... }: and just define your own config options
01:39
<
clever >
got a flashlight? check the headphone port for damage?
01:36
<
clever >
try an older one?
01:34
<
clever >
you can read the grub.conf in /boot/
01:29
<
clever >
colemickens: you must disable the display with a nixos option
01:28
<
clever >
and check alsamixer again, on the older versions?
01:27
<
clever >
did you reboot after doing rollbacks?
01:27
<
clever >
not sure then
01:26
<
clever >
try the speaker channel too
01:25
<
clever >
master, headphone, headphone, headphone .... headset mic, headset mic, internal mic ...
01:25
<
clever >
andrewrk: there are 3 more headphone on the left
01:24
<
clever >
andrewrk: you have 2 headphone bars at 2, try cranking them up?
01:22
<
clever >
and then the alsamixer?
01:21
<
clever >
andrewrk: what does the output devices tab in pavucontrol show?
01:16
<
clever >
2020-09-12 22:13:26 < clever> andrewrk: run alsamixer, switch to the alsa device (not pulse), and check if its muted?
01:16
<
clever >
thats because you are on the pulse device still
01:15
<
clever >
try un-mute and turning up various things
01:14
<
clever >
headphone may have its own meter, seperate from master
01:13
<
clever >
it can also happen when drivers upgrade
01:13
<
clever >
the alsa behind pulse sometimes goes on mute
01:13
<
clever >
andrewrk: run alsamixer, switch to the alsa device (not pulse), and check if its muted?
00:29
<
clever >
but if you want to set config, you do need to make it
00:29
<
clever >
colemickens: it has defaults for when the config is missing
2020-09-12
22:37
<
clever >
hexa-: ./secrets + "/${config.networking.hostName}/foo"
02:40
<
clever >
55ms is still pretty quick
02:39
<
clever >
30ms v4, 55ms v6
02:39
<
clever >
est31: ~25ms slower, since i have to bounce off an american tunnel
02:36
<
clever >
ipv6 randomly breaks for me
02:29
<
clever >
that should be fine
02:28
<
clever >
est31: how did you put the nixos image onto the usb?
02:27
<
clever >
siraben: then you need to check the journal with something like `journalctl -f -u pulseaudio --user` maybe
02:26
<
clever >
est31: you must first boot via efi, to be able to configure an efi bootloader properly
02:24
<
clever >
thats likely unrelated, how exactly is it broken, is it just on mute?
02:24
<
clever >
siraben: you should see grub instead of systemd-boot when its booting
02:20
<
clever >
siraben: you also want nixos-rebuild --install-bootloader switch
02:19
<
clever >
siraben: boot.loader.grub.device = "nodev";
02:18
<
clever >
siraben: and turn systemd off, the same way
02:18
<
clever >
siraben: boot.loader.grub.enable = true;
02:17
<
clever >
siraben: systemd-boot has lost its mind, ive seen it before a few weeks ago, only solution i know is to switch to grub (it still supports efi)
01:03
<
clever >
moet: nix already censors out the hostname within the sandbox
00:20
<
clever >
vifon: you want something lore like `nix-env -f . -iA foo`, which says to load default.nix, then install .foo
00:20
<
clever >
vifon: -i without a path, will treat the string as regex, and search nixpkgs
00:19
<
clever >
vifon: nix-env -i ./result or add it as an overlay and put it into systemPackages
00:14
<
clever >
vifon: you can just run it from the result link if you want testing, result/bin/cantana
00:12
<
clever >
vifon: or ~/.nix-defexpr/channels_root/nixos/
00:12
<
clever >
vifon: nix-instantiate --find-file nixpkgs
00:11
<
clever >
find out where the default.nix was being loaded
00:11
<
clever >
[nix-shell:~/apps/rpi/lk]$ grep -r --color cantata ~/apps/nixpkgs-hasura/pkgs/
00:09
<
clever >
vifon: yeah, you want libsForQt5.callPackage rather then bare callPackage
00:09
<
clever >
/home/clever/apps/nixpkgs-hasura/pkgs/top-level/all-packages.nix: cantata = libsForQt5.callPackage ../applications/audio/cantata {
00:08
<
clever >
sid`: the problem will likely just move to another dep
00:08
<
clever >
vifon: you have to use the right callPackage when loading it, look at where that file was being referenced in nixpkgs
00:07
<
clever >
vifon: is it a haskell package?
2020-09-11
23:39
<
clever >
sid`: ~/foo works in nix directly
18:54
<
clever >
buffet: you want extraModulePackages = [ config.boot.kernelPackages.v4l2loopback ];
15:01
<
clever >
simonpe^^: whats it going to do with the mirror if it doesnt have network?
14:36
<
clever >
simonpe^^: defining out= yourself isnt valid
14:17
<
clever >
you can add that attr to any fixed-output derivation, and then those vars can leak in
14:16
<
clever >
> hello.src.impureEnvVars
14:15
<
clever >
simonpe^^: is it a fixed-output derivation?
05:14
<
clever >
{} is an empty set of overrides
05:14
<
clever >
redmp: callPackage takes the path to a package, and a set of overrides for the args on line 1 of the package
2020-09-09
15:25
<
clever >
galagora: that looks like an overflow error somewhere
15:24
<
clever >
> (17592186044416).toString(16)
15:24
<
clever >
'100000000000'
15:21
<
clever >
the benefits will vary, depending on how much duplication you have
15:17
<
clever >
siraben: but --optimize lets you hardlink the duplicate .h files together, so your not paying for holding 2 copies
15:17
<
clever >
siraben: multiple-outputs lets you GC the .h files while keeping the .so for example
2020-09-08
23:55
<
clever >
its already enabled
23:55
<
clever >
then you dont have to go into the bios
23:54
<
clever >
zeta_0: does /dev/kvm exist?
23:53
<
clever >
zeta_0: i find qemu is better for automation and complex tasks, while virtualbox is better if you just want to run windows or ubuntu without any fuss
23:51
<
clever >
zeta_0: i dont know how libvirtd will interact with everything
23:51
<
clever >
zeta_0: qemu-kvm will force use of kvm, so it will fail if kvm isnt available
23:48
<
clever >
it should just work
23:48
<
clever >
zeta_0: nope
23:45
<
clever >
,locate kvm-ok
18:03
<
clever >
mjrosenb: you generally dont want nix installed on each user, only on root, and inherit it from root
18:01
<
clever >
mjrosenb: it does exist in newer versions of nix, you may need ot update the nix-daemon
14:21
<
clever >
evanjs: if it looks like vim, it adds args to jump to the right offset in the file
14:21
<
clever >
evanjs: one minor issue there, is that `nix edit` changes the args to the editor dynamically
14:21
<
clever >
[clever@amd-nixos:~]$ EDITOR=echo nix edit -f '<nixpkgs>' hello
14:21
<
clever >
/nix/store/6q0j9q6pkl6fxll32dr988jnbnvb6ji2-nixos-20.09pre237606.b50ef9afa11/nixos/pkgs/applications/misc/hello/default.nix
14:20
<
clever >
evanjs: oh, also, nix edit just runs $EDITOR, so you could set EDITOR to a shell script, maybe even echo?
14:18
<
clever >
evanjs: and even `nix edit -f '<nixpkgs>' hello`
14:18
<
clever >
evanjs: there is also builtins.unsafeGetAttrsPos
14:16
<
clever >
evanjs: have you seen this?
14:16
<
clever >
> pkgs.hello.meta.position
14:16
<
clever >
> pkgs.hello.meta.loc
14:16
<
clever >
> pkgs.hello.meta.location
2020-09-07
15:33
<
clever >
GolDDranks: you want to clone nixpkgs, and then copy the file
15:33
<
clever >
GolDDranks: copy/paste will destroy the tabs
15:25
<
clever >
GolDDranks: if you run diff on the diffs, what is the diff between the diffs?
15:11
<
clever >
GolDDranks: yep
15:10
<
clever >
GolDDranks: make 2 copies of the src, edit one, and then `diff -ru old new` to get a patch
15:09
<
clever >
GolDDranks: i just use `diff -ru` to generate patch files, its much simpler
14:20
<
clever >
GolDDranks: the source thats being patched may differ enough to make it work
14:19
<
clever >
GolDDranks: nix didnt build it, it failed
14:19
<
clever >
GolDDranks: 2020-09-07 11:14:05 < GolDDranks> But somehow this package still builds when nix does it
14:18
<
clever >
jluttine[m]: not sure, i dont use python much
14:18
<
clever >
siraben: yeah, it should also have examples in the repo
14:18
<
clever >
GolDDranks: and the full output of the build?
14:17
<
clever >
jluttine[m]: if you run nix-shell on that drv, it will give you an env suitable for building the package, not using it, so the src will be sitting in $src un-compiled/optimized
14:15
<
clever >
jluttine[m]: that will depend a lot on what is within the shell.nix
14:14
<
clever >
GolDDranks: can you pastebin the nix file?
14:14
<
clever >
GolDDranks: what does the error say?
14:14
<
clever >
jluttine[m]: if your not using $src, then src = ./.; means nothing
14:14
<
clever >
jluttine[m]: `src = ./.;` will set $src, but nix-shell then leaves the working directory as-is
14:13
<
clever >
GolDDranks: and then i just shove the path to the patch in the patches list in nix
14:13
<
clever >
GolDDranks: i tend to use either `git diff` or `diff -r -u` to generate a patch
14:08
<
clever >
jluttine[m]: relative paths in a nix file are always relative to where the file itself lives
14:02
<
clever >
yeah, naersk is the fully declarative way
14:01
<
clever >
probably, irc logs dont show any other gains
14:00
<
clever >
when did i gain 2 more points without noticing? heh
14:00
<
clever >
weird, it was only 500 lastnight
13:58
<
clever >
pkgsCross.armv7l-hf-multiplatform.pkgsStatic.stdenv.mkDerivation
13:58
<
clever >
exactly as i just showed
13:58
<
clever >
siraben: if you mix pkgsCross and pkgsStatic, it may staticly link automatically
13:58
<
clever >
> pkgsCross.armv7l-hf-multiplatform.pkgsStatic.hello
13:55
<
clever >
siraben: or use static linking
13:55
<
clever >
siraben: then you need to install nix, or get ugly and just copy that .so file to the right path
13:54
<
clever >
siraben: the kernel will always run the interpreter instead
13:54
<
clever >
siraben: the interpreter on a dynamic ELF is basically like the #! on a shell script
13:54
<
clever >
siraben: it was in the output of `file` you pasted earlier
13:53
<
clever >
siraben: nix-copy-closure --to user@target /nix/store/0bv4ygzd45bwbhc0wni6z4asqz84apmr-glibc-2.31-armv7l-unknown-linux-gnueabihf
13:53
<
clever >
siraben: because /nix/store/0bv4ygzd45bwbhc0wni6z4asqz84apmr-glibc-2.31-armv7l-unknown-linux-gnueabihf/lib/ld-linux-armhf.so.3 is missing
13:49
<
clever >
musl might work to make it static
13:49
<
clever >
youll need readelf then, dump the DT_NEEDED and the RPATH
13:49
<
clever >
ah, ldd wont work on arm binaries
13:47
<
clever >
static linking would be the simplest, but result in a larger binary
13:47
<
clever >
getting it to properly build with naersk would make that simpler
13:46
<
clever >
run ldd on the binary to figure out which deps it has, and then `nix-copy-closure --to user@host /nix/store/dep` each dep
13:44
<
clever >
so you need to nix-copy-closure the dependencies over too
13:44
<
clever >
also, it relies on things being in /nix/store to function
13:43
<
clever >
result is from nix-build
13:43
<
clever >
if its in a result dir, it ignores rustup entirely
13:42
<
clever >
note that nix-build under nix-shell doesnt do the build any differently
13:42
<
clever >
sounds like you did a native build, not a cross-build
13:41
<
clever >
> pkgs.file
13:40
<
clever >
run `file` on the binary, what does it report?
13:38
<
clever >
just swap out the name in the pkgsCross area, and get the new $CC and $LD
13:38
<
clever >
aarch64-multiplatform is 64bit arm
13:38
<
clever >
raspberryPi is armv6
13:38
<
clever >
armv7l-hf-multiplatform is armv7
13:37
<
clever >
siraben: ah, then you dont want the embeded one
13:37
<
clever >
siraben: are you trying to compile a program that runs under linux or is its own kernel?
13:35
<
clever >
siraben: then that is the compiler and linker you want
13:34
<
clever >
siraben: if you `echo $LD and $CC` in that shell, what does it say?
13:31
<
clever >
to change what hello is
13:31
<
clever >
but you can callPackage ./foo.nix { hello = pkgs.goodbye; }
13:31
<
clever >
so when you run callPackage on { stdenv, hello }: it passes you pkgs.stdenv and pkgs.hello
13:31
<
clever >
yeah, for anything you dont specify, it gets a default from pkgs
13:30
<
clever >
and it then returns whatever was in the file you gave it
13:30
<
clever >
callPackage takes 2 arguments, the path to a package, and some overrides for the package args
13:29
<
clever >
you also dont need an override, nix-build -E 'with import <nixpkgs> {}; callPackage ./dropbear_from_scratch.nix {}'
13:29
<
clever >
GolDDranks: you forgot the {} at the end
13:25
<
clever >
GolDDranks: you want pkgs.callPackage ./dropbear_from_scratch.nix {}
13:24
<
clever >
not sure, maybe give github.com/nmattia/naersk a try?
13:22
<
clever >
ive done similar in the past with `rustup target add x86_64-pc-windows-msvc`
13:21
<
clever >
you have to tell cargo to fetch the std crate for arm first
13:20
<
clever >
but you can then run whatever you want, and ignore the makefile
13:20
<
clever >
nix-shell just drops you into an env suitable for building the thing
13:20
<
clever >
mkDerivation can be used with both shell and build
13:20
<
clever >
2020-09-07 10:14:47 < siraben> Then I do, nix-shell shell.nix --run "cargo build --target=armv7-unknown-linux-gnueabihf"
13:20
<
clever >
you want nix-shell, not nix-build
13:19
<
clever >
what command did you run to get the error?
13:19
<
clever >
its pointless with nix-shell
13:19
<
clever >
src = ./.; only matters if your using nix-build
13:17
<
clever >
> pkgs.pkgsCross.arm-embedded.stdenv.mkDerivation { name = "foo"; }
13:17
<
clever >
siraben: its part of pkgsCross
13:16
<
clever >
mkShell just calls mkDerivation for you
13:16
<
clever >
why cant it?
13:16
<
clever >
the internal name for arm without a kernel
13:16
<
clever >
and skip mkShell, just use mkDerivation
13:15
<
clever >
pkgsCross.arm-embedded.stdenv.mkDerivation will give you a cross gcc
13:15
<
clever >
siraben: that will give a gcc that targets linux, instead of arm-none
13:13
<
clever >
siraben: there is also github.com/nmattia/naersk which is supposed to fully automate cross-compiling rust
13:13
<
clever >
siraben: that one wont be a cross build
13:12
<
clever >
yeah, nix will setup all of the tools in all-caps vars, $CC, $CXX, $OBJCOPY, $LD and more
13:11
<
clever >
that would give you the cross gcc for arm-none
13:11
<
clever >
siraben: you would run nix-shell against a derivation like: pkgsCross.arm-embedded.stdenv.mkDerivation { name = "foo"; }
13:10
<
clever >
siraben: are you in a nix-shell that includes that linker?
00:16
<
clever >
damjan: the nativeBuildInputs for the build that needs the tool
00:08
<
clever >
damjan: add a thing to nativeBuildInputs
2020-09-06
21:12
<
clever >
and define it within options, options.custom.isVM = lib.mkOption { type = lib.types.bool; default = false; };
21:11
<
clever >
tobiasBora: you want to use config.custom.isVM
21:09
<
clever >
tobiasBora: imports cant depend on config, you must use config = lib.mkIf (expr) { ... }; inside the thing in imports
01:30
<
clever >
the big 500! lol
01:25
<
clever >
numkem: boot.loader.grub.device = "nodev";
01:19
<
clever >
that should still be true