this post was submitted on 12 Apr 2025
28 points (100.0% liked)

Nix / NixOS

2178 readers
2 users here now

Main links

Videos

founded 2 years ago
MODERATORS
 

Hello!

I'm getting back into NixOS again and i want to refactor my config heavily. Does anyone have any tips, advice or criticism on it? TIA.

https://codeberg.org/fxomt/nixos

top 14 comments
sorted by: hot top controversial new old
[–] [email protected] 2 points 1 day ago

Well, it's certainly better than mine.

[–] rutrum 7 points 1 month ago* (last edited 4 weeks ago) (2 children)

Very exciting! You're layout looks fine as is. As it grows it might change, but for what you have now its a great schema.

On themes: catppuccin has a dedicated flake for applying the catppuccin style to a lot of different terminal apps and gnome/kde I think. I prefer this over stylix, a general purpose themer, because I want explicit control over which color scheme is enabled on each app. Stylix is cool, but doesnt make it easy (or possible?) to apply different themes to different apps.

Declarative flatpak by ~~germanbread~~ in-a-dil-emma is a nice flake. Occassionally theres a flatpak I need that isnt already packaged. This takes care of that. https://github.com/in-a-dil-emma/declarative-flatpak

If you want to work with secrets, look into sops-nix. Vimjoyer on youtube has a great video on how to get it setup.

[–] [email protected] 1 points 1 month ago (1 children)

Can you link the go repo for declarative flatpak because I can’t quiet find it

[–] rutrum 2 points 4 weeks ago* (last edited 4 weeks ago) (1 children)

It appears the original user changed their github username. The project now lives at https://github.com/in-a-dil-emma/declarative-flatpak

[–] [email protected] 1 points 4 weeks ago
[–] [email protected] 1 points 4 weeks ago (1 children)

Thanks! :D Tbh i'm not quite sure what i'd store as a secret, but I still want to implement it when i need it later. I definitely want to set up nix-flatpak since some games i use are only on there, but i'm working on that.

[–] rutrum 2 points 4 weeks ago

I enjoy beyond all reason, which is the only flatpak I have in my config XD

[–] [email protected] 5 points 1 month ago (1 children)

I’m just starting with Nix I’m going to study this XD

[–] [email protected] 1 points 1 month ago

:) feel free to, though keep in mind it's a WIP and might not have best practices.

[–] [email protected] 2 points 1 month ago (1 children)

I appreciate the way you did things. Here is mine. Mine is a bit more hierarchical, and bit more abstracted (especially in the flake), but I wouldn't say one way is better than another.

https://codeberg.org/jevans/nix-config

[–] [email protected] 7 points 1 month ago (1 children)

Thanks :)

From your config:

    # proton GE needs to be installed imperatively using protonup

    environment.sessionVariables = {
      STEAM_EXTRA_COMPAT_TOOLS_PATHS = "/home/${config.globalConfig.user}/.steam/root/compatibilitytools.d";
    };

This is not the case anymore, there's now a proton-ge package. Mine is:

  programs.steam = {
    inherit (cfg) enable;

    extraCompatPackages = with pkgs; [proton-ge-bin];

    remotePlay.openFirewall = true;
    dedicatedServer.openFirewall = true;
  };

I'll take a deeper look into your config later, it seems quite nice, i could learn something from it.

[–] [email protected] 2 points 4 weeks ago

ooo thanks! I haven't looked into that in a while

[–] adept 2 points 4 weeks ago (1 children)

Only fair that i share my abomination


TODO Theming

Have a look at stylix (my settings uses this module)

[–] [email protected] 1 points 3 weeks ago

Thanks for the recommendation and config :)