2019-11-18
16:36
<
clever >
but none of the profiles are setup, so youll need to manually run `/nix/store/hash-nix/bin/nix-env -i /nix/store/hash-nix` after you boot the system, and fix permisions and such
16:35
<
clever >
aranea: that will copy a given storepath to /mnt/nix/store
16:35
<
clever >
aranea: nix copy --to local?root=/mnt /nix/store/hash-nix
08:21
<
clever >
colemickens: the network is always disabled while building, nix must fetch the deps for you
08:20
<
clever >
less confusing that way
08:20
<
clever >
i try to only use channels on root
08:17
<
clever >
niso: what does nix-channel --list report?
08:11
<
clever >
the function i mentioned
08:11
<
clever >
niso: and channels_root/ will update if you run update as root
08:10
<
clever >
niso: yeah
08:10
<
clever >
chessai made a vim function that runs nix-prefetch-url, i still need to see how it works
08:07
<
clever >
etu: same as the number of cards in a deck i believe
08:07
<
clever >
that will insert 52 0's
08:07
<
clever >
in vim, you can just 52i0<escape>
07:48
<
clever >
that will build it with the new ui, but not apply, so you still need to follow it up with a nixos-rebuild switch
07:48
<
clever >
magneticduck: nix build -f '<nixpkgs/nixos>' -A system
07:39
<
clever >
fresheyeball: check the storepath you and MichaelRaskin pasted
07:38
<
clever >
fresheyeball: your on version 2.24
07:32
<
clever >
lovesegfault: the only real benefit home-manager has, is for non-nixos users that want the same benefit
07:32
<
clever >
lovesegfault: the same way such modules got written for home-manager (which duplicates some nixos stuff)
07:31
<
clever >
dminuoso: but a nixos module to configure those things could easily be made
07:30
<
clever >
magneticduck: or, why did you update the channel and then not nixos rebuild immediately to save yourself that problem a week later :P
07:30
<
clever >
magneticduck: its more a question of, do you want to download 2gig of apps to update 1 config file, or split it into 2 groups?
07:29
<
clever >
magneticduck: yeah, i could also use another channel to pull plex in from stable
07:27
<
clever >
i have to give up plex (or move it to nix-env) if i want to rebuild
07:27
<
clever >
for example, plex-media-player doesnt build on master, so i cant nixos-rebuild at all
07:26
<
clever >
magneticduck: oh, and the ability to nixos-rebuild, without non-system stuff blocking the update
07:26
<
clever >
magneticduck: about its only major value, in my eyes, is multi-user nixos machines, or getting the same setup on a non-nixos machine
07:25
<
clever >
magneticduck: everything else it does could be done with nixos
07:25
<
clever >
magneticduck: i think about the only thing you really gain from home-manager, is the ability to modify things without having root
06:40
<
clever >
lovesegfault: tells you if something is an element in a list
06:31
<
clever >
infinisil: its more of just a shortcut, you basically always need stdenv, saves you from adding another arg to callPackage inputs
06:31
<
clever >
ive seen bigger
06:30
<
clever >
or stdenv.lib
05:42
<
clever >
not sure then
05:41
<
clever >
LarryTheCow: does `ls /sys/firmware/efi/efivars/ | grep -i system` find anything related to systemd?
05:40
<
clever >
Boot0001 is the important one
05:39
<
clever >
LarryTheCow: the man page should explain how to remove entries
05:39
<
clever >
LarryTheCow: i dont think they are the problem, but it cant hurt to clean them up
05:38
<
clever >
LarryTheCow: i see evidence of 2 previous ESP's, which may or may not exist anymore
05:35
<
clever >
LarryTheCow: what does `efibootmgr -v` print out?
05:33
<
clever >
LarryTheCow: what does systemd-boot show?
05:31
<
clever >
LarryTheCow: is /boot mounted?
05:23
<
clever >
so you just need the name to also match
05:23
<
clever >
the hash matches the drv file
05:22
<
clever >
"outputHash": "09i467hyskvzj2wn5sj6shvc9pb0a0rx5iknjkkkbg1ng3bla7nm",
05:22
<
clever >
hr[m]: try adding `--name source` as well
05:22
<
clever >
did you include --unpack ?
05:20
<
clever >
hr[m]: try nix-prefetch-url --unpack file:///path/to/file ?
05:19
<
clever >
hr[m]: if it results in anything other then /nix/store/zjwrdr9wz0dacqximknidpf27sfbw762-source, then it failed
05:18
<
clever >
try the cmd i gave above
05:16
<
clever >
hr[m]: or use `nix-prefetch-url --unpack`
05:16
<
clever >
hr[m]: so you must nix-store --add a directory, after you unpack the tar file
05:16
<
clever >
hr[m]: this is the result of pkgs.fetchzip
05:16
<
clever >
"outputHashMode": "recursive",
05:13
<
clever >
hr[m]: can you pastebin the output of `nix show-derivation /nix/store/gp78c3dj8awxd85s0vr8wqgd9ny2plvv-source.drv` ?
05:12
<
clever >
2019-11-18 01:03:58 * hr[m] sent a long message: < >
05:12
<
clever >
hr[m]: i cant even see the question!
04:53
<
clever >
mog: and then add that package to services.udev.packages
04:49
<
clever >
other paths?
04:49
<
clever >
wedens[m]: it does use $NIX_PATH, it will search for <nixpkgs>
04:46
<
clever >
infinisil: if you put the url right into NIX_PATH, it wont get the new url till you reopen the shell
04:45
<
clever >
infinisil: ah, thats similar to what i do
04:45
<
clever >
infinisil: i think this will fetch a given rev, and add it to the channels list
04:44
<
clever >
infinisil: it is possible to point nix-channel to a single rev i believe
04:44
<
clever >
infinisil: main issue ive seen with that, is the change wont take effect until you reload all shells
04:39
<
clever >
so it will put jobs on a certain machine first
04:38
<
clever >
lovesegfault: with remote builders, you also have a speed factor, which tells nix the relative speed difference between machines
04:37
<
clever >
thats for things where copying is more expensive then building
04:37
<
clever >
this build will try to skip the remote build machines, and build on the local instead
04:37
<
clever >
you also have the reverse
04:37
<
clever >
> removeReferencesTo.preferLocalBuild
04:37
<
clever >
chromium is a wrapper script, that sets env vars
04:36
<
clever >
> chromium.browser.requiredSystemFeatures
04:36
<
clever >
so nix wont allocate it to weaker machines
04:36
<
clever >
the kernel is specially flagged to only run on build machines that have the "big-parallel" feature
04:35
<
clever >
> linux.requiredSystemFeatures
04:35
<
clever >
thats where system features like big-parallel and preferLocalBuild come into play
04:34
<
clever >
what could be optimized more?
04:33
<
clever >
lovesegfault: the topo-sort forces it to build gcc first, before it can do anything else
04:30
<
clever >
so it doesnt delete the A packages every single time
04:30
<
clever >
one weird thing i discovered in the garbage collection code, is that it intentionally random-sorts the entire list of garbage, before deleting things
04:29
<
clever >
plus a topo-sort
01:58
<
clever >
2019-11-15 22:11:51-{^_^}:#nixos- [nixpkgs] @jonringer opened pull request #73481 → steam: use 32bit version of libva →
https://git.io/JeoZN
01:09
<
clever >
dont remember the exact difference between disk-image-tests and example
01:08
<
clever >
lordcirth__: and then nix-build '<nixpkgs/nixos>' --arg configuration ./example.nix
01:07
<
clever >
you probably want to load nixpkgs/nixos instead, and pass this in as a config file
01:07
<
clever >
lordcirth__: there is also nothing special to the name config.system.build.laptop, you can just shorten that out
01:05
<
clever >
just import ./nixpkgs {]
01:05
<
clever >
lordcirth__: rather then importing top-level, you want to import the default.nix in the root dir
00:10
<
clever >
lovesegfault: --argstr system i686-linux
00:09
<
clever >
lovesegfault: rec {
00:07
<
clever >
lovesegfault: it must be in a let block, above stdenv.mkDerivation
00:05
<
clever >
lovesegfault: so you could just ignore the 64bit version
00:05
<
clever >
lovesegfault: also of note, you can run the 32bit version on a 64bit os without trouble, 99% of the time
2019-11-17
23:56
<
clever >
lovesegfault: but it rejects any binary with the "wrong" value
23:56
<
clever >
lovesegfault: also, it has a path in the headers to the dynamic linker (like ld.so)
23:56
<
clever >
lovesegfault: the darwin kernel rejects any binary that isnt dynamic
23:54
<
clever >
though darwin doesnt allow static binaries
23:54
<
clever >
lovesegfault: and these let you figure out if you need otool or patchelf
23:53
<
clever >
> stdenv.isLinux
23:53
<
clever >
> stdenv.isWindows
23:53
<
clever >
> stdenv.isDarwin
23:53
<
clever >
lovesegfault: a lookup table lets you add more systems in the future
23:53
<
clever >
> let table = { i686-linux = "a"; x86_64-linux = "b"; }; in table.${stdenv.system}
23:52
<
clever >
you can also use a lookup table
23:52
<
clever >
> stdenv.system
23:52
<
clever >
lovesegfault: use an if statement against stdenv.system
21:23
<
clever >
lordcirth__: nixos/lib/make-disk-image.nix
21:10
<
clever >
mikky: and what is the contents of configuration.nix?
21:08
<
clever >
mikky: that should have worked, what is the exact command you used?
20:55
<
clever >
mikky: but if you specify 2 paths like that, things wont work right
20:53
<
clever >
mikky: i also notice you gave nix-build 2 files, nixpkgs and nixpkgs/nixos/release.nix
20:53
<
clever >
mikky: then netboot.x86_64-linux should work
20:50
<
clever >
mikky: if you instead `nix repl nixpkgs/nixos/release.nix`, and eval `netboot`, what does it contain?
20:49
<
clever >
mikky: might just be that master is broken
20:48
<
clever >
mikky: are you on a channel or master?
20:47
<
clever >
darthdeus: nix-build --dry-run i think
20:47
<
clever >
mikky: and rather then supportedSystems, you want -A netboot.x86_64-linux
20:47
<
clever >
mikky: i think you want `--arg configuration 'import ./my-custom-config.nix'`
20:45
<
clever >
not much point in activating things and then immediately rebooting
20:44
<
clever >
shapr: if your planning to reboot, use `nixos-rebuild boot`
20:44
<
clever >
switch loaded things in a different (working) order, compare to booting
20:44
<
clever >
so if i reboot, wpa_supplicant can no longer start
20:44
<
clever >
but, the act of loading bonding, breaks wpa_supplicant
20:43
<
clever >
a recent problem i had, is that bonding can start up just fine, if thats all that changed
20:42
<
clever >
so switch is basically test+boot
20:42
<
clever >
and test will activate without touching the bootloader config
20:36
<
clever >
shapr: boot.kernelPackages = pkgs.linuxPackages_latest;
20:20
<
clever >
mikky: i add them to the imports section of configuration.nix, and it builds with the rest of nixos
20:19
<
clever >
mikky: netboot_server.nix and justdoit.nix are nixos modules
20:19
<
clever >
mikky: justdoit.nix?
19:39
<
clever >
its a bash script that will partition, format, mount, and nixos install
19:28
<
clever >
mikky: 48 then puts the entire thing into the root dir for nginx
19:28
<
clever >
mikky: 11 pulls in the netboot stuff, 12 pulls in a custom module, 13 configures it, and then 16-19 are copied from release.nix
18:57
<
clever >
niso: oh, i avoid them whenever possible :P
18:52
<
clever >
kolbycrouch: normal wpa_supplicant
09:32
<
clever >
maybe ~/.zshrc?
09:31
<
clever >
wedens[m]: you can also test with `ssh user@host nix-store --version`
09:31
<
clever >
wedens[m]: thats an issue due to .profile not being source for non-interactive shells, you need to make sure PATH gets updated in .bashrc too
09:11
<
clever >
wedens[m]: that allows the build machine to use its own substituters, but both machines will still pre-download the inputs, then realize they didnt need it
09:09
<
clever >
some time*
09:09
<
clever >
but it will waste some copy copying the inputs over
09:06
<
clever >
wedens[m]: if its not a substituter, it will download the build-time deps, copy them to the build machine, then instantly 'build' the thing, and copy the result back
09:06
<
clever >
wedens[m]: that would just help the performance a little bit
08:48
<
clever >
kolbycrouch: networking.interfaces.<name?>.ipv4.addresses.*.address
08:27
<
clever >
lovesegfault: the default unpack code expects all tar files to product a directory of things
08:27
<
clever >
lovesegfault: maybe: unpackPhase = "unpackFile $src ; export sourceRoot=.";
08:27
<
clever >
lovesegfault: unpackPhase = "unpackFile $src";
08:24
<
clever >
wedens[m]: and if you arent home, `nixops deploy --include laptop` to limit it to just one
08:24
<
clever >
wedens[m]: to manage multiple machines at once, so you can just run `nixops deploy` on the laptop, and it updates both laptop&desktop
08:24
<
clever >
wedens[m]: so the laptop can build things on its own, and optionaly farm it out to other systems to speed itself up
08:23
<
clever >
wedens[m]: i would make the laptop run nixops, and configure the desktop to be a build machine
08:23
<
clever >
wedens[m]: nixops doesnt copy the configuration.nix file over, so you would need to sync that over yourself first
08:22
<
clever >
,callPackage lovesegfault
08:22
<
clever >
lovesegfault: looks fairly close, what happens if you try to nix-build it?
08:21
<
clever >
wedens[m]: why do you need the build-time closure on the remote machine?
08:18
<
clever >
wedens[m]: nixops only copies the runtime closure to the remote machine
08:15
<
clever >
you can also toss in a `pwd` and `ls -lh` to see what you have to copy from
08:13
<
clever >
and { inherit (a) b; } is just { b = a.b; }
08:13
<
clever >
lovesegfault: basically, { inherit a; } is just { a = a; }
08:11
<
clever >
lovesegfault: fetchurl and stdenv
08:10
<
clever >
lovesegfault: stdenv.mkDerivation will unpack the src for you
08:10
<
clever >
lovesegfault: though, you could also use the postFetch on fetchurl, to move it there
08:09
<
clever >
lovesegfault: then a non-fixed output (like stdenv.mkDerivation or runCommand) to copy it to $out/bin/foo
08:09
<
clever >
lovesegfault: you would use fetchurl to generate a fixed-output drv that downloads it
07:56
<
clever >
so you dont have to relaunch your shells to make the new NIX_PATH take effect
07:56
<
clever >
it also means the NIX_PATH variable wont change, instead, your updating a dir that NIX_PATH points to
07:56
<
clever >
wedens[m]: which can cause delays if you try to run stuff without internet
07:55
<
clever >
wedens[m]: if its in NIX_PATH, nix will try to re-download the tar every hour, even though it cant have changed
07:47
<
clever >
wedens[m]: you can force nix-channel to use a specific revision, rather then an actual channel
07:47
<
clever >
wedens[m]: thats why i try to avoid changing NIX_PATH, set it to a constant value, and instead change what it points to
07:45
<
clever >
once nix.nixPath has set NIX_PATH, you dont need the -I flags anymore
07:44
<
clever >
nix.nixPath sets NIX_PATH for you
07:43
<
clever >
or just use the right -I flag the 1st time
07:09
<
clever >
id say thats a bug, it should fail hard when you do that
07:08
<
clever >
lovesegfault: text tells home-manager to write it to a file for you, source says to copy an existing file
07:08
<
clever >
lovesegfault: you want only text or source, not both
06:59
<
clever >
> writeText "foo.json" (builtins.toJSON { a="${hello}"; })
06:58
<
clever >
if you need to, you need to switch to pkgs.writeText
06:58
<
clever >
so you cant do that
06:58
<
clever >
> builtins.toFile "foo.json" (builtins.toJSON { a="${hello}"; })
06:58
<
clever >
toFile has the limit that the file cant depend on anything
06:57
<
clever >
and that returns a path it gets written to
06:57
<
clever >
> builtins.toFile "foo.json" (builtins.toJSON { a=42; })
06:57
<
clever >
lovesegfault: yep, you can use it anywhere in nix
06:54
<
clever >
> :p builtins.toJSON { a=42; b="two"; }
06:52
<
clever >
i use nix for the templating, the json for the transfer to other stuff
06:47
<
clever >
i heard the same is true for toml somewhere, but i cant remember where
06:47
<
clever >
lovesegfault: though i heard its a superset of json, so if you just .toJSON, you can still parse it as toml
06:46
<
clever >
lovesegfault: there is a fromTOML but no toTOML
06:35
<
clever >
but thats dirty
06:34
<
clever >
lovesegfault: though you can builtins.getEnv to read env vars...
06:34
<
clever >
lovesegfault: dont think so, thats only visible in nixos modules
00:51
<
clever >
all of the options your setting, appear under config
00:50
<
clever >
lovesegfault: config.boot.kernelPackages
00:44
<
clever >
you cant know the value of networking.hostName until you know what all the imports are
00:43
<
clever >
also, that will fail
00:43
<
clever >
if you append a string to a path, you get a path
00:43
<
clever >
lovesegfault: imports = [ (./machines + "/${name}.nix") ];
2019-11-16
22:58
<
clever >
dansho: and since you didnt, it was running nix-shell for you, inside another nix-shell
22:58
<
clever >
dansho: i think you want to give stack.yaml the path to a shell.nix file, and stack calls nix-shell for you
22:51
<
clever >
screen recording and rdp dont work for me
22:51
<
clever >
i think virtualbox only needs to be compiled specially for usb3 support to the guest and some of the more advanced features
22:50
<
clever >
evanjs: guest additions work on my windows guest, without having to build the host stuff
22:49
<
clever >
evanjs: 4.19.37 on the router
22:48
<
clever >
i havent changed any special flags, so my vbox comes from the binary cache
22:45
<
clever >
evanjs: my router has a dual-socket Intel(R) Xeon(TM) CPU 3.20GHz, with 8gig of ecc ram
22:41
<
clever >
evanjs: those are the scripts that watch a hydra, and update channels
22:40
<
clever >
evanjs: you could even just have your own custom channel, that only updates when all machines build, then point auto-upgrade to that!
22:40
<
clever >
evanjs: thats basically how nix-channel's are managed
22:39
<
clever >
evanjs: so i moved it to my nas
22:39
<
clever >
evanjs: initially, i ran hydra on the router, but the hdd was too io bound
22:38
<
clever >
and hydra will distribute the work between things, and avoid duplicating it
22:37
<
clever >
evanjs: then i can check hydra and see how healty things would be if i choose to upgrade
22:37
<
clever >
evanjs: instead, i have a hydra configured to build my config against unstable, but not apply the changes to any machine
22:36
<
clever >
autoUpgrade would keep updating the channel on me, and cause Thra11's issue, where i have to issue 20 rollbacks to get to a working revision
22:35
<
clever >
if i want to keep using it as is, i need to avoid updating channels, until i fix that
22:35
<
clever >
evanjs: for example, slim was recently deprecated, so my config no longer even builds on the latest nixos-unstable
22:35
<
clever >
evanjs: not directly, but the changes it brings in may
22:33
<
clever >
evanjs: i try to avoid auto-upgrade, since it can lead to unexpected breakage
22:33
<
clever >
Thra11: not really
22:33
<
clever >
evanjs: yeah, sshServe just serves whatever is in /nix/store/
22:32
<
clever >
dansho: and how did you load that nix file?
22:31
<
clever >
evanjs: but if its only for personal use, sshServe seems simpler
22:31
<
clever >
evanjs: you could garbage collect things with sshServe, and you need enough storage and bandwidth to host the things you want to share
22:27
<
clever >
,libraries dansho
22:26
<
clever >
and also --delete-generations
22:26
<
clever >
[root@amd-nixos:~]# nix-env --profile /nix/var/nix/profiles/system --list-generations
22:26
<
clever >
Thra11: you could delete the bad generations after you rollback, so they are skipped
22:25
<
clever >
Thra11: rollback goes to current-1, not previous, ive ran into that problem before
22:24
<
clever >
but if you only have 1 flag, it doesnt really matter
22:24
<
clever >
just cfg.enable
22:23
<
clever >
sondr3: the let cfg= is just a handy shortcut, so you dont have to type config.mine.blah everywhere
22:22
<
clever >
sondr3: one is using options which isnt the right way to read the config
22:18
<
clever >
random_user: did you plug it in while the machine was off?
11:47
<
clever >
betawaffle: builtins.readFile ./foo.txt
11:46
<
clever >
betawaffle: builtins.readFile ?
11:46
<
clever >
timokau[m]: yeah, the nix exprs and evaluation happens entirely on the user side, and nix-daemon doesnt know how to parse nix files
11:41
<
clever >
timokau[m]: though you can get similar if you bake a copy of nixpkgs into /run/current-system/nixpkgs
11:41
<
clever >
timokau[m]: thats what nix-channel mostly saves you from, keep NIX_PATH constant, and change the dir (or symlink) its pointing to
11:38
<
clever >
timokau[m]: logging out and back in may also do it
11:35
<
clever >
timokau[m]: it also only takes effect after you relaunch the shell
11:35
<
clever >
timokau[m]: nix.nixPath only takes effect after nixos-rebuild completes, and wont affect the current build
11:19
<
clever >
xwvvvvwx: what file are you changing, what command are you running?
11:16
<
clever >
xwvvvvwx: that should detect changes every time you re-run the nix commands
11:15
<
clever >
xwvvvvwx: how are you importing nixpkgs from a local copy?
11:15
<
clever >
FRidh: there is also the escape-hatch of builtins.exec
11:14
<
clever >
FRidh: then you can just `nix-shell -A action` and the shellHook will run things, with the buildInputs already in PATH, and then shellHook can either `exit 0` or `exit 1`
11:13
<
clever >
FRidh: i just use shellHook in nix-shell
10:51
<
clever >
srhb: wooo!
10:42
<
clever >
otwieracz: you may need to configure nixos-container to bind mount /dev/fuse into the guest
10:41
<
clever >
otwieracz: does /dev/fuse exist in the container?
10:40
<
clever >
i see over 6 PR's involved in adding libva to steam, in recent irc logs, lol
10:40
<
clever >
2019-11-12 10:16:05-{^_^}:#nixos- [nixpkgs] @worldofpeace merged pull request #73281 → [19.09] steam: Add libva to chrootenv →
https://git.io/JewXK
10:40
<
clever >
2019-11-10 09:10:39-{^_^}:#nixos- [nixpkgs] @ikervagyok opened pull request #73157 → steam: add libva as a dependency, otherwise steam doesn't start anymore →
https://git.io/JeVNz
10:39
<
clever >
2019-11-15 22:11:51-{^_^}:#nixos- [nixpkgs] @jonringer opened pull request #73481 → steam: use 32bit version of libva →
https://git.io/JeoZN
09:19
<
clever >
and you need to either remove one of the values, or use lib.mkForce
09:19
<
clever >
nixos will complain that you set the value twice
09:19
<
clever >
and it would still work under imports
09:18
<
clever >
but its not really using the pkgs key, so line 1 could be deletded
09:16
<
clever >
how are you importing the set?
09:08
<
clever >
lovesegfault: i just spew things all over the root dir :P
09:06
<
clever >
srhb: another weird thing, is that the string type, complains if you set it to both "foo" and "foo"
09:05
<
clever >
srhb: but if you set type = types.bool;, it will silently merge true and true, but complain about true and false
09:05
<
clever >
srhb: if you dont set the type of something, then set the value to both true and false, it will silently true
09:04
<
clever >
,locate bin shutdown
09:04
<
clever >
srhb: i was also horified to discover, that if you dont set a type on something, the default merge rule inspects the types of the 2 args, and for bools, will just logical or them
09:03
<
clever >
and the type of a
09:03
<
clever >
lovesegfault: depends on if the set cointains more options or is an option itself
09:00
<
clever >
gjabell: i often find it simpler to just clone and grep, but that doesnt work when you dont know what to clone
09:00
<
clever >
lovesegfault: but i only use it for the slack plugin and nothing else
08:59
<
clever >
so grub still points to an x86 nixos
08:59
<
clever >
lovesegfault: when you nixos-rebuild under arm, it only updates the arm bootloader config
08:58
<
clever >
lovesegfault: so you just get 2 builds of nixos in using nix-copy-closure, and then configure 2 different bootloaders, to start at different paths
08:58
<
clever >
lovesegfault: the trick, is that nix just lets storepaths from other arches co-exist in /nix/store/