NotAShelf / nyx

My overengineered NixOS flake. Desktops, laptops, servers and everything else that can run an OS.
https://nyx.notashelf.dev/
GNU General Public License v3.0
292 stars 8 forks source link

Un-abstract the configuration #20

Closed NotAShelf closed 10 months ago

NotAShelf commented 11 months ago

As pointed countless time before, my configuration is overly abstracted in favor of it making sense to me. Might consider compromising on it making sense and follow certain nix principles.

Patterns I will not follow:

1. abusing lib.nixosSystem

hostName = nixpkgs.lib.nixosSystem {
    modules = [
        ../modules/desktop/foo.nix
        ../modules/desktop/bar.nix
        ../modules/hardware/baz.nix
        ../home/notashelf       
    ];
};

Simply a very ugly way of structuring my hosts, which I have many of. At this point, abstractions start seeming nice.

2. whatever this is

# configuration.nix
imports = [
    ../modules/desktop/foo.nix
    ../modules/desktop/bar.nix
    ../modules/hardware/baz.nix
    ../home/notashelf
];

Declaring modules and importing them at host level (as in each hosts's own configuration.nix) forces me to play mental gymnastics with capabilities of each host.

image

In short, nuh uh.

NotAShelf commented 10 months ago

Fuck it, I'll abstract it even more than before.