<clever>
nefix: a few months ago, somebody in here was making a usb stick, with every distro on it, and had trouble getting the nixos iso to work there
<clever>
of note, if the main gui exits for any reason, X will shutdown, then slim restarts, auto-logs again, and it re-runs the sessionCommands
<clever>
yep
<clever>
nefix: combined with the autoLogin flag for slim, it will then run sessionCommands on bootup of X
<clever>
instead, only running plexmediaplayer
<clever>
nefix: because i put an exec on line 22 of media-center.nix, that script dies mid way thru, and never launches one
<clever>
nefix: the session commands are inserted into a bash script that is responsible for starting the chosen desktop env (kde, gnome, xfce)
<clever>
nefix: i initially managed the router with normal nixos-rebuild, but later migrated it to nixops
<clever>
my dhcp server is also nixops managed, so i have to do a nixops deploy to change the cfg
<clever>
nefix: get the dhcp wrong, and the whole network dies
<clever>
nefix: yeah, i can see how i would now, but it opens up the option of swapping it for a DB, and its safer to edit a php script then dhcp config
<clever>
nefix: in my case, it was just a dumb switch-case on the mac, to give a different fixed boot option
<clever>
nefix: ah, i was going a different route, with server-side scripting to change what the script was entirely
<clever>
it has a password login (though the pw is in plaintext in the script) which locks shell access
<clever>
nefix: what if the menu just leaves the extra kernel params in a certain variable, and then the different selection of premade netboot.ipxe's all append that to the kernel params?
<clever>
nefix: though if you want anything more, you may want to just make a custom netboot.ipxe, copying the code from nixpkgs
<clever>
nefix: each arch should have its own netboot.ipxe, at a different URL
<clever>
nefix: you can tell ipxe to chainload the netboot.ipxe script
<clever>
nefix: the netbootIpxeScript on line 18 deals with that for you
<clever>
nefix: i think it is
<clever>
Baughn: let me find that screenshot...
<clever>
Baughn: the inodes get cross-wired, and a directory contains another directories files
<clever>
Baughn: oh, the 9plan stuff in qemu for mounting the host fs to the guest, sometimes messed up with zfs
<clever>
nefix: line 11 pulls in the netboot profile, line 12 is optional, line 13 refers to the module on 20, and 20-27 is just the contents of a configuration.nix file
<clever>
Baughn: is the fs mounted with noexec?
<clever>
nefix: then your interested in just lines 7-27
<clever>
i originally designed this for use on a laptop, where wan is my wifi, and lan is the ethernet
<clever>
it is acceptable for wan to be facing another router
<clever>
nefix: wan is the side of the machine facing the internet, lan is the side facing the machines you want to netboot
<clever>
nefix: if you have a machine with 2 network cards, you can just add /path/to/nixos-configs/netboot_server.nix to your imports field, and then set netboot_server.network = { wan = "eth0"; lan = "eth1"; };
<clever>
and it hosts the netboot files on nginx
<clever>
it sets up dhcpd for netbooting, it sets up bind for dns relaying, it sets up NAT so your netboot-slaves have internet, yet are still isolated from the LAN you dont control fully, and it creates the netboot image, with justdoit configured
<clever>
nefix: this is a nixos module, that does everything you want and more
<clever>
then its either something else, or a un-discovered firmware bug!
<clever>
tilpner: in my case the firmware version matches the pdf
<clever>
Firmware Version: 608ABBF0
<clever>
Device Model: KINGSTON SV300S37A240G
<clever>
[root@amd-nixos:~]$ smartctl -a /dev/sdb | less
<clever>
tilpner: since ditching those 2 SSD's (the util to update firmware just fails), ive switched to just a single nvme disk, and its been stable
<clever>
yeah
<clever>
and it continued to randomly fail :P
<clever>
and i just assumed it was random, and kept retrying till it fully synced
<clever>
tilpner: when i was replacing the spinning rust with the sdd, the zfs sync failed a few times due to IO write errors
<clever>
tilpner: there was also warning signs early on, that i ignored
<clever>
tilpner: turns out linux and btrfs/zfs dont take a hung SSD very well, and the zfs mirror doesnt help at all to gracefully fall back to the other disk
<clever>
tilpner: going back to #zfs on and off for several years, and eventually somebody asked the firmware rev and linked that pdf to me
<clever>
a firmware bug in my SSD (it was last a zfs mirror, between identical drives, with identical bugs) that causes the SSD to just randomly hang
<clever>
ToxicFrog: yeah, it may need a double-efi then
<clever>
ToxicFrog: in the case of my laptop (which has a vfat /boot/) the path is in the efi var
<clever>
Boot0004* UEFI OS HD(1,GPT,27c99b08-455d-4dfe-a44f-6150cbc09ef8,0x800,0x100000)/File(\EFI\BOOT\BOOTX64.EFI)..BO
<clever>
ToxicFrog: if you are setting the efivars, then the fallback shouldnt come into play
<clever>
i think when you do it on nixos, its still /boot/EFI/ without another EFI inside it
<clever>
only the /boot/EFI subdir has to exist on a fat32 fs
<clever>
of note, /boot/ doesnt need to be fat32
<clever>
ah
<clever>
zfs checksums every block...
<clever>
because grub's FS write support is rather dumb, and it just writes to the data blocks of a file, without any support to allocate new blocks to the file
<clever>
ToxicFrog: my grubenv file, is exactly 1024 bytes, nearly all #######'s
<clever>
ToxicFrog: oh, but grubenv likely wont like being on zfs
<clever>
there is probably a save_env as well, the grub manual will help there
<clever>
and from my grub.cfg, it will search for a grubenv file, and then load it on startup
<clever>
5 load_env
<clever>
4 if [ -s $prefix/grubenv ]; then
<clever>
then you just need a systemd unit, to un-change the default, every time you boot, to say "it worked"
<clever>
and because grub changed the default before booting nixos, it now runs something else
<clever>
so, now failure to mount anything, reboots the machine
<clever>
panic=10, will then tell linux to reboot 10 seconds after a panic
<clever>
ToxicFrog: it will ask the user what to do on the console
<clever>
Mic92: systemd-analyze plot
<clever>
mounting /home from the initrd seems simplest
<clever>
that flag forces nixos to mount them from the initrd, before activate is ran
<clever>
ToxicFrog: sounds like you just need to add the $HOME related FS's to fileSystems. and also set neededForBoot = true;
<clever>
Mic92: problem is, i think update-users-groups, runs before systemd has started
<clever>
Mic92: i dont remember setting up anything in nixos for /home/gits/
<clever>
home-gits.mount loaded active mounted /home/gits
<clever>
[root@nas:~]# systemctl | grep mount
<clever>
naspool/gits /home/gits
<clever>
[root@nas:~]# zfs list -t filesystem -o name,mountpoint
<clever>
i think its runtime
<clever>
s
<clever>
Mic92: i think i saw some recent changes to zfs/nixos, that auto-generate mount units for zfs dataset
<clever>
i use ext4 for /, luks for the rootfs, which is zfs
<clever>
ah
<clever>
obadz: i think your simplest solution is to add a non-encrypted /boot/ partition, mount it to /mnt/boot/, add it to the configuration.nix, and then `nixos-rebuild boot` again
<clever>
obadz: i think your simplest solution is to add a non-encrypted /boot/ partition, mount it to /mnt/boot/, add it to the configuration.nix, and then `nixos-rebuild boot` again
<clever>
obadz: and is that enabled in nixos's build?
<clever>
obadz: enough to understand that its e4crypt, and to know what is and isnt encrypted
<clever>
obadz: also, grub may need partial e4crypt support, to even know what is and isnt encrypted, otherwise, it may just refuse to open the entire fs
<clever>
obadz: is boot.loader.grub.enableCryptodisk enabled?
<clever>
obadz: is there only 1 partition on sda?
<clever>
obadz: what does `fdisk -l /dev/sdX` say, when ran on the right device?
<clever>
phizzz: i'm guessing the lxc config you started from, has xserver enabled still
<clever>
phizzz: `nix copy --to local?root=/var/lib/containers/foo/ /nix/store/foo` will coyp /nix/store/foo from /nix/store to /var/lib/containers/foo/nix/store/
<clever>
phizzz: nix-build '<nixpkgs/nixos>' -A system -I nixos-config=./configuration.nix, will generate the entire closure in the current /nix/store/
<clever>
phizzz: you also dont need to copy any special images
<clever>
that gets rid of most of the need for qemu
<clever>
nice
<clever>
samueldr: is it using its own private postgres instance?
<clever>
samueldr: i was also planning to run on the local machine, but just via a qemu guest that is ran from a bash script
<clever>
samueldr: i havent looked at yours yet, but i was wanting to spin up the iohk hydra in qemu, to confirm the module configures things right, and allow testing changes to hydra itself
<clever>
samueldr: hey, i was going to do that! lol
<clever>
samueldr: and weird fs's like zfs or luks or lvm
<clever>
that should work just fine without a /boot/ fs
<clever>
grub supports ext4
<clever>
what rootfs did you pick for / ?
<clever>
so its just personal choice at that point
<clever>
infinii: if grub supports the / fs, you can just make /boot/ a dir on /
<clever>
the `t` command in fdisk can set the types
<clever>
infinii: i would just use fdisk to create a gpt table, with the bios boot partition, optional /boot/, optional /swap/, and the / partition
<clever>
basically no reason to ever use MBR
<clever>
infinii: if you want bios on gpt, you just need to add a 1mb bios boot partition, no fs, not mounted, not formatted, then continue the same way you would have with MBR
<clever>
infinii: you can still do bios on gpt as well
<clever>
hl: i can reproduce the issue on this end, looking....
<clever>
nix-shell? nix-build? nix-env?
<clever>
hl: how are you using it?
<clever>
hl: then use clangStdenv.mkDerivation
<clever>
why do you want clang?
<clever>
hl: that should make clang work
<clever>
hl: are you using clangStdenv?
<clever>
bgamari: stack2nix was doing .override and passing it a initialPackages function
<clever>
so you can start from pkgs.haskellPackages, and do things in the right order
<clever>
in that case, your likely not wanting to use somebody elses package set?
<clever>
using extend removes override, so override complexities are gone
<clever>
but extend, removes override, forcing them to do it the right way
<clever>
elvishjerricco: also, anybody that doesnt know of it, will use .override the wrong way and nuke all your changes
<clever>
elvishjerricco: that override and compose thing just feels messy, when extend does the same thing more simply
<clever>
bgamari: only ever use override for changing the stuff extend cant change, and do override first
<clever>
just stick to extend, it will remove the problematic override
<clever>
you just need to use them in the right order
<clever>
elvishjerricco: its the same as overrideCabal vs overrideAtrs vs overrideDerivation
<clever>
elvishjerricco: to quote nh2, "It's getting ever more confusing/
<clever>
yep, very first paragraph mirrors what i said
<clever>
but extend is within that default.nix, and it isnt aware of the .override attr
<clever>
and callPackage will just re-import and re-run the default.nix with new args
<clever>
the reason, is that override is added by callPackage
<clever>
extend might even delete .override, so you cant go the wrong way
<clever>
bgamari: i believe .override will undo all extends, but extend will stack ontop of override
<clever>
bgamari: but .extend will insert another overlay into the list, and mutate it further
<clever>
bgamari: .override with the same keys, will overwrite previous .override calls, so you can only set the overrides (haskell specific) key once
2019-01-23
<clever>
ar1a: until you send `rm -rf /` as a txt, and the phone bricks itself
<clever>
ar1a: which reminds me, one of the really old "smart" phones before modern ones, there was a root shell on tty1 that got all keyboard input, but the gui was controlling the display, so you never noticed
<clever>
Sophos[m]: another fun one, when sharing a screen via 'screen', "can you see this?" -> "yes" -> yyyyyyyyyyyyyyyyyyyyyyyyyyyyy.....
<clever>
Sophos[m]: the problem, is when you tell somebody to "type foo" and the literally type in "foo"
<clever>
Sophos[m]: yeah, i just use type for everything now
<clever>
some shells even alias which to something like 'alias | which --some-flag' to get type-like support, but at that point, just use type!
<clever>
Sophos[m]: there is also which
<clever>
timor: you can see if it is, by comparing the versions they are claiming to install, but thats not 100%
<clever>
timor: also, libreoffice is broken on unstable, there is a chance you have a 2nd channel, and its just grabbing an older (still working) version
<clever>
timor: use nix-diff on the 2 .drv files to see how they differ
<clever>
samrose: the point where release.nix somehow imports ../.. i think
<clever>
they just never turned on the sandbox, so they dont even notice the build being naughty
<clever>
leotaku: some people file PR's that do network during the build
<clever>
leotaku: mostly that it builds in the sandbox and still works when ran