2017-10-04
15:31
<
clever >
xd1le: you can also enable swap and resize /nix/.rw-store/, if you have the disk space for it
15:31
<
clever >
yeah, that would explain it
15:30
<
clever >
doing a garbage collection and installing something thinner should help
15:30
<
clever >
it sounds like a bug in nixos-install, building things on the wrong store
15:29
<
clever >
oops, yeah, that one
15:29
<
clever >
xd1le: has nixos-install been ran at any point?
15:21
<
clever >
xd1le: have you ran nixos-rebuild?, and what args did you give to nixos-install?
15:21
<
clever >
xd1le: ah, i think the problem is in /nix/.rw-store, but nixos-install should have chroot'd
15:19
<
clever >
xd1le: what about the df -i output?
15:10
<
clever >
xd1le: can you gist the full error and df output?
14:48
<
clever >
zfs also has checksums on everything, so corruption wont get to the userland apps
14:48
<
clever >
zfs journals both the data and metadata, so the files cant get out of sync like that
14:47
<
clever >
and it wont repair them automatically
14:47
<
clever >
even if they boot an old generation, nix will get upset that files in the store are corrupt
14:46
<
clever >
hyper_webirc: i have seen a few new users improperly shutdown nixos after a nixos-rebuild, and it truncated various files in /nix/store/
14:44
<
clever >
yeah, i just always ext4 it
14:44
<
clever >
MoreTea: there is also a copyKernels option, that forces nixos to copy the kernel, within the same dataset
14:43
<
clever >
and if /boot is on the same filesystem as /nix/store, nixos will just use symlinks by default
14:43
<
clever >
grub has trouble traversing really large directories like /nix/store/
14:40
<
clever >
xd1le: it must not be a partition
14:39
<
clever >
xd1le: i would still set boot.loader.grub.device
11:44
<
clever >
hyper_ch: how is typing the above "so much work" ?
11:44
<
clever >
"man configuration.nix\n/hostId\n"
11:43
<
clever >
read the configuration.nix man page
11:42
<
clever >
the docs for the hostid tell you
11:41
<
clever >
hyper_ch: grub has trouble reading zfs, so its best to have a seperate partition for boot
09:08
<
clever >
aw: then you can always recover it via spi as well
09:08
<
clever >
aw: i would want to backup the bios via spi first
08:36
<
clever >
and it runs sshd on bootup
08:36
<
clever >
even remotely
08:36
<
clever >
with this, you can forcibly run nixos from a ramdisk, hijacking any linux system
08:36
<
clever >
aw: if you can get any linux kernel to boot, you could try my kexec trick, but it may not like the uefi then
08:33
<
clever >
i havent investigated how it has changed since then
08:33
<
clever >
then write the size, and raw contents to a /sys entry
08:33
<
clever >
udev would then check the fs, give a positive or negative reply by writing to a /sys entry
08:33
<
clever >
when i had done it, the kernel ran a special hook program, and passed it an env variable saying what file it wanted
08:32
<
clever >
and was able to get an ip, and download the rootfs over wifi
08:31
<
clever >
i put my wifi drivers, and firmware into the initrd, then rewrote udev's firmware loader in bash
08:31
<
clever >
some of the insanity ive done with initrd's in the past
08:26
<
clever >
the default for cpio (only ever used by the kernel) is not supported by the kernel!
08:25
<
clever >
aw: oh yeah, that also tripped me up when building them by hand on gentoo
08:22
<
clever >
fearlessKim[m]: or for tests, initialPassword = "hunter2";
08:22
<
clever >
fearlessKim[m]: i always set users.users.foo.initialHashedpassword
08:22
<
clever >
aw: its a bit odd that your main initrd isnt compressed
08:21
<
clever >
[root@amd-nixos:~]# file -L /run/current-system/initrd
08:21
<
clever >
/run/current-system/initrd: gzip compressed data, max compression, from Unix
08:20
<
clever >
fearlessKim[m]: yeah, that varies between terminals, i try to play it on the same side and add a space or omit it
08:19
<
clever >
aw: what does "file" say about the 2nd initrd?, and the 1st?
08:19
<
clever >
zero initrd's*
08:19
<
clever >
aw: that would imply it got zero rootfs's, and proceded directly to mounting the rootfs without the aid of an initrd
08:17
<
clever >
aw: then try to confirm what files are present after the kernel unpacks everything
08:17
<
clever >
aw: to start with, add boot.allow_shell to the kernel args, and get a shell after it fails
08:17
<
clever >
aw: i have made multiple initrd's work fine with ipxe before
08:08
<
clever >
sphalerite: another machine, has twinkling stars in the background image
08:08
<
clever >
sphalerite: the bios on one of my machines can even save screenshots to usb
07:09
<
clever >
hyper_ch: until you get to the root of a dataset, and add an entry to the ringbuffer
07:08
<
clever >
hyper_ch: my understanding, is that when you write to any file, it also has to modify every directory above it in the tree, because the directories are also immutable
06:48
<
clever >
hyper_ch: and at the root level, there is a ring-buffer, pointing to the immutable root directory
06:48
<
clever >
hyper_ch: yeah, i believe thats how it works
02:07
<
clever >
you need to either use the expression generated by cabal2nix, or use ghcWithPackages
02:02
<
clever >
oops, no ; at the end
02:02
<
clever >
iqubic: (pkgs.haskell.lib.overrideCabal pkgs.haskellPackages.glirc (drv: { doCheck = false; }));
02:02
<
clever >
iqubic: just insert this into systemPackages
01:59
<
clever >
this is one way to just disable the testing
01:59
<
clever >
[clever@amd-nixos:~]$ nix-build -E 'with import <nixpkgs> {}; haskell.lib.overrideCabal haskellPackages.glirc (drv: { doCheck = false; })'
01:58
<
clever >
iqubic: he never pushed the fix to hackage, as far as i can tell
01:58
<
clever >
curl: (22) The requested URL returned error: 404 Not Found
01:53
<
clever >
2.23 is what fails to build
01:53
<
clever >
error: build of ‘/nix/store/gpf59kr5ib59adlpwidl0zlcgsvm7apd-glirc-2.23.drv’ failed
01:53
<
clever >
the commit i linked is tagged as 2.24
01:52
<
clever >
the tests are broken
01:51
<
clever >
test/Main.hs:14:1: error: Failed to load interface for ‘Client.Commands.Arguments’
01:51
<
clever >
Perhaps you meant Client.Commands.Arguments.Spec (from glirc-2.23)
01:51
<
clever >
nix-env -iA nixos.haskellPackages.glirc
01:50
<
clever >
then you need to use ghcWithPackages
01:49
<
clever >
iqubic: do you want to just run binaries within it, or compile code that links against it?
01:48
<
clever >
iqubic: are you using ghcWithPackages?
01:47
<
clever >
iqubic: they work fine together for me
01:39
<
clever >
wasnt sure which one had died
01:33
<
clever >
there is node2nix and npm2nix
01:33
<
clever >
pmade: you must use things like fetchurl to download the files before the build has begun, then copy them into the right spots
01:32
<
clever >
pmade: the network is unavailable during the entire build
2017-10-03
20:51
<
clever >
oh haskellConcealPlus
20:50
<
clever >
chessai: i think you want to add haskellConceal to the list, rather then github:enomsg/vim-haskellConcealPlus
20:43
<
clever >
catern: you will need to duplicate this expression (because its inside the tar creator), and then just rsync the closure of that bash script
20:42
<
clever >
catern: the "compiled" copy of install-nix-from-closure.sh is what does most of the setup, after the tar has been unpacked
20:41
<
clever >
you can just rsync the store over, instead of untar
20:41
<
clever >
thats fairly close to what the curl installer does
20:39
<
clever >
but that copy might be out of date
20:38
<
clever >
catern: it would need to interogate the target, then copy binaries over with scp
20:37
<
clever >
chessai: inspecting in nix-repl, i see a vimPlugins.haskellConceal
20:36
<
clever >
chessai: i think it loads all the plugin names into vim, and then runs a ExportPluginsForNix function
20:34
<
clever >
chessai: yeah, i would have expected that to work at a glance as well
20:27
<
clever >
catern: thats pretty much all nix-copy-closure does, it packs each storepath into a NAR, and streams it over ssh, where a remote nix unpacks it
19:18
<
clever >
cement: then you can put pathogen config into the string near 24, the same as vundle
19:18
<
clever >
cement: and pathogen is a supported plugin, just add it on ;ome 20
19:17
<
clever >
cement: that file goes into the imports list
19:14
<
clever >
which means you want to run this even after a fresh install
19:13
<
clever >
catern: nix-env -i /nix/store/hash-nix/
19:13
<
clever >
catern: then you would want to realize a specific nix from the cache
19:12
<
clever >
catern: and to make it extra idempotent, always update the channel and nix-env after an install
19:12
<
clever >
catern: yeah, you would need to check for the existance of nix-env, then either nix-chanenl --update && nix-env -iA nixpkgs.nix or install
19:11
<
clever >
catern: ansible cant just run a bash script?
19:09
<
clever >
and at that point, why doesnt the admin just finish the install for you?
19:09
<
clever >
such an automatic install would only work if the admin had already given you ownership of /nix
19:08
<
clever >
so you own an empty /nix dir?
19:07
<
clever >
catern: which requires either sudo perms or ownership of /nix/
19:07
<
clever >
catern: the most i can think of, is to detect the failure of nix-store --serve, and then run the install script over ssh automatically
19:04
<
clever >
yeah, thats just an issue with PATH
19:01
<
clever >
catern: but you could just include nix in there as well, and have a script to setup the profiles
19:00
<
clever >
catern: in my case, it lacks nix, and there is no management for that /nix/store/
19:00
<
clever >
catern: this creates a tarball containing the full closure of a bash script (which includes kexec tools, the linux kernel, and an initrd)
18:59
<
clever >
catern: you could make your own tarball, ive done something similar in my kexec tool
18:57
<
clever >
catern: you need a tarball that contains the full /nix/store/ that can just be unpacked to /nix/ and used
18:50
<
clever >
infinisil: when i was new to linux, i spent hours just reading every man page i could find :P
18:37
<
clever >
did you loadkeys first?
18:37
<
clever >
for legacy, you must "mount -t zfs pool/name /foo"
18:36
<
clever >
what do the zfs and zpool man pages say about load-keys?
18:36
<
clever >
hyper_ch: luks or zfs encryption?
18:18
<
clever >
run blkid on the partition
18:17
<
clever >
hyper_ch: you have to run zpool import on the pool name
18:10
<
clever >
M1k3y: click on the hydra job for a give channel
18:07
<
clever >
M1k3y: the latest version of master to pass a range of testing
17:56
<
clever >
that will apply an override to the mlocate put into the module
17:55
<
clever >
Judson: try instead doing locate.location = lib.hiPrio pkgs.mlocate;
17:55
<
clever >
Judson: one sec
17:54
<
clever >
Judson: ah, then the ordering in systemPackages isnt quiet right
17:47
<
clever >
Judson: and the order of the items in systemPackages is the main control
17:47
<
clever >
Judson: for system-path, such a collision is just a warning and you can just ignore it
17:45
<
clever >
Judson: there is no way to override this list
17:42
<
clever >
Judson: how did you enable mlocate?
15:19
<
clever >
Cale: the only way to check the key is to download something from it, and you need to know the hash of something it has to do so
14:49
<
clever >
hyper_ch: also be aware, compression doesnt take effect on the data when enabled, it takes effect at write time
06:52
<
clever >
but out of fear of future forkbombs, you keep autologin off
06:51
<
clever >
i restart so little that its not a bother
06:49
<
clever >
hyper_ch: the above is for a crap-ton of compiled haskell packages
06:49
<
clever >
zfs-test2 97G 14G 83G 15% /zfs-test2
06:49
<
clever >
zfs-test1 106G 23G 84G 21% /zfs-test1
06:48
<
clever >
zfs-test1 compressratio 2.86x -
06:48
<
clever >
zfs-test2 compression gzip-9 local
06:48
<
clever >
zfs-test1 compression lz4 local
06:48
<
clever >
zfs-test2 compressratio 4.49x -
06:39
<
clever >
hyper_ch: using the above, you can then experiment, and make a 10 drive array of 512mb images, and play around to see what it does
06:39
<
clever >
and its all gone
06:39
<
clever >
[root@amd-nixos:~]# rm image-1.img
06:39
<
clever >
[root@amd-nixos:~]# zpool export pool1
06:38
<
clever >
after that, df -h reported it as being bigger
06:38
<
clever >
hyper_ch: and there it is, thats the command to make zfs fully utilize the size of the partition/device its already on
06:38
<
clever >
[root@amd-nixos:/pool1]# zpool online -e pool1 /root/image-1.img
06:37
<
clever >
-e Expand the device to use all available space. If the device is part of a mirror or raidz then all devices must be expanded before the new space will become available to the pool.
06:37
<
clever >
zpool online [-e] pool device...
06:37
<
clever >
hyper_ch: aha, because autoexpand was off
06:37
<
clever >
pool1 autoexpand off default
06:37
<
clever >
NAME PROPERTY VALUE SOURCE
06:37
<
clever >
[root@amd-nixos:/pool1]# zpool get autoexpand
06:36
<
clever >
and it did not auto-resize with defaults
06:36
<
clever >
cp: error writing './jdk-8u131-linux-x64.tar.gz': No space left on device
06:35
<
clever >
it now has an expand size of 512mb
06:35
<
clever >
pool1 496M 126K 496M 512M 0% 0% 1.00x ONLINE -
06:35
<
clever >
NAME SIZE ALLOC FREE EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
06:35
<
clever >
i had to give -d, because the "device node" isnt in /dev/
06:35
<
clever >
re-import the pool (the zfs name for mount)
06:35
<
clever >
[root@amd-nixos:~]# zpool import pool1 -d /root/
06:34
<
clever >
double the size of the disk image
06:34
<
clever >
[root@amd-nixos:~]# truncate image-1.img -s 1g
06:34
<
clever >
(the zfs name for umount)
06:34
<
clever >
[root@amd-nixos:~]# zpool export pool1
06:33
<
clever >
pool1 496M 105K 496M - 0% 0% 1.00x ONLINE -
06:33
<
clever >
NAME SIZE ALLOC FREE EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
06:33
<
clever >
[root@amd-nixos:~]# zpool list
06:33
<
clever >
neither will a lot of other tools
06:33
<
clever >
zfs wont know which one to use
06:33
<
clever >
yeah, dd is the simplest, as long as the old drive is never present when the new is booting
06:32
<
clever >
this creates a pool out of that image
06:32
<
clever >
[root@amd-nixos:~]# zpool create pool1 /root/image-1.img
06:32
<
clever >
this creates a 512mb file
06:32
<
clever >
[root@amd-nixos:~]# truncate image-1.img -s 512m
06:32
<
clever >
hyper_ch: again, you can also test this with the truncate command
06:31
<
clever >
hyper_ch: resize the partition to be bigger, and then mess with the expand setting in zpool (check its man page)
06:29
<
clever >
hyper_ch: yes
05:57
<
clever >
nix-env expects certain things about the value it loads
05:56
<
clever >
and just do qt4 = pkgs.qt4.override { gtkStyle = true; };
05:56
<
clever >
sirkha: at this point, its simpler to just make a packageOverride in ~/.config/nixpkgs/config.nix
05:55
<
clever >
your trying to index the "-E" attribute of the string
05:54
<
clever >
take -A out
05:54
<
clever >
ah, nix-env is probably expecting a set/function
05:53
<
clever >
sirkha: what command did you run
05:53
<
clever >
sirkha: all it does is eval a chunk of nix expression, which must return a derivation
05:47
<
clever >
because its called gtkStyle, not gtkstyle
05:47
<
clever >
10 , gtkStyle ? true, gtk2
05:40
<
clever >
nix-env -i -E 'with import <nixpkgs>{}; qt4.override { gtkstyle = true; }'
05:40
<
clever >
because of how nix works
05:40
<
clever >
and also, installing an overriden qt4 may not make programs use it
05:39
<
clever >
sirkha: that wont call .override
05:22
<
clever >
[clever@amd-nixos:~/apps/cc]$ nix-locate bin/infocmp
05:22
<
clever >
ncurses.dev 63,752 x /nix/store/d329049jlh4z31rr0i9cw0qnad2w4qbs-ncurses-6.0-dev/bin/infocmp
05:20
<
clever >
id ignore it
04:57
<
clever >
yeah, i either use gparted (graphical) or fdisk
04:56
<
clever >
and easyer copy/paste
04:56
<
clever >
fearlessKim[m]: the only benefit to the graphical cd is a graphical web-browser for the docs, and a graphical way to configure the wifi
04:55
<
clever >
fearlessKim[m]: no, it only has the CLI nixos-install
04:49
<
clever >
it might be something you installed into $HOME
04:47
<
clever >
dont know then
04:47
<
clever >
is root also fish, or bash?
04:46
<
clever >
just so you know when your on root
04:46
<
clever >
thats normal for a lot of systems
04:44
<
clever >
what differences have you noticed?
04:40
<
clever >
[root@amd-nixos:~]# nix-env --list-generations -p /nix/var/nix/profiles/system 330 2017-09-27 11:53:06 331 2017-09-29 19:23:08
04:40
<
clever >
iqubic: because #1 ceased being used when #2 was created
04:40
<
clever >
iqubic: if generation 1 has date X, and generation 2 has date Y, nix-collect-garbage will use Y as the date #1 was last-used
2017-10-02
22:36
<
clever >
overlays allow you to specify several sets of package overrides, and nixpkgs will merge all of them together
22:36
<
clever >
and they could be other package sets
22:36
<
clever >
package overrides (and overlays) can just add any attribute you want to pkgs
22:35
<
clever >
nixpkgs.config.packageOverrides = pkgs: { unstable = import <unstable> {}; };
22:31
<
clever >
i havent played with overlays yet
22:28
<
clever >
or let unstable = import <unstable> {};
22:28
<
clever >
(import <unstable> {}).packageName
22:26
<
clever >
as <unstable>
22:25
<
clever >
iqubic: yeah
22:24
<
clever >
iqubic: yeah
22:24
<
clever >
nixos-rebuild will use the channel called nixos
22:24
<
clever >
allow you to refer to a channel as nix-env -iA <name>.hello
22:22
<
clever >
iqubic: "man nix-channel" and "nix-channel --remove"
16:38
<
clever >
lejonet: if they depend on eachother, id open one pr for both
15:55
<
clever >
Eisfreak7: but when you just import it directly, it loads the config from $HOME
15:55
<
clever >
Eisfreak7: when nixos loads nixpkgs for the pkgs argument, it passes in nixpkgs.config
15:53
<
clever >
let unstable = import <unstable> { config = { allowUnfree = true; }; in
15:53
<
clever >
Eisfreak7: you have to pass a config attr to it when importing
15:53
<
clever >
Eisfreak7: that 2nd copy of nixpkgs is loading ~/.nixpkgs/config.nix
15:48
<
clever >
the path appearing in any argument to mkDerivation
15:47
<
clever >
the lib.optional stops that
15:47
<
clever >
it only depends on sssd if the path of sssd gets sent to stdenv.mkDerivation
15:46
<
clever >
lejonet: add sssd to the arguments on line 1
15:29
<
clever >
lejonet: nix doesnt allow either one in the store
15:25
<
clever >
the hard part, is that this sudo isnt setuid root
15:25
<
clever >
nix-build -E 'with import ./. { config = {}; }; sudo.override { ... }'
15:24
<
clever >
and for the override
15:24
<
clever >
in the root of the nixpkgs checkout
15:24
<
clever >
nix-build -A sudo
15:23
<
clever >
then ensure the packageOverride is present in that config.nix
15:22
<
clever >
lejonet: nix-build -A sudo --arg config 'import ./config.nix' is one option
14:44
<
clever >
(assuming you also remove it from buildInputs)
14:44
<
clever >
if optionals doesnt return sssd, then you wont depend on it at build time
14:44
<
clever >
nix-repl> lib.optionals false [ "--with-sssd" "--with-sssd-lib=${sssd}/lib" ]
14:42
<
clever >
some pastebins use '' specialy, i prefer using gist
14:41
<
clever >
[ "--with-sssd" "--with-sssd-lib=/nix/store/5xgwy0aywvkmj7v6qckaldqyij43bzc3-sssd-1.14.2/lib" ]
14:41
<
clever >
nix-repl> lib.optionals true [ "--with-sssd" "--with-sssd-lib=${sssd}/lib" ]
14:40
<
clever >
static const char path[] = _PATH_SSSD_LIB"/libsss_sudo.so";
14:37
<
clever >
lejonet: can you pastebin the current override?
14:37
<
clever >
lejonet: that causes this to get set
14:37
<
clever >
#define _PATH_SSSD_LIB "$sssd_lib"
14:33
<
clever >
lejonet: we will need to refer to the sudo source (or docs if we are lucky)
14:26
<
clever >
just pop it into buildInputs and see what happens
14:26
<
clever >
that also works sometimes
14:26
<
clever >
and the configure script/gcc will persist that path within the elf files, so it will automatically be required at runtime
14:25
<
clever >
then if you pass true to the lib.optional, it will include the sssd path at build time, and download sssd
14:23
<
clever >
lejonet: and if the build doesnt put a copy of that path somewhere under $out, it wont be required at runtime
14:22
<
clever >
lejonet: if lib.optional doesnt return the path, it wont be downloaded at build time
07:51
<
clever >
its getting late as well, i should get to bed