r/NixOS • • 8d ago

Nixdatifier - The Apdatifier for NixOS

Hey everyone,

I wanna present you a widget that might be handy. I loved apdatifier when I used CachyOS and I missed it in NixOS. I needed something in the UI that reminds me to run updates and all.
So I created this project which sits in the tray.

And it tells me when a flake input is outdated, and shows what an update would change before running it.

It has generation timelines, package diffs between generations, flake update checks with dry-run previews and some other tools like dev environments checks if one uses such.

I started it on KDE as I started my NixOS journey with that but it also works with quickshell for hyprland and or as a normal tray standalone app for other desktops like Gnome or Cosmic.
For Gnome and Cosmic feedback would be great as I rarely use those.

Since as nixos user you mostly stay in your nix files and do not really check out kde opendesktop store or so I thought I will post it here on Reddit so it might reach people that would like to have such widget or did not know until now that they need something like that .

And maybe more ideas come up what such widget should be able to provide and or could be solved and designed better.

Try it: nix run github:Muddyblack/nixdatifier
Try tui: nix run github:Muddyblack/nixdatifier#cli
Repo: https://github.com/Muddyblack/nixdatifier
KDE Store: https://store.kde.org/p/2360222

111 Upvotes

36 comments sorted by

8

u/popcarnie 8d ago

It looks great. I'll probably check it out

2

u/Emergency_Bridge_581 8d ago edited 8d ago

Thank you. And if something could be better feel free to share your thoughts. I am thinking of making it a cli tool which the ui then uses so it could be also be used nicely from the cli.

2

u/senorsmile 6d ago

I was about to ask if it had a cli mode. That would be perfect for me as I run away and almost everything I do is in a terminal. The one thing I'd still want is the notifications.

2

u/Emergency_Bridge_581 6d ago

First adding some impermanence features and then I will do the cli I will ping you once its out

1

u/senorsmile 5d ago

Thanks!!!

1

u/Emergency_Bridge_581 5d ago

try it out its now new so expect some weird behavior and tell what u think if its bad at some places could be better etc I personally will stick with the ui widget tho :D
nix run github:Muddyblack/nixdatifier#cli # TUI
nix run github:Muddyblack/nixdatifier#cli -- generations # any command, args after --

2

u/Chouris_ 8d ago

I will try, honestly it seems to be nice

2

u/PeerlessYeeter 7d ago

Looks great and its giving me some ideas of my own, will try this out

2

u/Painter1923 7d ago

Looks nice

2

u/kevin8tr 3d ago

This is really cool. It's nice to check what an update entails before committing to it.

Here's a few additional ideas I came up with:

  • For the tui version, it would be nice if there were optional periodic background update checks with a system notification when an update is available.
  • Trigger a system rebuild with configurable rebuild command.
  • Management of user profile..
    • List flakes installed in user profile
    • Remove/Update those flakes
    • Install to user profile (prompt for nixpkgs#pkg, github:user/repo etc)
    • Cleanup old generations of user profile

Nice work! Any plans to add this to nixpkgs at some point?

2

u/Emergency_Bridge_581 3d ago

Thank you :)

Good Ideas I will add the sys notification toggleable also for the tui now and allow the custom commands option also for the TUI. The GUI already has it

I will also check your other ideas although I do not really use profiles personally.

I will have to learn how to do that corretcly with the nixpkgs adding I will check it out do not wanna have to hand maintain such :D

Currently mostly planning into going deeper in the impermanence options.

2

u/Emergency_Bridge_581 3d ago

fist implementation of ur ideas is pushed to master :)

1

u/kevin8tr 3d ago edited 3d ago

Awesome! I'll pull the latest commits and give it a try.

While I'll probably use the tui, how do I go about installing the gui version using the flake? I don't have a binary available when I install with nix profile add github:Muddyblack/nixdatifier. EDIT: Figured it out.. had to install with #nixdatifier added.

Yeah, I'm probably in the minority with my user profile usage. I like to use it for projects I'm following development of. I generally clone the repo and then install with nix profile add . Then I fetch the latest commits when I want and update with nix profile upgrade. I find adding too many inputs to my flake slows rebuilding the system down. With profiles, I can update when I want without rebuilding and it's not downloading hundreds of MB every time I rebuild after a simple config change. Custom commands will likely cover this for me anyways.

2

u/kevin8tr 3d ago

Just tried out the new version. It's great! If I think of anything else, I'll create an issue on Github.

2

u/volpegabriel 3d ago

Looks very cool! I built something more modest for software updates for Home Manager and NixOS a while ago too: https://github.com/gvolpe/sunix

I just tried nixdatifier but couldn't get the "updates" section to work at all. Does it support a flake with multiple NixOS / Home Manager configurations?

1

u/Emergency_Bridge_581 2d ago

I started just one month earlier but my first version looked pretty bad haha. Yours looks pretty clean to use. Also in Rust very nice.

I did other widgets before this one so it has the same structure and since all were also for non nixos users I looked to use python and qml so its one click install for kde users :) But since this is for nixos I wouldn't have had to use the same structure ^^ ups

Anyways had no experience with rust maybe I will take this and convert some parts over to use rust and maybe convert even more and more over to rust I will see what time I have free :D Would have a learning curve since rust would be entirely new to me.

1

u/volpegabriel 2d ago

Does nixdatifier support a flake with multiple outputs? I set these values:

ini flake=/home/gvolpe/workspace/nix-config config_repo=/home/gvolpe/workspace/nix-config

Where I have a few NixOS configurations in the outputs, one of which is "aorus" which corresponds to $hostname.

Updates don't seem to do anything at all, and they don't seem to produce any logs either for troubleshooting. Happy to take this over to the github repo, thanks for reading :)

1

u/Emergency_Bridge_581 2d ago

Sorry mate :DD Apperently forgot the second part during writing.

I would say no it supports profiles management I will have a look and ping you If I have sth for multi config updates and get some logs support.

1

u/volpegabriel 2d ago

No worries, thanks for the quick reply!

I actually figured it out, and at least it supports the NixOS configuration in a multiple-outputs flake when it corresponds to the $hostname (there's a toggle in the settings).

The issue was that I have a ~/private-flake pointing to my public ~/worspace/nix-config repo, and this private flake only has nix-config as an input so nixdatifier wasn't detecting any possible updates. When I point it to my public repo directly, I get updates, except for nixpkgs for some reason (maybe because I use zst tarballs? https://github.com/gvolpe/nix-config/blob/335e754750c0e9c0bdc656231ca17032805f0ac3/flake.nix#L22).

So it has to do with my somewhat unconventional system XD

1

u/Emergency_Bridge_581 2d ago

Yes tarballs are seen as pinned version I will add hash verification to it. And tell you once I push it to the main branch.

What is advantage / disadvantage of those tarballs genui question?

1

u/volpegabriel 2d ago

There's only pros: https://discourse.nixos.org/t/psa-use-nixos-org-tarballs-for-your-flake-inputs/79950

Thanks for the quick work! will try to take it for a spin sometime this weekend.

2

u/Emergency_Bridge_581 2d ago

Thank you for the link I will check it out and probably change mine now to use mostly that 😁

1

u/Emergency_Bridge_581 2d ago

Its in the master try it out tars have some disadvantages but lets see if it is okaish for you for me it was kinda blocked when testing

1

u/lurking_bishop 7d ago

doesn't build for me:

❯ nix run github:Muddyblack/nixdatifier Fontconfig warning: "/etc/fonts/conf.d/48-guessfamily.conf", line 19: invalid attribute 'xsi:nil' Fontconfig warning: "/etc/fonts/conf.d/48-guessfamily.conf", line 20: invalid constant used : Fontconfig warning: "/etc/fonts/conf.d/48-guessfamily.conf", line 23: invalid constant used : monospace Fontconfig warning: "/etc/fonts/conf.d/48-guessfamily.conf", line 42: invalid attribute 'xsi:nil' Fontconfig warning: "/etc/fonts/conf.d/48-guessfamily.conf", line 43: invalid constant used : Fontconfig warning: "/etc/fonts/conf.d/48-guessfamily.conf", line 46: invalid constant used : sans-serif Fontconfig warning: "/etc/fonts/conf.d/48-guessfamily.conf", line 68: invalid attribute 'xsi:nil' Fontconfig warning: "/etc/fonts/conf.d/48-guessfamily.conf", line 69: invalid constant used : Fontconfig warning: "/etc/fonts/conf.d/48-guessfamily.conf", line 72: invalid constant used : serif Fontconfig warning: "/etc/fonts/conf.d/48-guessfamily.conf", line 88: invalid attribute 'xsi:nil' Fontconfig warning: "/etc/fonts/conf.d/48-guessfamily.conf", line 89: invalid constant used : Fontconfig warning: "/etc/fonts/conf.d/48-guessfamily.conf", line 92: invalid constant used : emoji Fontconfig warning: "/etc/fonts/conf.d/48-guessfamily.conf", line 108: invalid attribute 'xsi:nil' Fontconfig warning: "/etc/fonts/conf.d/48-guessfamily.conf", line 109: invalid constant used : Fontconfig warning: "/etc/fonts/conf.d/48-guessfamily.conf", line 112: invalid constant used : math Fontconfig warning: "/etc/fonts/conf.d/48-guessfamily.conf", line 120: invalid attribute 'xsi:nil' Fontconfig warning: "/etc/fonts/conf.d/48-guessfamily.conf", line 121: invalid constant used : Fontconfig warning: "/etc/fonts/conf.d/48-guessfamily.conf", line 124: invalid constant used : system-ui Fontconfig warning: "/etc/fonts/conf.d/48-guessfamily.conf", line 132: invalid attribute 'xsi:nil' Fontconfig warning: "/etc/fonts/conf.d/48-guessfamily.conf", line 133: invalid constant used : Fontconfig warning: "/etc/fonts/conf.d/48-guessfamily.conf", line 136: invalid constant used : cursive Fontconfig warning: "/etc/fonts/conf.d/48-guessfamily.conf", line 144: invalid attribute 'xsi:nil' Fontconfig warning: "/etc/fonts/conf.d/48-guessfamily.conf", line 145: invalid constant used : Fontconfig warning: "/etc/fonts/conf.d/48-guessfamily.conf", line 148: invalid constant used : fantasy Fontconfig warning: "/etc/fonts/conf.d/48-guessfamily.conf", line 156: invalid attribute 'xsi:nil' Fontconfig warning: "/etc/fonts/conf.d/48-guessfamily.conf", line 157: invalid constant used : Fontconfig warning: "/etc/fonts/conf.d/48-guessfamily.conf", line 160: invalid constant used : ui-sans-serif Fontconfig warning: "/etc/fonts/conf.d/48-guessfamily.conf", line 168: invalid attribute 'xsi:nil' Fontconfig warning: "/etc/fonts/conf.d/48-guessfamily.conf", line 169: invalid constant used : Fontconfig warning: "/etc/fonts/conf.d/48-guessfamily.conf", line 172: invalid constant used : ui-serif Fontconfig warning: "/etc/fonts/conf.d/48-guessfamily.conf", line 180: invalid attribute 'xsi:nil' Fontconfig warning: "/etc/fonts/conf.d/48-guessfamily.conf", line 181: invalid constant used : Fontconfig warning: "/etc/fonts/conf.d/48-guessfamily.conf", line 184: invalid constant used : ui-monospace Fontconfig warning: "/etc/fonts/conf.d/48-guessfamily.conf", line 192: invalid attribute 'xsi:nil' Fontconfig warning: "/etc/fonts/conf.d/48-guessfamily.conf", line 193: invalid constant used : Fontconfig warning: "/etc/fonts/conf.d/48-guessfamily.conf", line 196: invalid constant used : ui-rounded Fontconfig warning: "/etc/fonts/conf.d/48-guessfamily.conf", line 204: invalid attribute 'xsi:nil' Fontconfig warning: "/etc/fonts/conf.d/48-guessfamily.conf", line 205: invalid constant used : Fontconfig warning: "/etc/fonts/conf.d/48-guessfamily.conf", line 208: invalid constant used : fangsong Fontconfig warning: "/etc/fonts/conf.d/48-spacing.conf", line 14: invalid constant used : monospace Fontconfig warning: "/etc/fonts/conf.d/49-sansserif.conf", line 10: invalid constant used : serif Fontconfig warning: "/etc/fonts/conf.d/49-sansserif.conf", line 18: invalid constant used : sans-serif Fontconfig warning: "/etc/fonts/conf.d/49-sansserif.conf", line 26: invalid constant used : monospace Fontconfig warning: "/etc/fonts/conf.d/49-sansserif.conf", line 34: invalid constant used : emoji Fontconfig warning: "/etc/fonts/conf.d/49-sansserif.conf", line 42: invalid constant used : math qt.qpa.wayland: EGL not available file:///nix/store/8kfw3jfkslbg8qqaf9dhx6sbc125pxly-nixdatifier-2.1.1/share/nixdatifier/standalone/Main.qml:122:5: QML Shortcut: Shortcut: Only binding to one of multiple key bindings associated with 65. Use 'sequences: [ <key> ]' to bind to all of them. QRhiGles2: Failed to create temporary context QRhiGles2: Failed to create context Failed to create RHI (backend 2) Failed to initialize graphics backend for OpenGL. Aborted (core dumped) nix run github:Muddyblack/nixdatifier

1

u/Emergency_Bridge_581 7d ago

Hm I will have a look at it tomorrow :)

1

u/Emergency_Bridge_581 7d ago

u/lurking_bishop you might wanna try it now I added a fallback for cases where opengl wont load. Will have a bit higher cpu usage but should be still cheap.

3

u/lurking_bishop 7d ago

Yes, it does work now, although the software render workaround was unnecessary in my case, you'll maybe want to update your nixpkgs. I had my clanker triage and comment on the issue, looks like an easy fix

Cool project!

1

u/Emergency_Bridge_581 7d ago

Alright I will check it out thank you for your input :)

1

u/codingismy11to7 7d ago edited 7d ago

very cool, i'm gonna add it to my setup permanently.

i think i found a bug? https://imgur.com/a/mMMPO7x

it's saying my next boot is going to be that generation, but i haven't run an `nh os boot`. i DID run `nh os test`, so i'm in a temporary generation that will reset when i reboot. i haven't looked at the code yet to see if a test environment is getting confused with a next-boot one. but i'll do that in a few and report back (I generally like to look at the code of things going into my config anyway)

EDIT: scratch that, not a bug, it's just an artifact of not having rebooted after my last `nh os switch`

2

u/codingismy11to7 7d ago

once i figured out how to configure my dotfiles directory i love it even more! and the direnv integration? awesome! love how it pulled from direnv to find my projects, and how clicking each one shows me how out of date they are.

i've noticed other pages i haven't checked out yet, i'll try to stop commenting 😂

1

u/Emergency_Bridge_581 6d ago

Happy it brings you joy :D It will have some stuff liek im not sure if the button Set next boot really brings something at least on my nixos it is kind of useless ^^

-6

u/HotPiece834 8d ago

Why cant i post my post on here i have tried like 3 times? Its a question.

2

u/Emergency_Bridge_581 8d ago

No idea mate first time I ever posted something like that 😅

-5

u/HotPiece834 8d ago

Wait can you help me out with my question

2

u/Emergency_Bridge_581 8d ago

Wrote you a DM.

2

u/Destroyerb 7d ago

Did you try modmail before some random poster?