<slabity[m]>
Okay, NixOps does not seem to be reading any files I pass into it. Anyone run into this before?
<slabity[m]>
If I have a file 'network.nix' that contains just '{ network.description = "My network"; }', and then run 'nixops create network.nix -d network', then why does it say the description is "Unnamed NixOps network"?
<logzet>
slabity[m]: I mounted the other partitions with discard, so only the swap is missing.
<slabity[m]>
logzet: It will automatically take care of trimming SSDs
<slabity[m]>
logzet: There's a variable called `services.fstrim.enable`
<pie_>
slabity[m], or something.
<slabity[m]>
pie_: Agreed. Documentation is a bit lacking
<slabity[m]>
Probably take a few weeks
<slabity[m]>
Now to just... Slowly switch every machine I have to nix
<slabity[m]>
Oh cool. I can definitely incorporate that.
<clever>
slabity[m]: you can put require = [ ./trivial.nix ./trivial-vbox.nix ./your-other-files.nix ]; into a single nix file, and then run `nixops create` on that single file
<slabity[m]>
A tree of files? Like you just do `nixops create ./my-dir -d system` and it will load all the files in? Or just using `imports = [ ... ]` like normal?
<slabity[m]>
Thanks. That makes a lot more sense.
<gchristensen>
slabity[m]: those two configurations merge, yes
<slabity[m]>
I understand one is the logical configuration and the other is the physical deployment, but is this enforced?
<slabity[m]>
I'm trying to learn NixOps, but I'm a bit confused. In section 3.1 of the manual (Deploying to VirtualBox) there are two separate files, `trivial.nix` and `trivial-vbox.nix`. How exactly does NixOps handle this? Does it just merge the two `webserver` sets together? Could I use one file with all the information? Can I use more than two?
2018-07-04
<elvishjerricco>
slabity[m]: Oh, that's probably in a config file somewhere in `/run/current-system`
<slabity[m]>
I'd like to figure out what my `boot.kernelModules` variable was set to. But I don't think I can figure that out if I can't regenerate it
<slabity[m]>
Darn
<elvishjerricco>
slabity[m]: You can't recover the nix expression used to generate a nixos system, no
<slabity[m]>
Is it possible to dump the running system's NixOS configuration? I accidentally deleted my `hardware-configuration.nix` and I had some changes that I'd like to get back
2018-07-03
<slabity[m]>
Thanks @elvishjerricco, homemanager is working now
<slabity[m]>
Hmm... I might try it anyways
<elvishjerricco>
slabity[m]: You'll either need the source checked out on your machine, or you'll need to use `builtins.fetchTarball` / `builtins.fetchGit` to get the source at eval time
<elvishjerricco>
slabity[m]: You probably can not do `imports = ["${pkgs.homemanager}/nixos/default.nix"];`, because imports can modify `pkgs`, so the module system considers that a pradox
<slabity[m]>
As in, can I access it like "${pkgs.homemanager}/nixos/default.nix" or whatever?
<slabity[m]>
That file in the repo seems to be exactly what I'm looking for. But is it available somewhere in nixpkgs? I'd prefer not to have to clone and keep it updated manually
<leotaku_>
slabity[m]: you can use it as a seperate thing from your system config or integrate it into it. Both have up and downsides.
<slabity[m]>
Is there a recommended way to integrate home-manager into NixOS's configuration? Or is it recommended to keep it separate from the system configuration?
2018-07-01
<slabity[m]>
Awesome, thanks
<slabity[m]>
Is there a builtin/lib function that lets me check if a file exists?
2018-06-29
<infinisil>
slabity[m]: ^
<slabity[m]>
Does anyone know if there's a builtin/lib function that lets you build up a list by supplying a list of values and a list of booleans to decide if it goes in the list or not? Something like `buildList [ true false true] [ 1 2 3] => [1 3]`?
<infinisil>
slabity[m]: Nope, same as how you can't get the variable name in other languages
<slabity[m]>
Is there a function that takes a variable name and returns the name and value in a set? Something like `getVarSet config.myVar` would return `{ name: "myVar", value: ${myvar} }` if that makes any sense
<slabity[m]>
If I have a module that has a `mkOption` being imported into my `configuration.nix`, I'd like the build to fail if the option is `null`
<slabity[m]>
How can I make a required option in a module?
2018-06-28
<slabity[m]>
Oh nevermind. Laziness got me
<slabity[m]>
`myfn = set: lib.mapAttrs (name: value: name + value) set;` and running it with `builtins.trace (myfn { name = "Test"; }) "";`
<slabity[m]>
I'm trying to debug a simple function using `mapAttrs`, but my traces just say `trace: { name: <CODE>; }`. Why is `<CODE>` appearing?
<slabity[m]>
I have a hard time groking those files, but I'll get there eventually
<slabity[m]>
Thanks infinisil
<slabity[m]>
Oh yea, that works
<slabity[m]>
`{ lib, ... }: let val = builtins.trace "Test" "test"; in { environment = val; }`
<infinisil>
slabity[m]: `lib.traceVal 10` prints 10 and returns 10
<infinisil>
slabity[m]: `builtins.trace "foo" 10` prints foo and returns 10
<slabity[m]>
I cannot seem to figure out how to use those tracing functions. 😕
<infinisil>
slabity[m]: builtins.trace a b, or lib.traceVal a
<slabity[m]>
Just for debugging purposes
<slabity[m]>
Is there a way to print a variable in my configuration.nix defined in a `let .. in`?
2018-06-27
<slabity[m]>
Oh thanks
<slabity[m]>
How is priority determined?
<slabity[m]>
What happens if I set both my options to true? What takes precedence?
<slabity[m]>
Let's say I made a second modules like my first that creates a "desktop" option, disabling power top if set to true.
<worldofpeace>
slabity[m]: The module you're making makes sense as a per-machine basis `hardware profile`.
<slabity[m]>
So lets say I have a function in a file that returns a set of configuration variables. I'd like to import them directly into my configuration without assigning it to a particular variable
<infinisil>
slabity[m]: Well it does need to come from somewhere..
<slabity[m]>
I can do `var = import ./file { args }`, but that assigns it, and `imports = [ ./file ]` doesn't allow for arguments to be passed
<infinisil>
slabity[m]: What do you mean? Do you have an example?
<slabity[m]>
Does anyone know how I can call a function inside my `configuration.nix` without assigning it to a specific variable?
2018-05-25
<slabity[m]>
Has anyone here gotten a NextCloud system deployed using NixOps?
2018-05-21
<Slabity>
`.nix-defexpr/channels` exists in both `/root`and my $HOME directory though, so that's pretty weird that it says it doesn't exist
<Slabity>
Nevermind. Looks like it's keeping the current user's $HOME
<Slabity>
Well I'm just running `sudo nixos-rebuild boot --upgrade`, so I'm assuming root's home
<Slabity>
Getting lots of `warning: Nix search path entry '$HOME/.nix-defexpr/channels' does not exist, ignoring` messages after doing that and rebuilding
<Slabity>
Is there a way to completely reset my system from scratch then? Something that would restore all of that?
<Slabity>
That makes sense.
<Slabity>
I think I might of wiped it out of habit a little while ago
<Slabity>
Oh... There's nothing in `/root`
<Slabity>
`$ ls /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/
<Slabity>
Yea, it's a symlink to its own folder
<Slabity>
2
<Slabity>
Looks like `nix-channel` just isn't listing the channels that exist for some reason.
<tilpner>
Slabity - What's the content of your NIX_PATH?
<Slabity>
If I don't have any channels in `nix-channel --list` or `sudo nix-channel --list`, then what channel does the system use when I run `sudo nixos-rebuild`?
2018-05-03
<Slabity>
boothead: Can you pastebin the error it's spitting out?
<Slabity>
Right now it says it's 3.8G, but I'd like to bump it to 6G
<Slabity>
I have `boot.tmpOnTmpfs = true;` set, but I can't find any option to adjust the size of it. Does anyone know what option may help me?
2018-04-28
<Slabity>
Nevermind with my EC2 issue. I just had a typo I couldn't find.
<Slabity>
Any idea what this could mean? I'm pretty certain my access keys are correct.
<Slabity>
Hey guys, I'm getting this error when trying to deploy an EC2 instance from NixOps: `No handler was ready to authenticate. 1 handlers were checked. ['HmacAuthV4Handler'] Check your credentials`
<slabity[m]>
Anyone know how I can override the `oraclejdk10` derivation to allow it to work with 10.0.1?
<slabity[m]>
`nix-shell -p oraclejdk10` fails, asking me to download the `jdk-10_linux-x64_bin.tar.gz` file manually from the oracle website. However, the only download available is 10.0.1, and running `nix-store --add-fixed sha256 jdk-10*tar.gz` does not seem to solve the issue.
2018-04-20
<srhb>
slabity[m]: (Which is also in a shell script, switch-to-configuration)
<srhb>
slabity[m]: From your scope I guess activate might be the most interesting part.
<srhb>
slabity[m]: No, I was surprised that first time as well. :D
<slabity[m]>
srhb: Oh, okay. I did not realize it was a shell script.
<srhb>
slabity[m]: nixos-rebuild is a quite short shell script. It might be worth going through it and asking questions to the specific steps that are not clear :)
<slabity[m]>
I'm interested in making a 'Linux From Scratch' manual that integrates Nix to make it easier for people to build.
<slabity[m]>
Is there any documentation on the internals of NixOS? I'm looking for what happens on a step-by-step level when I call `nixos-rebuild`
<clever>
Slabity: you may also need to patch the build scripts to not do that
<Slabity>
clever: Looks like it still tries to access the git repo: `fatal: unable to access 'https://github.com/mujx/matrix-structs/': SSL certificate problem: unable to get local issuer certificate`
<clever>
Slabity: you may need to chmod -R +w the src after you copy it in
<Slabity>
clever: So I managed to get the source in the correct spot (yay!) but I get a permission denied error when `fixCmakeFiles` is called: `/nix/store/{...}-cmake-3.10.2/nix-support/setup-hook: line 10: ./.thirdparty/matrix-structs/CMakeLists.txt.tmp: Permission denied`
<Slabity>
I'm trying to make a derivation for https://github.com/mujx/nheko, but I'm running into an issue where the build process tries downloading a dependency with git. What's the recommended method of doing this?
<Slabity>
Anyone know how to make a derivation for a CMake project that uses `ExternalProject`?
<Slabity>
What's the recommended method of creating a derivation for a project that automatically pulls dependencies during it's build phase? It's CMake and I'm not really sure how to deal with that
2018-03-15
<Slabity>
But that did work, thanks a lot.
<Slabity>
clever: I feel like whenever I have a question you're always the one to answer :b
<gchristensen>
slabity[m]: also include `nix-info -m`'s output in the pastebin
<slabity[m]>
clever: same issue. I'll print the full trace in a moment
<gchristensen>
slabity[m]: maybe include --show-trace and paste the whole log
<clever>
slabity[m]: what about something simple like `nix-build '<nixpkgs>' -A hello --arg config '{}'`
<slabity[m]>
clever: the only channel is nixos-unstable
<clever>
slabity[m]: or just picking an older generation in the grub menu
<srhb>
slabity[m]: You should be able to rollback by manually invoking the activation script, worst case.
<slabity[m]>
No configuration changes, just a system upgrade
<clever>
slabity[m]: what does `sudo nix-channel --list` report?
<slabity[m]>
This only started happening after I did a nixos-rebuild, and I can't seem to revert back
<slabity[m]>
Hey guys. For some reason nearly every nix action I try to perform fails with "has '' has wrong length for hash type 'sha256'"
2018-02-08
<Slabity>
I'm trying to make a custom derivation, but when my compiler can't find `linux/types.h`. I've included `linuxHeaders` as part of `buildInputs`, but that doesn't seem to do anything. Anyone know what might be the issue?
2018-01-20
<Slabity>
Then have the init system set everything up with all the symlinks necessary, with the tmpfs system being readonly.
<Slabity>
Would it be difficult to have a tmpfs as the root filesystem in a nixos system? Like only having /nix and /home on actual physical devices?
2018-01-11
<noobly>
which is a bunch of jibberish to me, but probably an important bit of info, unfortunately Slabity has left just in time lol
<noobly>
Slabity: Ok, I'll look into that immediately after hacking this together. I definately need an easier system than my existing one. I don't switch networks often but when I do it's painful
<Slabity>
noobly: +1 on using networkmanager with nmtui. It's much more convenient than rebuilding your system when you add a new access point
<Slabity>
noobly: Any information on what failed? Were you able to build your configuration?
<Slabity>
That file doesn't seem to work. Creating a nix-shell on it still results in 6.4.0
<Mic92>
Slabity: gcc6 is coming from stdenv. However I don't know, why it has priority over the rest.
<Mic92>
Slabity: if you use that file in a nix-shell, it will give your gcc the correct priority
<Slabity>
Mic92: I shouldn't even have gcc6 though. Running gcc outside of the nix-shell says command not found
<Mic92>
Slabity: it seems that gcc6 gets priority in the PATH for some reason
<Slabity>
Same with gcc7 and gcc4. It always connects me to gcc 6.4.0
<Slabity>
Anyone know why `nix-shell -p gcc5` would use gcc 6.4.0 instead of 5.x?
<Slabity>
When I run `nix-shell -p gcc5`, I get gcc 6.4.0. Does anyone else have this issue? (unstable)
2017-11-20
<slabity>
Essentially, emacs cannot find python modules that I have installed in my user profile.
<slabity>
Whenever I try to open a file with spacemacs, I constantly get "No module named 'setuptools'" error, even when I add it to my profile. How am I suppose to fix this?
2017-11-02
<slabity>
Well, the upstream version
<slabity>
Does anyone have emacs 26 working with nixos yet? I was surprised to find the unstable channel doesn't
2017-11-01
<jsgrant>
slabity: Well that's depressing for advertising themselves as somefactor of an 'open platform'.
<slabity>
And the binary blobs are only for version 3.10 of the kernel
<slabity>
jsgrant: The pinebook has closed graphics drivers. Just a heads up
<TweyII>
globin, slabity: I can't find any function that does that. Sounds like it might belong in trivial.nix, insofar as anything does
<slabity>
dj_goku: Which application?
<slabity>
globin: Thanks again, it worked perfectly.
<globin>
slabity: or x ? "default" could work too in that case
<slabity>
Just as a way to set a variable's default if it's not set yet
<slabity>
On another note, is there a shorthand for `if x == null then "default" else x`? I seem to use that a lot
<slabity>
globin: Thanks, ${name} worked perfectly
<globin>
slabity: you can do extraUsers.someusername, extraUsers."someusernamewith!specialchars" or extraUsers.${usernameFromVar}
<slabity>
So some nixos options require a custom field name, such as 'extraUsers.<name?>'. How can I specify <name?> with a variable containing a string?
2017-10-30
<hyper_ch>
slabity: restore it from backup?
<slabity>
Nevermind, it ended up being unrelated.
<slabity>
can't seem to log in with the new profile.
<slabity>
MichaelRaskin: I think so, but I'm not 100% certain. I tried generating a new config, but I can'
<MichaelRaskin>
slabity: did you edit it at all?
<slabity>
I accidentally deleted my hardware-configuration.nix. Any way I can get it from the running system somehow?
<slabity>
disasm: So I make a small default.nix like your example. I included `libxml2.dev` as a builtInput, but I still can't get the headers or library
<roni>
slabity: hopefully this all is making some sense to you :)
<slabity>
disasm: So I make a file like yours as a default.nix?
<disasm>
slabity: yeah, for building stuff, you need to use nix-shell if your manually compiling stuff
<roni>
slabity: you may need to install a dev package, something like nixos.libxml2.dev
<slabity>
Running `nix-env -iA nixos.libxml2` does not install the header or library files. Anyone know what I'm doing wrong?
2017-09-16
<sphalerite>
slabity: besides what samueldr said, you should also be able to do something like nix-env -iE 'with import <nixpkgs> {}; dwarf-fortress.override { theme = dwarf-fortress-packages.cla-theme; }'
<slabity>
I want to install "(dwarf-fortress.override { theme = dwarf-fortress-packages.cla-theme; })", but I can't figure out how to do that with nix-env
<slabity>
How do I install a package with an override using nix-env?
<slabity>
CrazedProgrammer: Yea, I've tried all that. When I launch steam the EULA window comes up, I hit accept, and then it freezes after printing a bunch of "libGL error: unable to load driver" lines
<slabity>
It works on my laptop (intel), but not my desktop (amd)
<slabity>
CrazedProgrammer: I'm launching it from the cmdline though, not the desktop file
<CrazedProgrammer>
slabity: so be sure to test if steam launches on the second time you click the desktop icon (don't forget to exit steam completely), i deleted my downloaded games a couple months ago when i had this problem and tried to fix it.
<slabity>
Does anyone here successfully use steam with an AMD gpu? Were there any tricks needed to get it set up?
2017-08-30
<slabity>
I'm trying to get a nix-shell with haskell and the parsec lib, but it keeps saying "Could not find module 'Text.Parsec'". My shell is `nix-shell -p haskell.packages.ghc821.parsec`, anyone know what I'm doing wrong?
2017-08-25
<slabity>
I would like to get ghcjs-dom working though. But I can't seem to compile even the basic hello example
<slabity>
Well, the ghcjs-react at least
<slabity>
Yea, I think I'm just gonna avoid react. It looks like it hasn't been updated in years
<pbogdan>
slabity: seems to build with nix-shell -p "haskellPackages.ghcWithPackages (pkgs: [(haskell.lib.doJailbreak pkgs.react-haskell)])" FWIW
<slabity>
apeyroux: Are you on the stable or unstable branch?
<apeyroux>
slabity: I have the same error
<slabity>
I'm curious if it's an error in the react-haskell derivation
<slabity>
Attempting to run `nix-shell -p "haskellPackages.ghcWithPackages (pkgs: [pkgs.react-haskell])"` results in "Encountered missing dependencies: void ==0.7". Does anyone else have this issue?
<slabity>
It says that it's missing the void dependency
<slabity>
When attempting to install ""haskellPackages.ghcWithPackages (pkgs: [pkgs.react-haskell])"
<slabity>
Nevermind. I did a stupid
<slabity>
Does anyone know how to install ghcjs? When I try to pull nixos.haskellPackages.ghcjs-base, it says it does not evaluate to a derivation
<slabity>
I'll take a break and come back later
<slabity>
clever: Nevermind, I actually don't even understand my own problem right now
<slabity>
I've been trying to figure out which variable to override to use 'gpg' and 'gpgv' instead
<slabity>
Well the fundamental problem I'm having is that the firefox-overlay uses the commands 'gpg2' and 'gpgv2' to validate that the nightly package
<clever>
slabity: what context is that failure happening in?
<slabity>
clever: I seem to still have an error 'attribute 'callPackage' missing'.
<slabity>
If I'm using nix-repl, how do I set it up as if I'm calling configuration.nix?
2017-08-24
<joepie91>
slabity: I haven't used buildRustPackage at all yet
<slabity>
Oh... The variable is nixpkgs.overlays, not nixpkgs.config.overlays
<slabity>
Oddly, I can't even seem to get it to fail if I put nixpkgs.config.overlays = "asdf"; or anything else ridiculous
<slabity>
Yea, I'd like to try and avoid using local checkouts
<slabity>
joepie91: Okay, so you import the rust-overlay. But why do you need to have a local copy? Why can't you use fetchFromGitHub?
<joepie91>
slabity: hm, I don't know whether that works; I personally have a copy of nixpkgs-mozilla checked into my config repo because the versions are generated from metadata anyway (afaik)
<slabity>
I'm not getting any errors or anything, but it looks like it changes nothing
<slabity>
No, I mean I'm even more confused with it being corrected
<slabity>
joepie91: Well now I'm even more confused.
<joepie91>
slabity: oh, nevermind, it has a firefox-overlay now as well
<joepie91>
slabity: confusingly, that repo contains two separate things - an overlay for Rust things, and some other form of packages for Firefox and such
<joepie91>
slabity: afaik firefox is not in the overlay
<slabity>
I am super confused on how nix overlays work. I've got nixpkgs-mozilla in my nixpkgs.overlay list, but I can't seem to access firefox-nightly-bin at all.