2018-06-04
12:03
<
clever >
$src will always point to a read-only copy of the src
12:03
<
clever >
thats one option
12:02
<
clever >
sorixelle: cat $src | sed > newfile.txt
06:47
<
clever >
Myrl-saki: this looks like a pentium 1
06:40
<
clever >
lustrate will just rename everything in / except /nix itself, to basically wipe the previous OS out
06:36
<
clever >
ramses_: the only thing you need to worry about is if the network comes online at bootup i think
06:33
<
clever >
if everything worked correctly
06:33
<
clever >
ramses_: the lustrate option should rename everything in / so it should just boot up nixos
06:30
<
clever >
it tells you how many errors it had at the end
06:29
<
clever >
fix all of the things
06:28
<
clever >
run it under valgrind on the machine that built it
06:27
<
clever >
run gdb on it
06:26
<
clever >
and even then, the JS has to parse every packet, and extract the payload
06:26
<
clever >
it could only do tcp/udp when under electron
06:25
<
clever >
and network would be difficult, you cant do tcp or udp from JS
06:25
<
clever >
no pci support
06:25
<
clever >
i think not-os has more then that, lol
06:24
<
clever >
only 3 processes running!
06:24
<
clever >
more modern then your router? :P
06:24
<
clever >
2.6 kernel, lol
06:23
<
clever >
14mb of ram!!!
06:23
<
clever >
it claims to be an old pentium
06:23
<
clever >
ignored the entire domain on that
06:22
<
clever >
ok, i cant even type cat into it, vimium opened a new tab
06:21
<
clever >
Myrl-saki: id also be interested in a custom distro for this, lol
06:21
<
clever >
but if i enable adblock, it boots
06:21
<
clever >
it doesnt even boot with my adblock missing
06:17
<
clever >
got a link to JS Linux?
06:09
<
clever >
Myrl-saki: this provides you with 32bit and 64bit windows binaries
06:09
<
clever >
nix-repl> :b (import <nixpkgs> { crossSystem = (import <nixpkgs/lib>).systems.examples.mingwW64; }).hello
06:08
<
clever >
nix-repl> :b (import <nixpkgs> { crossSystem = (import <nixpkgs/lib>).systems.examples.mingw32; }).hello
06:07
<
clever >
clang is just a compiler
06:02
<
clever >
so you can pre-test
06:02
<
clever >
nuke references makes it never find it, even on nixos
06:02
<
clever >
if its only the locales
06:01
<
clever >
Myrl-saki: yeah
06:01
<
clever >
SagnikS_: keep waiting, it should finish on its own
06:00
<
clever >
nuke references just runs sed over it, to make it never find that file
06:00
<
clever >
i think you have to modify glibc to remove it
05:59
<
clever >
Myrl-saki: nix level, after the derivation finishes, nix will abort it
05:58
<
clever >
elvishjerricco: nice
05:58
<
clever >
the 2nd part will cause any dependency to be a compile-time error
05:57
<
clever >
you may also want allowedReferences = [];
05:57
<
clever >
${nukeReferences}/bin/nuke-refs $out/share/daedalus/main/index.js.map
05:57
<
clever >
you want to run nuke references on it
05:57
<
clever >
Myrl-saki: it needs glibc to translate things like "file not found" to the correct language
05:53
<
clever >
now check nix why-depends /nix/store/35l1g66nc4j8r992ygv02inhr8xj5dsy-ssss-0.5 /nix/store/2kcrj1ksd2a14bm5sky182fv2xwfhfap-glibc-2.26-131
05:45
<
clever >
google the error and see what comes up
05:45
<
clever >
but the .h files may remap things based on -D flags
05:45
<
clever >
Myrl-saki: actually, i think -static is link only
05:45
<
clever >
Myrl-saki: probably
05:42
<
clever >
Myrl-saki: _LINK only applies at link time, _COMPILE only applies at compile time
05:41
<
clever >
SagnikS: use the UUID
05:34
<
clever >
so add (gmp.override { withStatic = true; }) to the buildInputs
05:33
<
clever >
it just adds static libs to .out
05:33
<
clever >
but it still doesnt have a .static
05:23
<
clever >
yeah, its part of libtool
05:22
<
clever >
Myrl-saki: something to do with dynamic linking i believe
05:21
<
clever >
SagnikS: and did you nixos-rebuild switch?
05:20
<
clever >
SagnikS: did you add it to configuration.nix?
05:18
<
clever >
so you need to override gmp first
05:18
<
clever >
id say gmp is broken, it lacks static libs
05:17
<
clever >
.out does not contain a .a file
05:17
<
clever >
gmp doesnt have a .static, so gmp.static is pointless
05:17
<
clever >
[ "out" "dev" "info" ]
05:17
<
clever >
nix-repl> gmp.outputs
05:17
<
clever >
also, try building gmp.static first, and look at it
05:16
<
clever >
oh, not _LINK
05:16
<
clever >
nix-build --no-out-link -E 'with (import <nixpkgs> {}); (ssss.override { gmp = null; }).overrideAttrs (super: { buildInputs=[glibc.static gmp.static gmp.static.dev]; NIX_CFLAGS_LINK = "-static"; })'
05:15
<
clever >
which can be done at the nix level
05:15
<
clever >
try NIX_CFLAGS_LINK
05:15
<
clever >
pkgs/stdenv/adapters.nix: makeStaticLibraries = stdenv: stdenv //
05:15
<
clever >
dont change CC, one sec
05:14
<
clever >
gmp.static == gmp.out
05:14
<
clever >
19 passthru.static = self.out;
05:13
<
clever >
Myrl-saki: and zlib/glibc already have .static's so they dont need that
05:12
<
clever >
in this example, glib accepts that
05:12
<
clever >
then you .override something else to use that new stdenv
05:12
<
clever >
Myrl-saki: makeStaticLibraries is a function that takes a stdenv, and modifies it to be status
05:09
<
clever >
colemickens: i believe its a cronjob on nixos.org
02:27
<
clever >
or treated as a string
02:27
<
clever >
it only copies to the store when passed to certain functions
02:27
<
clever >
unquoted just makes it a path type
02:26
<
clever >
what you do with the string matters though
02:26
<
clever >
that just returns the file as a regular string
02:25
<
clever >
the source of the nix expressions is not normally copied
02:24
<
clever >
which will exclude anything in .gitignore and related
02:24
<
clever >
one option is: src = builtins.fetchGit ./.;
02:24
<
clever >
then you need to correct that
02:21
<
clever >
grep them to confirm
02:21
<
clever >
if you do things right, the secrets wont be in the .drv files
02:18
<
clever >
then the build is ran by nix-daemon, and all inputs are now world-readable
02:18
<
clever >
it copies everything to /nix/store when needed
02:18
<
clever >
the nix eval is ran as the user requesting it, and needs read on all files
02:18
<
clever >
correct, they cant read that file
02:16
<
clever >
Myrl-saki: any user can build any .drv in the store
02:16
<
clever >
Myrl-saki: yes
02:13
<
clever >
there is also `nix-store --query --roots` to find all roots
02:10
<
clever >
and dont try --force, it can break the machine
02:10
<
clever >
and to clean up the secrets, `nix-store --delete /nix/store/foo`
02:08
<
clever >
that will do it
02:07
<
clever >
then grep the modified things for the secret
02:06
<
clever >
and change your secret file to trigger a rebuild
02:06
<
clever >
you can also try to `ls -l /nix/store/ > a` then deploy, and `> b` and diff a/b
02:06
<
clever >
i think its keyFile
02:04
<
clever >
there is also a .path variant that just copies the file for you
02:04
<
clever >
those arent derivations
02:04
<
clever >
nixops secrets are special
02:04
<
clever >
the rules are a bit complex
02:04
<
clever >
i'll need a full example to explain what it will do
02:03
<
clever >
just evaluating the expression can copy it to the store
02:03
<
clever >
but if you do mkDerivation { name = "foo"; bar = builtins.readFile ./secret.txt; } then the .drv for foo contains the secret, in the store
02:03
<
clever >
but if you pass a path to readFile, it reads it without copying
02:02
<
clever >
if you pass a path to a derivation, it copies it to the store
02:02
<
clever >
but then whatever you pass that value to, will probably put it into the store in a .drv file
02:02
<
clever >
it just reads them
02:02
<
clever >
readFile wont copy things to the store
02:01
<
clever >
Myrl-saki: are you quoting the relative paths?
01:48
<
clever >
v0id72[m]: this configures everything in vim, i just add imports = [ ./vim.nix ]; to my configuration.nix file
01:09
<
clever >
mpickering: it usually needs more then 1 file, but you could do: nix-build -E 'import (builtins.fetchurl "...")'
01:05
<
clever >
i dont think so
01:05
<
clever >
mpickering: i think you can just give it the URL to a tarball that contains a default.nix
00:57
<
clever >
there is also `nix-instantiate --find-file nixpkgs` for simpler testing
00:55
<
clever >
change NIX_PATH and mess with -I while using nix repl
00:55
<
clever >
and you can just eval <nixpkgs> in `nix repl` to experiment
00:54
<
clever >
so nixpkgs=/path will check for /path/foo.nix
00:54
<
clever >
if you do <nixpkgs/foo.nix> it will search for a dir that contains the foo.nix
00:54
<
clever >
also of note
00:49
<
clever >
if you have nixpkgs=/does/not/exist, then it warns you, and moves to the next element in the search path
00:49
<
clever >
nixpkgs=/path will directly map to that path, while /path without an = maps to /path/nixpkgs
00:49
<
clever >
-I can be used to prepend things to the path
00:48
<
clever >
imalison: <nixpkgs> tells nix to find nixpkgs in $NIX_PATH
2018-06-03
07:08
<
clever >
there is no off switch that i can find
07:08
<
clever >
skype isnt even running...
07:08
<
clever >
also, my windows 10 VM is now getting telemarketer calls over my skype land#
07:06
<
clever >
they wanted the name, not the product
07:06
<
clever >
jD91mZM2: and people still think "skype is good" so they use it
07:06
<
clever >
jD91mZM2: from what ive heard, msn sucked and skype was good, then M$ just bought skype, and turned it into msn, without changing the name
01:27
<
clever >
the new `nix repl` has history, so you can re-run things after closing and opening, but it also has trouble tab-completing things with -'s
01:27
<
clever >
rotaerk: nix-repl links to nix1, which cant auto-detect NIX_REMOTE
01:26
<
clever >
rotaerk: you need to either run `nix repl` now, or `NIX_REMOTE=daemon nix-repl`
2018-06-02
23:12
<
clever >
pie__: check xev
23:01
<
clever >
the output it made while building, and any log files it generated in its /tmp/nix-build dir
23:00
<
clever >
samueldr: id say youll need to inspect the script to see what its doing, and then analyze the logs to see why its not doing that
22:35
<
clever >
samueldr: is the nix sandbox enabled?
22:05
<
clever >
Guest51395: unstable only updates when the testing passes
22:03
<
clever >
Guest51395: you need to first wait until the unstable channel has updated
21:59
<
clever >
sfultong: its possible that you need to run `nix-channel --update` as root
21:58
<
clever >
sfultong: what are you expecting to file, and what does the other 2 things i mentioned contain?
21:58
<
clever >
sfultong: you can also find them in /root/.nix-channels and `nix-channel --list` when ran as root
21:57
<
clever >
sfultong: yeah
21:54
<
clever >
papika: or under /etc/nixos/
21:52
<
clever >
papika: thats a tempfs, its lost on reboot
21:52
<
clever >
ramfs on /run/keys type ramfs (rw,nosuid,nodev,relatime,mode=750)
21:52
<
clever >
papika: what file appears to be getting deleted?
21:51
<
clever >
generate a new hostkey that works in both?
01:49
<
clever >
colemickens: and to configure that AMI at build time to just work from the first boot
01:49
<
clever >
colemickens: my general idea, is to create an AMI image of your machine using just plain nix, then upload it and configure aws to auto-scale the AMI
00:57
<
clever >
codygman_: ssh also works if enabled
00:56
<
clever >
codygman_: try changing the init= to init=/bin/sh in the grub menu
00:56
<
clever >
and it will probably switch again immediately after you ctrl+alt+f1
00:56
<
clever >
codygman_: its constantly switching between the console and gfx modes
00:03
<
clever >
dont think it has an option for that
00:02
<
clever >
if you know the numbers, you can delete them like this
00:02
<
clever >
removing generation 404
00:02
<
clever >
[root@amd-nixos:~]# nix-env -p /nix/var/nix/profiles/system --delete-generations 404
00:01
<
clever >
and if you garbage collect the wrong generation, or dont know how far back to check...
00:01
<
clever >
after a power outage, it no longer booted, because the network isnt up yet when the activation scripts run
00:01
<
clever >
and then he went 2 months without rebooting
00:01
<
clever >
and it worked fine during nixos-rebuild
00:01
<
clever >
i have seen somebody before put some network stuff into an activation script
2018-06-01
23:59
<
clever >
i prefer to do it manually, so i can undo things when i need to
23:57
<
clever >
the --older-than flag
23:57
<
clever >
check the man page for nix-collect-garbage
23:57
<
clever >
lrwxrwxrwx 1 root root 93 May 24 17:08 system-405-link -> /nix/store/6rbfxvn7mmqmb4ilghzgk2n3l8iswp09-nixos-system-amd-nixos-18.09pre135256.6c064e6b1f3
23:57
<
clever >
ls -l /nix/var/nix/profiles/
23:56
<
clever >
so only the stuff from nix-shell and old nix-build's
23:56
<
clever >
by default, it can only delete things not in any generation
23:56
<
clever >
by default, it will only clean up things not in generations
23:55
<
clever >
tenten8401: so you can undo the change even if it stops booting
23:55
<
clever >
tenten8401: nope, and every time you nixos-rebuild, it adds a new option to your bootloader
23:51
<
clever >
tenten8401: there are other options if you want it to run something on login
23:51
<
clever >
tenten8401: the above will build it every time you nixos-rebuild, and put it into $PATH via /run/current-system/sw/bin/
23:45
<
clever >
environment.systemPackages = [ (import /path/to/default.nix) ];
23:45
<
clever >
nix-build for building and testing, nix-env for long-term use
23:44
<
clever >
or youll wind up with 100's of copies of the binary that cant easily be deleted
23:44
<
clever >
so use nix-build and ./result/bin when testing
23:44
<
clever >
and keep in mind, that nix will not let you garbage collect any version installed with nix-env
23:42
<
clever >
if you want it in PATH, nix-env -f default.nix -i i think
23:42
<
clever >
try doing ./result/bin/foo
23:41
<
clever >
how did you try running it?
23:39
<
clever >
but it can still help to have a makefile, so you can run make in nix-shell and do incremental builds while testing and developing
23:37
<
clever >
tenten8401: you can also just use an installPhase and skip adding an install rule to the makefile
23:34
<
clever >
tenten8401: put that into a default.nix file and then run nix-build
23:34
<
clever >
with import <nixpkgs> {}; clangStdenv.mkDerivation { name = "name"; src = ./.; }
23:33
<
clever >
tenten8401: its generally identical to the nix-shell file, and often you can use the same file for both
23:31
<
clever >
tenten8401: nix-build will create a symlink pointing to the output for you
23:31
<
clever >
tenten8401: i would use nix-build if you want to keep it for any length of time
23:28
<
clever >
tenten8401: yep
23:24
<
clever >
tenten8401: replace stdenv.mkDerivation with clangStdenv.mkDerivation, nothing scarry about it
23:23
<
clever >
Myrl-saki: there is also the whatis database and makewhatis
23:21
<
clever >
tenten8401: if you want to use clang, then use clangStdenv.mkDerivation, dont add clang to the buildInputs
23:15
<
clever >
tenten8401: what does it depend on?
23:11
<
clever >
tenten8401: use nix-shell to open a shell with those build tools in it
23:05
<
clever >
tenten8401: you should always use nix-shell when you want to build something
23:05
<
clever >
tenten8401: your not really supposed to install anything like build-essential when using nix
22:55
<
clever >
that will bypass the --list
22:55
<
clever >
adelbertc: check the ~/.nix-channels file for both your user and root
22:54
<
clever >
adelbertc: and in that root shell, `nix-channel --update`
22:54
<
clever >
adelbertc: `sudo -i` then `nix-channel --list`
22:54
<
clever >
adelbertc: apple sets the wrong $HOME when you `sudo nix-channel --list` so its not roots channels
22:53
<
clever >
adelbertc: OSX?
22:53
<
clever >
a random man page begins with this line
22:53
<
clever >
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35.
22:53
<
clever >
Myrl-saki: maybe troff, i never looked into it much
22:53
<
clever >
adelbertc: run nix-channel --list as both your user and root, do they collide?
22:52
<
clever >
Myrl-saki: or just run the man program on the absolute path to it
22:52
<
clever >
Myrl-saki: cat foo.1.gz | gunzip | less
22:52
<
clever >
Myrl-saki: or rather, its a markup language using plaintext, think of it like markdown
22:51
<
clever >
Myrl-saki: usually under /run/current-system/sw/share/man and ~/.nix-profile/share/man
22:51
<
clever >
adelbertc: yeah
22:50
<
clever >
thats what it should look like in a multi-user install
22:50
<
clever >
lrwxrwxrwx 1 clever users 44 Oct 11 2015 channels_root -> /nix/var/nix/profiles/per-user/root/channels
22:50
<
clever >
lrwxrwxrwx 1 clever users 46 Mar 7 2016 channels -> /nix/var/nix/profiles/per-user/clever/channels
22:49
<
clever >
the channels link shouldnt be pointing to roots channels
22:49
<
clever >
adelbertc: and is this a single-user install?
22:49
<
clever >
adelbertc: which is or isnt root?
22:49
<
clever >
adelbertc: which user is that the home for?
21:41
<
clever >
that usually throws an error, lol
21:41
<
clever >
> { foo = { bar = 1; }; foo.baz = 2; }
21:40
<
clever >
cransom: how many people here have mixed up { foo = { bar = 1; }; foo.baz = 2; } and gotten confused?
21:35
<
clever >
matthewbauer: sounds like its just forcing a 32bit x86 build within the wrong attrset
21:30
<
clever >
and it just returns a naked set
21:30
<
clever >
so your imports section could refer to a yaml.nix, which contains: builtins.fromYAML ./config.yaml
21:30
<
clever >
of note, nixos modules dont have to be functions
21:29
<
clever >
libraries already exist to parse and then re-encode yaml
21:29
<
clever >
ixxie: that would also make it much simpler to edit the yaml file from a gui
21:28
<
clever >
and then i would define options and config in a module elsewhere
21:28
<
clever >
so the yaml would be more along the lines of { custom.fatvim = true; custom.xorg = true; }
21:26
<
clever >
ixxie: and a list of strings, boot.kernelParams = [ "boot.allow_shell" ];
21:25
<
clever >
ixxie: but how would you encode the difference between a list of references: environment.systemPackages = with pkgs; [ git hello firefox ];
21:24
<
clever >
ixxie: and builtins.fromJSON
21:23
<
clever >
ixxie: there is a yaml2json binary in the yaml package
20:45
<
clever >
matthewbauer: run nix-diff on those 2 drv files, if you have them locally
20:40
<
clever >
matthewbauer: the only time ive seen something being built once in a truely cross-platform way, was when the derivation was simply to unpack and rename some font files, it was flagged as fixed-output, so the build on 1 platform can be used by all others, and nix enforces it building "properly"
20:31
<
clever >
ThatPako: how are you using pkgconfig?
18:02
<
clever >
truthadjustr: it will create the other one automatically every time you boot
17:57
<
clever >
truthadjustr: try running wpa-gui or wpa_gui
17:56
<
clever >
truthadjustr: you may need to tell wpa_cli to use wlp3s0
17:51
<
clever >
truthadjustr: pkgs.wpa_supplicant_gui
17:51
<
clever >
truthadjustr: are you able to install wpa-gui?
17:49
<
clever >
truthadjustr: what happens if you select a different network?
17:49
<
clever >
truthadjustr: and youve done the select from the > prompt inside wpa_cli?
17:47
<
clever >
truthadjustr: run wpa_cli without args, then run scan and scan_results
17:44
<
clever >
truthadjustr: it can only connect to networks that are in scan_results
17:42
<
clever >
truthadjustr: does scan_results show the network?
17:42
<
clever >
truthadjustr: are you sure the ssid and password are correct?
17:41
<
clever >
truthadjustr: are you able to run wpa-gui?
17:40
<
clever >
truthadjustr: what does status say?
17:39
<
clever >
truthadjustr: what does it print when you run select_network 2?
17:39
<
clever >
truthadjustr: does it print anything to the wpa_cli repl?, what does status say?
17:37
<
clever >
truthadjustr: then you should see some events and what its doing
17:37
<
clever >
truthadjustr: try running wpa_cli without args, and use the repl to run select_network and status
17:34
<
clever >
truthadjustr: what does the journal for wpa_supplicant say?
16:57
<
clever >
what files refer to the name?
16:55
<
clever >
find that file somewhere in the nix store of the sdcard, and copy it to the right path in /boot
16:47
<
clever >
jophish: its trying to network boot when it continues
16:41
<
clever >
acowley: ah
16:41
<
clever >
codygman: does ctrl+alt+f1 do anything?
16:41
<
clever >
acowley: in general, gcc and llvm shouldnt be in the runtime closure, use nix why-depends to track that down
16:40
<
clever >
acowley: the |sort -h should also tell you what the biggest paths are, so yu can try and trim the fat
16:38
<
clever >
and | sort -h makes sure the total is last
16:38
<
clever >
jophish: the -c in du tells it to output a total for you