!UUqahLbShAYkkrXmKs:matrix.org

DevOS

39 Members
Seeking help and geeking out together on https://github.com/divnix/devos & https://github.com/divnix/digga10 Servers

Load older messages


SenderMessageTime
12 Aug 2021
@timdeh:matrix.org@timdeh:matrix.orgThat's what nixpkgs.overlays does under the hood19:26:59
@timdeh:matrix.org@timdeh:matrix.org so nixos has a nixpkgs.pkgs option where you can just build the global pkg set and it will be passed in to every module. Home-manager doesn't seem to have this, but it does have nixpkgs.config and nixpkgs.overlays, which would be applied to the underlying package set and passed in to every module as pkgs 19:27:56
@d4hines:matrix.orgd4hines I get dependency injection but this seems convoluted. It also seems purely conventional - its' just convention that the prop called nixpkgs.overlays gets picked up by home-manager, applied to nixpkgs, and the result is passed to each module, right? 19:30:35
@d4hines:matrix.orgd4hinesAm I missing a piece, or is it something I get used to as I go along?19:32:27
@ultranix:matrix.orgultranixI still don't understand how to add profiles/suites to a home.users.<user> in flake.nix, 19:32:53
@timdeh:matrix.org@timdeh:matrix.orgare you already familiar with how to use them for nixos? it should be basically the same19:34:22
@d4hines:matrix.orgd4hines
In reply to @ultranix:matrix.org
I still don't understand how to add profiles/suites to a home.users.<user> in flake.nix,
I'm not sure if this example would be helpful to you but here's I'm doing it https://github.com/d4hines/devos/blob/hope/flake.nix#L103
19:34:26
@d4hines:matrix.orgd4hines
In reply to @timdeh:matrix.org
so basically the way you have it now, you could just add a nixpkgs.overlays = [ self.overlay ]

The wiki lists overlay as a valid attribute of flakes; however, I'm getting this error:

error: flake 'git+file:///home/d4hines/repos/beth' has an unsupported attribute 'overlay', at /nix/store/9cdyiyw5333969j5rhyrc3112kl2wkcv-source/flake.nix:4:3
19:37:06
@d4hines:matrix.orgd4hineshttps://nixos.wiki/wiki/Flakes#Output_schema19:37:21
@d4hines:matrix.orgd4hinesOh, it's an attribute of the output object19:38:08
@timdeh:matrix.org@timdeh:matrix.org oh yes, I didn't notice that. The top-level attributes in a flake.nix should only be description inputs outputs and nixConfig. 19:39:52
@yusdacra:nixos.devyusdacra
error: builder for '/nix/store/2hazs71krc2dkcc6qh6iq2cf46h7a4bm-nix-2.4pre20210802_47e96bb.drv' failed with exit code 1;
       last 10 log lines:
       > Hunk #6 succeeded at 496 (offset 8 lines).
       > Hunk #7 succeeded at 512 (offset 8 lines).
       > Hunk #8 succeeded at 531 (offset 8 lines).
       > 1 out of 8 hunks FAILED -- saving rejects to file src/libexpr/flake/flake.cc.rej
       > patching file src/libexpr/flake/flake.hh
       > Hunk #2 succeeded at 124 (offset 4 lines).
       > patching file src/libfetchers/fetchers.hh
       > patching file src/libfetchers/path.cc
       > patching file tests/flakes.sh
       > Hunk #2 succeeded at 686 (offset -56 lines).
       For full logs, run 'nix log /nix/store/2hazs71krc2dkcc6qh6iq2cf46h7a4bm-nix-2.4pre20210802_47e96bb.drv'.
19:40:08
@timdeh:matrix.org@timdeh:matrix.org outputs being the meat of it 19:40:11
@yusdacra:nixos.devyusdacrai'm getting this with latest nixpkgs-unstable19:40:17
@yusdacra:nixos.devyusdacrai guess the patches are out of date now19:40:24
@timdeh:matrix.org@timdeh:matrix.org I think the patches are only for the nix in the shell though right David Arnold (blaggacao) 19:41:01
@timdeh:matrix.org@timdeh:matrix.orgI just updated nix to master since I recently merged a version bump and it's working on my system. Even with nix-dram applied19:41:34
@yusdacra:nixos.devyusdacrahmm19:41:49
@yusdacra:nixos.devyusdacrai think i can build the system fine19:42:19
@yusdacra:nixos.devyusdacraits just the devshell19:42:23
@blaggacao:matrix.orgDavid Arnold (blaggacao)
In reply to @d4hines:matrix.org
Right. I want to do this without libraries first, then refactor as necessary.
I empathically understand the impetus. However, if you ask me, it might be easier the other way round.. 🙂
19:44:06
@kraftnix:matrix.org@kraftnix:matrix.org
In reply to @ultranix:matrix.org
I still don't understand how to add profiles/suites to a home.users.<user> in flake.nix,

if you are using master, you should have some suites under home.importables.suites, then you reference these in a user under ./users/kraftnix/default.nix or ./users/kraftnix.nix and do something like

  home-manager.users.kraftnix = { suites, ... }: {
    imports = with suites; base ++ tokyo-night;
    ...
  };

where the above pulls in a suite I have called base and tokyo-night, at least that's how I use user profiles

19:44:36
@timdeh:matrix.org@timdeh:matrix.org
In reply to @yusdacra:nixos.dev
i think i can build the system fine
yeah, it's just used in the shell because of the follows bug. Hopefully they merge that PR soonish so we can remove the patches all together
19:45:51
@blaggacao:matrix.orgDavid Arnold (blaggacao)
In reply to @ultranix:matrix.org
I still don't understand how to add profiles/suites to a home.users.<user> in flake.nix,
you might also have a complementary look at: https://github.com/divnix/digga/tree/main/examples -- they are very minimal.
19:46:35
@kraftnix:matrix.org@kraftnix:matrix.orgi was not aware digga had that section, nice19:48:06
@ultranix:matrix.orgultranixthanks. some of the examples had removed home-manager.users.<user> from the users/<user>/default.nix and replaced it with just the username. so its confusing19:48:07
@blaggacao:matrix.orgDavid Arnold (blaggacao)
In reply to @d4hines:matrix.org

The wiki lists overlay as a valid attribute of flakes; however, I'm getting this error:

error: flake 'git+file:///home/d4hines/repos/beth' has an unsupported attribute 'overlay', at /nix/store/9cdyiyw5333969j5rhyrc3112kl2wkcv-source/flake.nix:4:3
flakes only have a weak schema. some attrs are better known than others. any attribute is fine. none has magic semantics beyond a bit of cli ux sugar
19:48:25
@kraftnix:matrix.org@kraftnix:matrix.org
In reply to @ultranix:matrix.org
thanks. some of the examples had removed home-manager.users.<user> from the users/<user>/default.nix and replaced it with just the username. so its confusing
yeah first I was looking in digga/devos for an example like how I manage my own users, and found the default root/nixos users don't do it like I do
19:48:52
@timdeh:matrix.org@timdeh:matrix.org
In reply to @blaggacao:matrix.org
flakes only have a weak schema. some attrs are better known than others. any attribute is fine. none has magic semantics beyond a bit of cli ux sugar
yes but this is only true for the outputs schema. An unexpected attribute in the top-level will result in an evaluation error
19:49:21
@blaggacao:matrix.orgDavid Arnold (blaggacao)
In reply to @yusdacra:nixos.dev
error: builder for '/nix/store/2hazs71krc2dkcc6qh6iq2cf46h7a4bm-nix-2.4pre20210802_47e96bb.drv' failed with exit code 1;
       last 10 log lines:
       > Hunk #6 succeeded at 496 (offset 8 lines).
       > Hunk #7 succeeded at 512 (offset 8 lines).
       > Hunk #8 succeeded at 531 (offset 8 lines).
       > 1 out of 8 hunks FAILED -- saving rejects to file src/libexpr/flake/flake.cc.rej
       > patching file src/libexpr/flake/flake.hh
       > Hunk #2 succeeded at 124 (offset 4 lines).
       > patching file src/libfetchers/fetchers.hh
       > patching file src/libfetchers/path.cc
       > patching file tests/flakes.sh
       > Hunk #2 succeeded at 686 (offset -56 lines).
       For full logs, run 'nix log /nix/store/2hazs71krc2dkcc6qh6iq2cf46h7a4bm-nix-2.4pre20210802_47e96bb.drv'.
Is that the follows patch? -- let me know..
19:49:40

Show newer messages


Back to Room ListRoom Version: 6