2018-11-26

<clever> yl[m]: i had originally written that module to netboot my rpi's
<clever> yl[m]: and the module i linked will try to mount /data during the initrd
<clever> yl[m]: you could do something as simple as adding a /data fs, that is iscsi mounted, on a normal nixos install
<clever> yl[m]: the "new" dhcp in the initrd stuff makes it a lot simpler as well
<clever> yl[m]: yeah, that is something that should be in nixpkgs itself
<clever> yl[m]: this is an old module for iscsi root as well
<clever> yl[m]: ive got one for openiscsi
<clever> you need to pkgs = import nixpkgs { config = {}; };
<clever> yeah, thats the issue, the nixpkgs value on line 2 is just the path to it
<clever> catern: not really, but you can use nix-diff to compare the resulting build, and then incrementally guess whats missing and recreate it
<clever> Lisanna: you could also patch runInLinuxVM to support a mem-per-core
<clever> Lisanna: or sed to change the existing flag
<clever> x
<clever> preVM = ''export QEMU_OPTS="$QEMU_OPTS -m $(($NIX_BUILD_CORES * 128))"''; for e
<clever> Lisanna: memSize lands in $QEMU_OPTS, and you could then mess with that in the preStart script which has access to $NIX_BUILD_CORES
<clever> Lisanna: you could use preStart to mutate some params...
<clever> Rovanion: /boot is another trusted way to do it
<clever> Rovanion: my initial plan was to bake it into the motherboard with coreboot, but thats not always an option
<clever> Rovanion: line 67 locks signing requirements on, so all files it loads from then on must be signed
<clever> Rovanion: this build of ipxe has been modified to have a x509 cert baked into it, along with a mini script (the EMBED part), so it wont do the normal netboot stuff automatically
<clever> Rovanion: either in a /boot partition you dont modify, the network card boot rom, or baked into the bios
<clever> Rovanion: i did design not-os to be secure, but it relies on the initial ipxe binary being on the machine somehow
<clever> Rovanion: but it could also just netboot into an installer that runs nixos-install, rather then copying an image
<clever> with a more inteligent script, it could check for schedules like you mentioned above
<clever> on my local network, boot.php is just a dumb switch/case block, that has a different cfg for each mac
<clever> `chain netboot/netboot.ipxe` would continue the netboot
<clever> `sanboot --no-describe --drive 0x80` will force ipxe to boot the local hdd
<clever> so you could replace that with any server-side scripting you like (php, perl, python, haskell+servant), and do fog like things
<clever> Rovanion: but, the ipxe instance still sends the mac addr to it as a url param
<clever> Rovanion: this part of my netboot_server is creating a file called boot.php (contains no actual php code, was too lazy to rename it)
<clever> that sounds similar
<clever> then you just need to fill in an ip on a nixops deployment with targetEnv = "none"; and you can deploy to it as normal
<clever> and that will manage remotely reinstalling nixos on machines
<clever> or you can tweak the netboot_server to force hdd booting, even when it netboots
<clever> depending on your hardware control (ipmi and stuff) you can then either remotely mess with the boot order to stop network booting
<clever> and that util will confirm its save to wipe the current box, then run justdoit, and report progress, and reboot
<clever> then youll likely want a custom util to run on bootup, that talks to a central box ( gchristensen, i'm guessing this is similar to packet.net stuff)
<clever> Rovanion: with the netboot_server above, you can get any machine on the LAN to boot into a nixos installer when it network boots
<clever> Rovanion: kexec is one of many ways of booting the nixos installer, but you can also use netboot
<clever> Rovanion: justdoit is a bash script that will partition, format, and install nixos
<clever> justdoit is also included in the netboot images
<clever> Rovanion: and here is an example netboot server in nixos, https://github.com/cleverca22/nixos-configs/blob/master/netboot_server.nix
<clever> fendor: if i properly launch it from steam, it goes fullscreen black window, then exits after a few seconds
<clever> fendor: if i manually launch the game from an "xterm game" or steam-run, it fails to detect steam and aborts
<clever> fendor: drm is only making it harder to debug, but is not the root problem
<clever> fendor: and now to cheat, i now have a new game, /run/current-system/sw/bin/xterm !
<clever> so i have no way to test that route
<clever> one anoying thing, steam wont let me run the windows version under proton
<clever> its stating that it needs steam to run
<clever> fendor: aha, if i run the game under steam-run, i get a dialog very similiar to the nix expression in the gist, but now with text!
<clever> 6535 read(22, "DRIVER=amdgpu\nPCI_CLASS=30000\nPCI_ID=1002:6658\nPCI_SUBSYS_ID=1458:2274\nPCI_SLOT_NAME=0000:01:00.0\nMODALIAS=pci:v00001002d00006658sv00001458sd00002274bc03sc00i00\n", 4096) = 161
<clever> 6533 openat(AT_FDCWD, "/sys/devices/pci0000:00/0000:00:02.0/0000:01:00.0/uevent", O_RDONLY|O_LARGEFILE) = 22
<clever> gdb is of no use though
<clever> fendor: i just noticed that the game is segfaulting (and if a child of strace segfaults, all children die, including steam)
<clever> fendor: libredirect is likely your friend
<clever> /lib64 just doesnt exist
<clever> fendor: ah, but ive never done messy things like that
<clever> infandum: the split output stuff in the nixpkgs manual
<clever> ncurses.dev
<clever> only nix-shell gives .dev
<clever> installing it wont give you the .dev output
<clever> it may also work with `nix-shell -p ncurses`
<clever> infandum: main difference is just the abiVersion
<clever> infandum: its in the dev package, nix-shell -p ncurses6
<clever> ,locate infocmp
<clever> fendor: oh, weird, its lspci thats failing, not the game...
<clever> lspci: error while loading shared libraries: libGL.so.1: cannot open shared object file: No such file or directory
<clever> its just a buildenv over these 2
<clever> 11425 paths = [ libGL libGLU ];
<clever> libGLU_combined is where libGL came from, so the next phase is injecting that into steam
<clever> fendor: https://gist.github.com/19cd039fee563ba8ed29de870fc3ee3f with this, i was able to get the game to open a window and not crash instantly, but it doenst work, and wont quit either
<clever> ,locate libGL.so
<clever> fendor: https://github.com/NixOS/nixpkgs/issues/31189 explains how it works, but that libGL.so is now mia in the named dirs
<clever> fendor: happen to know if an issue is already open?
<clever> semi related, i have a game in steam that fails to launch due to libGL.so not being found
<clever> and qemu-user can handle linux ones

2018-11-25

<clever> then your free to modify that copy all you want
<clever> dsx: then put a copy in /etc/nixos/ and imports = [ ./pulseaudio.nix ];
<clever> then youll want the mkForce above
<clever> or you can just not enable pulseaudio
<clever> you might get away with environment.etc."asound.conf".text = mkForce "";
<clever> and its in a let block, so there is no way to change it directly
<clever> dsx: thats a nixos module, so overlays will never change it directly
<clever> dsx: why do you think the arg is called alsaConf?
<clever> dsx: the pkgs on line 4 should also be a self
<clever> dsx: as tilpner said, i got self and super backwards, so line 3 refers to itself
<clever> i was choosing overlays.nix, to make the nixos side simpler
<clever> then nixpkgs.overlays = ./overlays; may just work
<clever> though when using a dir, how do you make nixos load it? does it accept a dir, or must it be a list of functions?
<clever> that would also work
<clever> and you can still have your overlays split over many files
<clever> and that file can just be [ (import ./overlay1.nix) ]
<clever> now EVERYTHING has a single source of truth on what overlays are
<clever> overlays.nix might be the simplest then, just `nixpkgs.overlays = import /home/clever/.config/nixpkgs/overlays.nix;
<clever> tilpner: thanks, i can never remember which way it is
<clever> there is also a defualt based on $HOME
<clever> but for nix-build/nix-shell/nix-env, it has to be somewhere else, cant remember exactly where
<clever> dsx: nixpkgs.overlays = [ (super: self: { ... }) ]; will affect everything in the nixos configs
<clever> it definitely did have an effect on the drvs, it initially took 30sec, as ot checked caches, and now wants to build new things
<clever> infinisil: defaults.documentation.enable = false; makes my eval go from 21 seconds to 21 seconds, lol
<clever> yeah, configuration.nix's imports dont come into play i think
<clever> infinisil: oh, that might be something i should look into with nixops deployments
<clever> dsx: the single pa instance, will then share the alsa device between all apps, on that user
<clever> which breaks the other
<clever> one of those claimed exclusive control of the alsa device
<clever> all audio using apps must run as the same user
<clever> pulseaudio is in single-user mode by default
<clever> dsx: what user is mpd running as?

2018-11-24

<clever> though the most recent change makes the binary a static elf, so it has no closure!
<clever> ottidmes: here is how to make your own initrd, with a given binary at /init, along with the full closure of that binary: https://github.com/cleverca22/nix-tests/blob/master/haskell-init/default.nix#L22-L29
<clever> ottidmes: that contains just the deps of the stage-1-init.sh script
<clever> ottidmes: of note, the initrd has its own /nix/store/
<clever> pareidolia: it seems to only exist in one spot, in an nvidia driver
<clever> /home/clever/apps/nixpkgs/pkgs/os-specific/linux/nvidia-x11/default.nix: in applyPatches [ "fix-typos" ];
<clever> /home/clever/apps/nixpkgs/pkgs/os-specific/linux/nvidia-x11/default.nix: applyPatches = pnames: if pnames == [] then null else
<clever> ottidmes: is that rescue for nixos or another distro?
<clever> and the whole point is to install nixos on a parition :P
<clever> ottidmes: you would need a rootfs on a parition to boot without that
<clever> ottidmes: yeah
<clever> ottidmes: netbootRamdisk is a modified initialRamdisk, that includes the entire rootfs in the initrd
<clever> i have put the entire installer into the initrd before, lol
<clever> then your initrd would be 500mb or more
<clever> ah, the installer is also a "fully booted" nixos install
<clever> boot.initrd.availableKernelModules adds them to the initrd
<clever> but they wont be available in the initrd
<clever> when booted fully, you will
<clever> but its also safe to just brute-force them all in
<clever> v0|d: but i think it will also depend on what usb controllers you have, and which one the keyboard is plugged into
<clever> ottidmes: cmdline was a recent addition, and i didnt think to reuse it when adding it, bdb84d2308bdea1d919aa9375c06b949db3c459e
<clever> boot.initrd.availableKernelModules = [ "usbhid" "xhci_pci" "ehci_pci" "ohci_hcd" ]; i think
<clever> dsx: you need to include usb drivers in the initrd, boot.initrd.availableKernelModules
<clever> > haskell.packages.ghc843.ghcWithPackages
<clever> ottidmes: run that on the main derivation thats being put into the tar or something
<clever> ottidmes: du -hc --max=0 $(nix-store -qR /run/current-system) | sort -h
<clever> ottidmes: yeah
<clever> ottidmes: so when nixos-rebuild boot updates /boot, it can inject secrets
<clever> ottidmes: thats just writing the path of a bash script to the $out, for nixos-rebuild ot use later
<clever> ottidmes: so nix thinks the initrd has zero deps already
<clever> ottidmes: the initrd is compressed, which breaks nix's dep checks
<clever> ottidmes: and for nuke-refs, the kernel has some paths in it, that are only useful for development, that bring in more deps
<clever> ottidmes: without unsafeDiscardStringContext, the kernel cmdline depends on the rootfs, and more then doubles the size of the tar
<clever> ,-A
<clever> but openjdk doesnt have java in its name
<clever> s/not/now/
<clever> hio: you are not at step 3: https://github.com/NixOS/nixpkgs/issues/17126
<clever> dramforever: import from derivation
<clever> infinisil: why are you not using pkgs.fetchgit?
<clever> booglewoogle: i also noticed that bug, but havent looked into the cause just yet
<clever> MichaelRaskin: raw irssi in xterm
<clever> :D
<clever> and if the OS is properly hardened, it will be difficult to get in after it boots, even with physical access
<clever> ottidmes: if used correctly, the TPM verifies that nothing in the boot process is modified (nixops deploy will now be a major pain in the ass)
<clever> ottidmes: TPM maybe?
<clever> you must set name = "hnix"; in that default.nix
<clever> infinisil: the name of root, will change to be hash-source
<clever> if you give it the wrong name, then you get an empty dir
<clever> infinisil: so it doesnt redo the cabal2nix needlessly
<clever> infinisil: callCabal2nix always does a filterSource pass, to only allow hnix.cabal for example
<clever> infinisil: what args did you run callCabal2nix with?
<clever> infinisil: if you ls that dir, does it have a cabal file?
<clever> infinisil: it shouldnt need a .git
<clever> booglewoogle: graphics are back, and gist updated
<clever> hio: yeah, all users can install any program
<clever> i think thats why i'm winning every race
<clever> model name : AMD FX(tm)-8350 Eight-Core Processor
<clever> booglewoogle: nope, i removed a lot of other things
<clever> booglewoogle: ok, it runs, but ive definitely broken things, all the images are missing
<clever> if you just want it to happen on-demand, you can do it locally
<clever> hio: if you want something to happen on every new commit, you need something like hydra or travis
<clever> for both nixos and nixops, you can just add an overlay to nixpkgs.overlays to add custom packages to it
<clever> hio: you dont really need a package registry, you can just load custom nix files locally
<clever> $HOME/bin is in the path by default
<clever> there is also /etc/bashrc
<clever> .bashrc still works as normal, when it exists
<clever> each user has its own .nix-profile
<clever> yeah
<clever> hio: in that case, it will generate a new profile with only the thing you just installed, and fix the symlink
<clever> hio: it will be a broken symlink if you have never nix-env -i'd something before
<clever> that new profile contains the new version of manifest.nix
<clever> hio: when you install something with nix-env -i, it will read ~/.nix-profile/manifest.nix, mutate it (add a new package), then build a new profile from that, and update the symlink that .nix-profile is pointing to
<clever> booglewoogle: new problems in the install area, so i dont know yet
<clever> booglewoogle: https://gist.github.com/cleverca22/def441ed4f5e90fe81870fee0770372c/revisions and the <code> tab, are what i have currently
<clever> i'll gist a copy when its done
<clever> i'm also editing the expression on my end as i find these things
<clever> why is src = even there?
<clever> on this like, you deleted everything you got from src=, including the fmconfig
<clever> 40 rm -r ../{config,other_distros,README.md,setup}
<clever> thats usually what nix-shell is for, but some packages have nasty surprises in them
<clever> booglewoogle: also, your fetching the fmconfig from the git master, that will break very fast
<clever> its slower, but more pure
<clever> thats also why i prefer testing with nix-build interatively, and adding commands to the nix file, for nix to run at the right time for me
<clever> sed -i 's|DOLPHIN_VERSION_MINOR "0"|DOLPHIN_VERSION_MINOR "9"|g' CMakeLists.txt
<clever> booglewoogle: your shell isnt pure, and git leaked in
<clever> so all of the sed's to replace git calls arent needed
<clever> booglewoogle: if git is not found, it will grab the 5 on 166, and the 0 on 167
<clever> booglewoogle: it will only run lines 147-162, if git is tound
<clever> booglewoogle: aha, found your problem
<clever> booglewoogle: if i stop a nix-build after cmake has ran, this is the file it generated
<clever> source/FasterMelee-5.9/Ishiiruka/build/Source/Core/Common/scmrev.h:#define SCM_DESC_STR "5.0"
<clever> booglewoogle: i'm confirming them now...
<clever> booglewoogle: the CMakeLists.txt line i pasted above
<clever> booglewoogle: and the .js file is for windows
<clever> booglewoogle: one of your sed's should get the 1st one
<clever> Source/Core/Common/make_scmrev.h.js: "#define SCM_DESC_STR \"" + revcount + " (" + describe + ")\"\n" +
<clever> CMakeLists.txt: "#define SCM_DESC_STR \"" ${DOLPHIN_WC_DESCRIBE} "\"\n"
<clever> Source/Core/Common/Version.cpp:const std::string scm_desc_str = SCM_DESC_STR;
<clever> const wxString RevisionText = scm_desc_str;
<clever> Source/Core/DolphinWX/AboutDolphin.cpp: const wxString BranchText = wxString::Format(_("Branch: %s"), scm_branch_str.c_str());
<clever> booglewoogle: i dont see any obvious signs in the source of where that titlebar comes from yet
<clever> one min
<clever> 5.0
<clever> booglewoogle: and i have a GUI!
<clever> [clever@amd-nixos:~/apps]$ ./result/bin/fm
<clever> booglewoogle: the build finished!
<clever> booglewoogle: also building it the same way
<clever> i'm also cleaning up other bits nearby...
<clever> 51 postBuild = ''
<clever> 52 mv Ishiiruka/build/Binaries/ bin/
<clever> booglewoogle: mv: cannot stat 'Ishiiruka/build/Binaries/': No such file or directory
<clever> hubbypa: you need to first unstable = import <nixpkgs-unstable> {};
<clever> dramforever: oh, i didnt even see that, lol
<clever> > "${gtk2} vs ${gtk2.dev}"
<clever> > "${gtk} vs ${gtk.dev}"
<clever> you want ${gtk2.dev}
<clever> but it always drops glibconfig.h in /nix/store/njs4pvn9gs1zhikh0cdn7zw4aplpmbqm-glib-2.56.0/lib/glib-2.0/include
<clever> glib puts its main headers in /nix/store/xql1swlhkw4gry13vk1p0jvcaq48bmdy-glib-2.56.0-dev/include/glib-2.0
<clever> and glib is fun and always has headers in 2 outputs
<clever> ${glib} refers to the output called not, not dev
<clever> cmake usually figures those out on its own
<clever> booglewoogle: you want these 2 dirs
<clever> [nix-shell:~/apps]$ pkg-config --cflags glib-2.0
<clever> -I/nix/store/xql1swlhkw4gry13vk1p0jvcaq48bmdy-glib-2.56.0-dev/include/glib-2.0 -I/nix/store/njs4pvn9gs1zhikh0cdn7zw4aplpmbqm-glib-2.56.0/lib/glib-2.0/include
<clever> > glib.outputs
<clever> ls: cannot access '/nix/store/b2nfgb2lmph4hx0hfkjnxazhmvg9av8q-glib-2.56.0-bin/lib/glib-2.0/include': No such file or directory
<clever> [nix-shell:~/apps]$ ls -lh /nix/store/b2nfgb2lmph4hx0hfkjnxazhmvg9av8q-glib-2.56.0-bin/lib/glib-2.0/include
<clever> [nix-shell:~/apps]$ echo "$preBuild"
<clever> [clever@amd-nixos:~/apps]$ nix-shell -E '(import <nixpkgs> {}).callPackage ./fasterMelee.nix {}'
<clever> booglewoogle: checking...
<clever> > dolphinEmu.meta.description
<clever> with the error i just pasted
<clever> booglewoogle: fails to build here
<clever> /nix/store/xql1swlhkw4gry13vk1p0jvcaq48bmdy-glib-2.56.0-dev/include/glib-2.0/glib/gtypes.h:32:10: fatal error: glibconfig.h: No such file or directory #include <glibconfig.h>
<clever> booglewoogle: the cmakeFlags var does that for you
<clever> yeah, `installPhase` always refers to the function, not your override
<clever> ah
<clever> and why are you running cmake in prebuild?
<clever> bit strange that your not using the installPhase
<clever> booglewoogle: can i see the expressionthat your trying to fix?
<clever> booglewoogle: you already have a pkgs imported, so you should be able to just pkgs.callPackage
<clever> WilliamHamilton[: try `strace -f -o logfiles adb device ; sleep 5; adb kill-server ; grep EPERM logfile` as non-root, after pre-killing it
<clever> WilliamHamilton[: that confirms that the problem is linux permissions
<clever> hio: you have to logout and log back in form gnome3 to detect things being installed
<clever> WilliamHamilton[: if you `adb kill-server` then try again as root, does it work?
<clever> WilliamHamilton[: and thats enough to `adb shell`
<clever> WilliamHamilton[: the device noce for the phone is world readable
<clever> crw-rw-r--+ 1 root root 189, 399 Nov 24 13:59 /dev/bus/usb/004/016
<clever> Bus 004 Device 016: ID 04e8:6860 Samsung Electronics Co., Ltd Galaxy (MTP)
<clever> hio: WilliamHamilton[ it works for me, when i'm not in plugdev
<clever> hio: can you name an example of 2 that appeared?
<clever> hio: only packages in the nixpkgs repo will appear
<clever> hio: yes
<clever> yep, thats the same one i have for adb
<clever> hio: try also adding services.xserver.desktopManager.xterm.enable = false; and nixos-rebuild switch
<clever> gnome3 is enabled
<clever> hio: did you enable a different desktopManager?
<clever> ottidmes: i still prefer using $out, i think $prefix is from FHS, and goes along with things like --prefix=/usr/
<clever> Default: true
<clever> services.xserver.desktopManager.xterm.enable
<clever> hio: you need to either disable xterm, or select a different DE at the login screen
<clever> hio: that is totally normal, you have the xterm desktop manager enabled
<clever> WhittlesJr: fetchFromGitHub is already based on mkDerivation, a variant that just downloads from github and extracts to $out
<clever> and src= almost always points to a package
<clever> WhittlesJr: fetchFromGitHub is already a package
<clever> oops, and fill in the version
<clever> WhittlesJr: also, fetchFromGitHub does exactly what you want already
<clever> WhittlesJr: you overrode the unpackPhase, so nothing is unpacking $src
<clever> always helps to have a fresh set of eyes
<clever> Acou_Bass: theres your problem
<clever> > kdeApplications.kdenlive
<clever> ++builtins.filter lib.isDerivation (builtins.attrValues pkgs.kdeApplications);
<clever> Acou_Bass: can you also gist your configuration.nix file?
<clever> Acou_Bass: egrep -r --color "mlt|movit|kdenlive' /etc/nixos/ ?
<clever> v0|d: that would help if movit was in systemPackages, but that doesnt explain why kdenlive itself is in systemPackages
<clever> kdenlive may be shortly after the thing refering to it
<clever> this version will print every file its reading, as it does it
<clever> nix eval '(with import <nixpkgs/nixos>{}; map (x: x.name) config.environment.systemPackages)' -vvvv
<clever> so its still in your config file
<clever> that command prints what the configuration.nix wants in the next build
<clever> no
<clever> its about 10+ lines line with word-wrap here
<clever> Acou_Bass: what does this output? nix eval '(with import <nixpkgs/nixos>{}; map (x: x.name) config.environment.systemPackages)'