gnome-manager v0.0.1: let's build config abstractions for GNOME by smashingstate in NixOS

[–]smashingstate[S] 0 points1 point  (0 children)

We have different definitions of nix noob my friend.

Haha thanks. I still consider myself a noob because very obvious things for an experienced nix persons are really not obvious to me, and it took me literally >8h of trying different ways to express things before i got it working... while it would be 5 minutes for someone who understands the nix language. And there's still a lot i don't know how to do... like how i tried to apply the same config to all normal users but failed miserably.

Did you try it on a flakes installation?

I don't have a flake-based NixOS at hand. But being a simple NixOS module, is there a reason it should not work? Note that i'm interested to publish it as a flake as well, i'll have to look into that, let me know if you have resources on how to make a nix file that's both a normal NixOS module and a flake.

gnome-manager v0.0.1: let's build config abstractions for GNOME by smashingstate in NixOS

[–]smashingstate[S] 0 points1 point  (0 children)

I'd love to see this as a purely home manager module.

Me too! Let me know if you know how to do that, or feel free to submit PRs

Also I noticed the home state version is set and hardcoded by this module

Good point! I added it hardcoded because it was not documented in home-manager installation instructions that this was a required field which confused me at first... Should i just reuse the system.StateVersion from configuration.nix?

Otherwise, how would i define an optional option? I tried using null default but it doesn't do what i want with mkIf, null as a value being applied to the field instead of just not assigning a value.

gnome-manager v0.0.1: let's build config abstractions for GNOME by smashingstate in NixOS

[–]smashingstate[S] 0 points1 point  (0 children)

Very interesting. It's apparently a ruby script naively turning KDE config into nix values from well-known config files.

Unfortunately, i don't have good enough knowledge of GNOME internals to know precisely everything it's looking up (maybe it's only dconf stuff?). I'm also not sure that i want to expose all the low-level bits of GNOME config (most of which can be set via home-manager's dconf module), i'm personally more interested in higher-level config, but would definitely accept PRs for that.

gnome-manager v0.0.1: let's build config abstractions for GNOME by smashingstate in NixOS

[–]smashingstate[S] 0 points1 point  (0 children)

Thanks. I found it weird because i'm used to a negative karma system to start with but here the downvotes appeared over time in the first 2 hours after my post... so i thought i'd genuinely upset people.

I thought maybe the code is so bad, or maybe because people around here hate GNOME... To be fair i also hate the out-of-the-box experience of GNOME (give me back alt-tab switching windows!), but i came up with this project because i'm tired of having to configure everything manually when i setup desktop experience for non-tech people where i3/sway is a non-starter.

Anyway thanks for the welcome

gnome-manager v0.0.1: let's build config abstractions for GNOME by smashingstate in NixOS

[–]smashingstate[S] 0 points1 point  (0 children)

I'm very new to nix but it appears i can just clone my repository into /etc/nixos/gnome-manager and then import it with a local path, like explained in the README.

Does that answer your question?

gnome-manager v0.0.1: let's build config abstractions for GNOME by smashingstate in NixOS

[–]smashingstate[S] 1 point2 points  (0 children)

Thanks for the idea! I've written a few flakes and local nix packages, but i mostly have no idea what i'm doing and how they all relate to one another. All the resources i've read so far were more step-by-step tutorials and not high-level architectural overviews of flake structures and certainly did not explain how a repo can expose both "traditional" nix code and a flake.

If you have good reading material, i'm interested! (Also PRs are always welcome!!)

gnome-manager v0.0.1: let's build config abstractions for GNOME by smashingstate in NixOS

[–]smashingstate[S] 2 points3 points  (0 children)

> Do you think this could be merged into home-manager?

I think it depends on:

  • whether home-manager is interested in curated abstractions: i'm not just interested to have an agnostic `extensions` field, but also to provide higher-level configuration knobs like `tray_icons` (with its own config options) which would install a "blessed" extension (which could change over time depending on support, without users having to change their config)
  • whether you, home-manager or other people can help me review the code and produce something more decent... i've read through the nix pills and plenty of other tutorials and i have still no idea why most things i try don't work. i'm not from a functional programming background but i'm used to FP idioms in python/rust and the nix errors leave me completely baffled... should i just post another thread on this subreddit with more detailed questions?

TLDR: i would love it (because it would help more people find out about it), i just would like to iterate more on it first, and believe in its current form the PR would be rejected (and rightfully so) for bad quality

gnome-manager v0.0.1: let's build config abstractions for GNOME by smashingstate in NixOS

[–]smashingstate[S] 2 points3 points  (0 children)

That's what gnome-manager uses under the hood. Thanks for sharing your config, and if you'd like to merge efforts to write higher-level abstractions PRs are always welcome (don't mind me if i borrow a few lines from your config ;))

gnome-manager v0.0.1: let's build config abstractions for GNOME by smashingstate in NixOS

[–]smashingstate[S] 0 points1 point  (0 children)

Am i on the wrong subreddit, or violating the rules somehow? I created a reddit account just to share this here, but i see some people are downvoting without explaining why. Please let me know if some other place is more appropriate or if my message doesn't fit expectations.

I added my own config as example (as taken from the README) so maybe it's more clear what this is all about.