2021-02-16

<lordcirth__> slabity, you can have a second flake that is just for secrets
<slabity> Since flakes evaluate things purely, how can I include something impure like a file that isn't part of the repo?
<slabity> I have my NixOS config set up as a flake now. The problem is I use the `passwordFile`, but cannot include the file in the flake's repo for obvious reasons.

2021-02-10

<slabity> Ugh, nevermind. Apparently I'm doomed to understand my issues immediately after asking
<slabity> But it doesn't seem to work at all
<slabity> Apparently the 'proper workaround' to getting GTK3 working with sway is to use gsettings: https://github.com/swaywm/sway/wiki/GTK-3-settings-on-Wayland
<slabity> Anyone know why gsettings doesn't list any schemas? Running under Sway trying to fix GTK3

2021-02-08

<DigitalKiwi> where's cole-h? :( slabity qyliss through the power of redirection i have removed the warning!
<slabity> Time to never touch it ever again ever
<slabity> I think I now have everything configured as a flake now. All my configs, overlays, and even home-manager
<clever> slabity: thats for adding extra stuff into the sandbox, in addition to the normal tempdir
<slabity> Actually, I think you can add `sandbox-paths` to mount a path into the sandbox
<slabity> EdLin: By default, builds are done in a sandbox that's isolated from the filesystem
<EdLin> slabity what's a sandbox for nix?
<slabity> EdLin: I think there's a variable in `nix.conf` that you can set to change the default build directory, but it might only be for sandboxes
<slabity> clever: I have my *own* overlay directory, yes... But including other directories that my flake pulls in as inputs was the bigger issue
<clever> slabity: it can be simpler if you already have such an overlays dir in your flake
<slabity> Although I kind of just... linked every single one individually into `$out/overlays`, but whatever it works
<slabity> Thanks clever++
<slabity> I think I just got my overlays tow work as I intended
<slabity> No, wait. I'm using `nixos-rebuild --flake`
<slabity> Painfully
<slabity> matthewcroughan: Yea, I'm doing that right now
<slabity> That makes sense
<slabity> Nevermind apparently I just lagged
<slabity> Hmm... Bot is broken
<slabity> clever++
<slabity> Oh hey clevver++
<slabity> Yea, started a new shell and terminal
<clever> slabity: env variables only update if you relaunch the shell
<slabity> Strange... My $NIX_PATH did not update when I switched my NixOS configuration with `nix.nixPath` added...
<jgart[m]> <slabity "Also I would recommend using `ni"> slabity: Ok, I'll start using that. Thanks!
<slabity> It would be all local
<slabity> Also I would recommend using `nix-index` and then running `nix-locate` so that you don't need to use the bot
<slabity> You're usually going to be pulling in a lot of `xlibs.*` if that's what you're doing.
<slabity> But there's a LOT of xlibs, so not sure what the best would be
<slabity> I usually just do `xlibs.libX11` and whatever other libs I use
<slabity> I think that would work
<{^_^}> [nixpkgs] @Slabity opened pull request #112364 → Update glpaper to most recent version → https://github.com/NixOS/nixpkgs/pull/112364
<slabity> I think that's a client thing, isn't it?
<slabity> Although 90% of my matrix channels are just bridges to IRC
<clever> slabity: get off my lawn!, *shakes cane*
<slabity> That's the solution :)
<slabity> Yell at people to use matrix
<slabity> And then Matrix users don't get their nicely formatted stuff
<slabity> Is that any better? I miean, people will just click the link anyways
<slabity> Hence why you need the `nix-prefetch-git` instead, as that gives you the source
<jgart[m]> <slabity "Gives me a hash of `"sha256": "0"> I got that too :)
<jgart[m]> slabity: thank you! that works!!!
<slabity> Gives me a hash of `"sha256": "0agjx0ykvva9ayqvxc2bgsjmhkzajd7lmygg0zng1dqfhxss53v0",`
<slabity> `nix-prefetch-git https://github.com/LukeSmithxyz/st`
<slabity> `nix-prefetch-git`
<slabity> But to be fair I think flakes are still kind of in development
<slabity> jgart: If my experience is any indicator: No
<slabity> I understand none of that.
<slabity> As nice as that probably is, I don't think I have enough skill with Nix to even comprehend whatever the hell is going on in that
<slabity> Yea
<cole-h> slabity: Are you trying to get an entry in your NIX_PATH that will let you use your overlays?
<slabity> Is there no way I can just do `nixpkgs-overlays=${overlays.personal}:${(import mozilla)}`?
<slabity> I'm still confused on what `(builtins.getFlake (toString ./.)).overlays.foo` will allow me to do. I already have access to my two overlays through `overlays.personal` and `(import mozilla)`.
<slabity> Then make a PR and send it off if necessary
<slabity> jgart: Honestly I just intentionally mess up the hash, let Nix tell me the correct one, and then paste that into wherever it needs to go
<clever> slabity: a function for loading a flake from non-flake code
<slabity> `builtins.getFlake`?
<slabity> And I can't do that since it's within a flake and not a file
<slabity> clever:
<clever> slabity: there is no real way to turn the expr back into a file, so you need to start with it already in files
<slabity> So I guess the question is how can I evaluate `nixpkgs.overlays = [ ... ];` as a path to put into `nixpkgs-overlays=${evaluated_path}`
<DigitalKiwi> slabity: ^
<aleph-> clever: slabity: Thanks. Incidentally found a fun bug with nixops and the deluge service it seems.
<slabity> @alpeh-: writeTextFile
<slabity> Considering one of the outputs of a flake is `overlays`, I would expect it should
<slabity> This entire flakes thing is really starting to frustrate me. It feels like everything just got 10x more complicated and I'm not even getting any benefit
<slabity> mozilla overlay specifically
<slabity> But I'm using an external overlay
<slabity> The problem is that I'm using nix-flakes and I don't think I can access them from within my nixos-modules
<clever> slabity: it needs to eval to a path, thats best done by having all of your overlays in the form of ./overlays/foo.nix
<slabity> How can I replace `./overlays` to be the value from the `nixpkgs.overlays` though? Does that even evaluate to a path?
<slabity> That's interesting...
<clever> slabity: line 13&17 of the file i just linked
<clever> slabity: this arranges for a directory of overlays to be the system-wide default, and also (at one time) loads the overlays into nixos
<slabity> @clever: Well that sucks. Any other options besides manually adding it to /etc/nixpkgs/overlays.nix?
<clever> slabity: the overlays are only applied to the pkgs passed to nixos modules, and nothing else
<slabity> Actually, better yet, can anyone explain why setting `nixpkgs.overlays` in my NixOS configuration doesn't provide access to the overlays when I use `nix-shell` or any other nix tool?
<slabity> I'm trying to use it to set my overlays, but it doesn't seem to be working...
<slabity> Is anyone here familiar with home-manager's NixOS module?
<slabity> No problem. Kind of wish it was the default behavior
<DigitalKiwi> slabity++
<{^_^}> slabity's karma now has 2 digits!
<slabity> Just `less`
<slabity> But that's a problem for a different time.
<slabity> So that I can scroll with mousewheel and press ctrl-c without it dying
<slabity> I just wish the journalctl pager acted like my system pager
<slabity> That will at least prevent the previous boot logs from appearing
<slabity> Well definitely do `journalctl -b 0` all the time
<DigitalKiwi> slabity: it's not even useable like how am i supposed to find important messages when there are 100k warnings about broken javascript on every website...
<slabity> I absolutely loathe journalctl
<slabity> Damn. That's an impressive cliff
<qyliss> slabity: we pretty much already did: https://edef.eu/~qyliss/nix/lib/
<slabity> By fixing every single nixpkgs package
<slabity> Tell nixpkgs to stop using stdenv.lib
<slabity> So that I can set `nixpkgs.overlays` from within the NixOS configuration
<slabity> I have a nix flake that provides a NixOS configuration and an overlay. Is it possible to reference the overlay provided in the flake from within the configuration?
<slabity> See the 'allowUnfreePredicate' example
<slabity> But not for one configuration file that's imported
<slabity> matthewcroughan: For a specific package, it can be done
<slabity> Tried including 'enableDebugging = true' in the derivation, but doesn't seem to change anything
<slabity> `nix-build . -A 'glpaper'`
<slabity> How can I build a package from a local nixpkgs repo with debugging symbols and source code included?

2021-02-06

<slabity> henri: That's disappointing... I saw the 'flake.nix' in the home-manager repo and was hoping it was available now
<henri> slabity: home-manager doesn't support flakes yet
<slabity> Just looking for examples or something
<slabity> Does anyone here use home-manager with nix-flakes? I'm trying to figure out how I can migrate all my configs to flakes

2021-02-01

<slabity> For some reason I'm still getting pkg-config issues
<slabity> Is anyone able to build `vulkan-loader` on the any of the latest unstable channels?

2021-01-31

<slabity> I am even trying to use local git repo freshly cloned to build it
<slabity> Then nix-channel --update
<slabity> Yea, even completely removed them and readded
<colemickens> slabity: Did you update channels / flake inputs?
<slabity> Using `nixos-unstable-small`, which was updated just a few hours ago. Not sure why I am still having this problem
<slabity> But it was supposedly fixed 9 days ago: https://github.com/NixOS/nixpkgs/pull/108890
<slabity> When trying to build `vulkan-loader` I appear to be getting caught by this issue: https://github.com/NixOS/nixpkgs/issues/108766
<slabity> Anyone else running into this problem still?

2020-11-04

<{^_^}> [nixpkgs] @Slabity closed pull request #58370 → WIP: Add plasma-phone package → https://git.io/fjUEr

2020-11-03

<slabity> Ignoring the versions, it appears I cannot build nix-plugins with the actual `nixUnstable` package. Neither 3.0 or 2.4
<slabity> Okay... So I guess my issue specifically is why does this fail: `nix-plugins.override { nix = nixUnstable; }`
<slabity> All my hate
<manveru> slabity: so just look at the date part :)
<manveru> slabity: the version was reduced to 2.4 again recently
<slabity> `/nix/store/7jmq4igrlp1z4rzsd74rysla182vp11g-nix-2.4pre20201102_550e11f-dev/include/nix/config.hh:7:10: fatal error: nlohmann/json_fwd.hpp: No such file or directory`
<slabity> But for some reason when I try to include the `nix-plugins` file into my configuration, it tries to build Nix 2.4, which fails with the following:
<slabity> I have `nix.package = pkgs.nixUnstable` in my configuration, and I get `nix (Nix) 3.0pre20201020_e0ca98c` when I run `nix --version`
<slabity> `nixUnstable` is version 3.0, correct?

2020-11-02

<slabity> jbal: I'd recommend looking at the `dunst` service in home-manager and see if you can get info from the systemd unit it creates there
<slabity> @jbal - Yea, I'm not 100% sure how to handle that. `home-manager` says on the GitHub README that graphical services require `home-manager` to start the xserver for them to work. Not sure if that's related
<slabity> @jbal - If it's in a nix-config you will need `${dbus}/bin/dbus-launch`
<slabity> I think so
<slabity> I think you need to run it with `dbus` to get the environment loaded properly?
<slabity> Whoops
<slabity> @jbal

2020-10-30

<slabity> Can one change the priority of a package at the time you install it? The only result I can find is adding the package to an overlay, which seems like complete overkill if I just want to `nix-env` something
<slabity> Nevermind. Apparently I can kind of get what I want by setting the priority of home-manager-path
<slabity> Can anyone explain to me why I can't change the priority of a package installed with home-manager?

2020-10-17

<slabity> So I don't really have an easy way around it
<slabity> The annoying part about it is that the issue seems to be across all channels that I try, even stable ones
<infinisil> slabity: cole-h: Might be this: https://github.com/NixOS/nix/pull/3965
<slabity> Might be related to this, but that was over a month ago: https://github.com/NixOS/nixpkgs/issues/97176
<slabity> Getting `anonymous function at /nix/store/4lfg71fz84xfiqqndl2lnc45pvjsl67i-source/pkgs/build-support/fetchurl/boot.nix:5:1 called with unexpected argument 'hash'`
<slabity> Anyone else running into issues when trying to run 'nix eval' on a flake?

2020-08-18

<slabity> A bit confused on exactly what you are trying to do though
<slabity> What you are looking for is probably one of the trivial builders located in https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/trivial-builders.nix
<slabity> nij: copyPathToStore?
<slabity> Whoops
<slabity> nij:
<nij> slabity: But I want to include other files as well.. can home-manager help me on that?
<nij> slabity: Yes actually I was using home-manager for the text-based rc file.
<slabity> nij: You can, but maybe look into home-manager if you are working with configurations in your home directory

2020-08-05

<slabity> afreakk: Check if the database is there: `/nix/var/nix/profiles/per-user/root/channels/nixos/programs.sqlite`
<slabity> afreakk: Look at `programs.command-not-found` options
<slabity> The only other one I can think of is Bluebrain
<slabity> Singularity?
<slabity> Long term, it might be good to create an issue on Github stating that it doesn't install the package in systemPackages
<nature> okay, thanks slabity
<slabity> Keep the `hardware.acpilight.enable` in your config as well. That will provide udev the configs it needs
<slabity> Then you will have access to the xbacklight binary that comes from acpilight
<slabity> nature: Well for now, I'd recommend just adding acpilight to your systemPackages
<nature> slabity: any idea on how to troubleshoot this ?
<slabity> nature: I agree that it probably should provide it... But for some reason it doesn't
<slabity> Enabling `hardware.acpilight.enable` seems to provide `services.udev.packages = with pkgs; [acpilight]'` and nothing else...
<slabity> Except the acpilight's xbacklight binary is not the same as the regular xlibs.xbacklight binary
<nature> slabity: I don't have it...
<slabity> ,locate xbacklight
<slabity> acpilight package should provide the xbacklight binary
<slabity> Actually I think I might be wrong
<slabity> Or however you want to install the tool. The `acpilight` config just provides the interface for xbacklight to work
<slabity> nature: Yes. You will need to put xbacklight into your system packages
<slabity> That's interesting...
<slabity> How can I destroy my UEFI partition with this?
<slabity> Still sounds too safe
<slabity> I want something that would absolutely destroy my partitioning table if done wrong
<srhb> slabity: Oh yeah, you're right :)
<slabity> Actually I don't think `autoFormat` will do any partitioning. Just formats a filesystem onto an already created partition
<slabity> That looks like it only formats if it doesn't have a filesystem already. I don't think it would reformat anything
<slabity> jared-w: I'm not sure what you are referring to... Is it documented somewhere?
<jasom> slabity: declarative partitioning *could* work; if the effective partition table differs, you repartition. The fact that most filesystems either don't support resizing, or have significant limitations on resizing (and even when both shrinking and growing are supported it's "backup before doing this please")
<slabity> Orbstheorem: Question is... How many of those pull requests are no longer valid or duplicates?
<slabity> Let's get that to 3k+
<slabity> Those are rookie numbers
<fresheyeball> slabity: oh good call
<slabity> fresheyeball: Not sure about a switch statement, but if you just need to select an expression from a bunch of different ones, you could use a set or list
<slabity> I'm not sure I like the sound of that...
<slabity> "lossy" partitioning?
<srhb> slabity: Carefully. :)
<slabity> How would declarative partitioning work...
<slabity> bqv++ Exactly what I was looking for. Thanks
<slabity> How can I evaluate a single output of a Nix flake? Like if I have one that simply provides `ouputs = { self, ... }: { simpleOutput = 5 + 5; }`, I'd like to just get the value of `simpleOutput`

2020-08-04

<slabity> It's a list of <CODE>
<slabity> Here's an example for NFS. Look at the `rpc-gssd` module: https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/tasks/filesystems/nfs.nix
<WRMilling> Perfect, thank you chipb and slabity
<slabity> What chipb said
<slabity> wrmilling: Oh, I see. You should be able to use unitConfig.ConditionPathExists
<slabity> Unless I'm misunderstanding what you are asking
<slabity> wrmilling: `builtins.pathExists` should return true/false

2020-07-30

<slabity> 🤷‍♂️
<slabity> You guys are getting PRs approved?
<slabity> K900: PR to Github is pretty much the only thing
<makefu> slabity: {^_^} is trying to be funny again :)
<slabity> Uhh... I think I broked it
<slabity> Thanks for sharing your configs Mic92++
<slabity> Now if I had an flake that provides an overlay that provides its own `hello` package, then there should be a way for me to `nix shell` into that as well, correct?
<slabity> That would drop me into a shell with the `hello` package from `Nixos/nixpkgs`
<slabity> Well let me put it this way... Let's say I wanted to run a `nix shell` using a package (hello) from a specific nixpkgs flake (nixpkgs/master), Then I would run `nix shell github:NixOS/nixpkgs#hello`
<slabity> I think that makes sense. Though I'm confused on how to overlay is suppose to be exposed then.
<slabity> To load `wine` from this in a simple `nix shell` I need to create a completely new flake and expose it in a `devShell` or something? I can't just use it directly?
<slabity> Just to be clearer, here is my flake: https://gist.github.com/Slabity/55a854f757cccce4365965373f13a908
<slabity> I'm trying to understand this more, but that doesn't seem right... I find it hard to believe I can't grab it via something like `nix shell myflake:wine` or some other similar syntax
<slabity> So just to be clear, I have a very simple flake that produces a single ouput: An 'overlay', but even if I have the flake registered I cannot use that overlay?
<Mic92> slabity: the flake itself should expose it via apps. Than you can use nix run
<slabity> I don't get why I would need to write a new flake to use my current one. This doesn't sound like it should be too difficult
<Mic92> slabity: ideally the flake would expose those packages in the package apps or defaultApp attribute
<slabity> I have it in my `nix registry list` already. Just trying to load a single package from the overlay it provides
<slabity> Not sure what the syntax for loading a single package would be though
<slabity> I just want to do something like `nix-shell -p myflake:wine`
<Mic92> slabity: how do you load this flake?
<slabity> Mic92: That cannot be the only way though. I'm not looking to modify the flake itself. Just load a package from it
<Mic92> slabity: you can describe it in the devShell attribute
<slabity> Hey guys, I have a Nix flake that provides an 'overlay' and an 'overlays' output. How can I create a nix shell that loads with a package from that overlay?

2020-07-29

<ezemtsov> slabity I understood that it was correct to use nixos channel instead of nixpkgs and they both are missing the lib.kernel
<slabity> ezemtsov: Check `nix-channel --list` vs `sudo nix-channel --list` and see if there's a difference

2020-07-28

<slabity> Am I correct in assuming that NixOps does not support deploying NixOS flakes?
<slabity> Or is there an alternative way to deploy a NixOS machine remotely as a flake?
<slabity> Can NixOps deploy NixOS flakes remotely?
<slabity> I deploy all my machines using NixOps and would like to begin switching their configuration over to using flakes
<slabity> Does anyone know if NixOps can deploy machines that are configured as flakes?

2020-07-26

<slabity> Anyone else having issues with Steam running into SSL errors when trying to connect to anything?

2020-07-13

<gchristensen> slabity: are you here?

2020-07-10

<afreak> slabity: i defined my user like this https://kopy.io/d7GIk#zwB65DLKoAnfLm
<slabity> Just incase it's system-wide
<slabity> Also `sudo nix-channel --list`
<slabity> afreak: Do you have any channels? What does `nix-channel --list` result in?
<slabity> afreak: What does `env | grep NIX_PATH` result in?
<slabity> confus: It feels hacky because 'meta-packages' aren't really a 'thing' in Nix
<slabity> It's not worth it
<slabity> jakobrs: Just ignore it and suppress that memory
<slabity> jakobrs: Sounds like virsh (or something it calls) seems to doing a #badthing and looking for absolute paths

2020-07-09

<slabity> clever++ thanks
<clever> slabity: and then `nixops deploy -d networkname` will remember that `-I nixpkgs=/anything` for you
<clever> slabity: if you `nixops modify -d networkname deployment.nix -I nixpkgs=/anything`, it will get baked into the sqlite state
<infinisil> slabity: I think passing `-I nixpkgs=/path/to/nixpkgs` should work
<slabity> Yea, that'd probably work
<slabity> Anyone know how I can run a NixOps deployment with a local checkout of `nixpkgs`? My deployment command is `nixops deploy -d MyNetwork --include=my-system`
<slabity> Maybe try AMD?
<slabity> robodojo: You're gonna be waiting a LONG time for ATI to release a new card
<slabity> bqv: You had a grudge against wm4 as well?
<clever> slabity: *facepalm*
<KarlJoad> slabity: Coolio.
<slabity> KarlJoad: I don't believe the order matters.
<slabity> Just like the new "mpv will not run on GNOME" drama that's come up
<slabity> But hilarious
<slabity> I mean, pretty dumb idea
<slabity> That's hilarious
<slabity> Was that when they decided to use wlroots instead of wlc?
<slabity> Especially when gbm is already a good solution that integrates well with other drivers
<slabity> bqv: tbf nobody wants to support EGLstreams except maybe GNOME
<slabity> There's a config there with dual nvidia gpus with two monitors each
<slabity> Honestly the best config I can give is the one on the Arch wiki: https://wiki.archlinux.org/index.php/Multihead#Xinerama
<slabity> I can't imagine trying to get those working together
<slabity> I mean... That's probably easier than 1 nvidia and 1 amd
<slabity> KarlJoad: Did you decide whether to go the nvidia-proprietary route or the ximerama route?
<slabity> gchristensen: That should be it. Note I couldn't get any VPN software working with nmtui if you use that
<gchristensen> slabity: ^
<gchristensen> teto: thanks! (and thanks for your help the first time with anyconnect's ipsec vpn last year!) slabity: that counts! any special setup I need to do? just add gnome3.networkmanager-openconnect to networking.networkmanager.packages?
<slabity> gchristensen: I've used OpenConnect with NetworkManager... Does that count?
<emilsp> slabity: I'm trying to build nixpkgs on amd64 for arm64, so I kind of need to fiddle with buildPerlPackage it seems :/
<slabity> Assuming you are using perl-cross
<slabity> emilsp: If you're using `configure` then you should just be able to pass in a `--target=architecture` flag
<slabity> manveru: Interface names nowadays are dependent on the bus/port/whatever and should be pretty consistent as long as they don't change locations in hardware
<manveru> slabity: thanks a lot :)
<slabity> `networking.interfaces.ens5.ipv4.routes = [ { address = "169.154.169.254"; prefixLength = 32; } ];
<slabity> manveru: The <name?> is the device, isn't it?
<AlpineLlama> @slabity: yeah I just didn't enable network manager and expected it to be there for some reason... thanks for the help all good now
<AlpineLlama> @slabity: good to know thanks
<slabity> The file is auto-generated, but as long as you don't run the command to regenerate the config you can modify it without any issues
<slabity> AlpineLlama: It's okay to modify hardware-configuration.nix. And that's where you can put the kernel modules you need
<slabity> Opened up a Discourse page to possibly discuss moving `displayManager` options: https://discourse.nixos.org/t/moving-services-xserver-displaymanager-to-services-displaymanager/8051
<slabity> I thought dbus-launch, but apparently I'm wrong and that's a #BadThing
<slabity> bqv: That's the real question... I got no answer :/
<bqv> slabity: sure but what do i put in it