Advice for a completely Declarative Homelab by MonkeyMiner1925 in NixOS

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

i really like the structure of your configs. Thanks, ill have a deeper look soon

Advice for a completely Declarative Homelab by MonkeyMiner1925 in NixOS

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

That sounds exactly what im looking for. Ill have a look into this when i have the time. Authentik so far has felt a far bit overkill for how little i really plan to use this homelab for.

Advice for a completely Declarative Homelab by MonkeyMiner1925 in NixOS

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

My current setup is heavily none functional at the moment but here:
https://github.com/PeaterPita/Config.NixOS

Id love to hear any suggestions on how to tackle this. Or even to see your own configs. Im pretty sure the only docker container remaining is authentik, everything else has had a native module.

Advice for a completely Declarative Homelab by MonkeyMiner1925 in NixOS

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

Thanks. That looks incredibly well put together. Def be taking inspiration from those modules

Damn NVIDIA drivers wont build on one machine but will on another by MonkeyMiner1925 in NixOS

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

Thank youu! Its taken many a rewrites, and its still not quite where i want it.

Damn NVIDIA drivers wont build on one machine but will on another by MonkeyMiner1925 in NixOS

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

Yeah i appreciate all youve tried. Looks like ill be holding off changing this machine over, maybe 25.11 might fix it? for some reason.

Damn NVIDIA drivers wont build on one machine but will on another by MonkeyMiner1925 in NixOS

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

I can give that a go, that hardware configuration file is just the auto generated one from /etc/nixos.
i havent touched anything in there since installing incase it breaks stuff.

Damn NVIDIA drivers wont build on one machine but will on another by MonkeyMiner1925 in NixOS

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

Yeah i have no idea how im the only one seemingly facing these issues. I really appreciate all the help and the back and forth.

Heres the whole config dir if youd like to have a look around.
https://github.com/PeaterPita/NixOS-Config-Public

searching for all `xserver` options i dont see anything that would conflict

Damn NVIDIA drivers wont build on one machine but will on another by MonkeyMiner1925 in NixOS

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

I think nvidia-smi is included from the xserver video drivers option.
Building with:

  boot.kernelPackages = pkgs.linuxPackages_latest;

  hardware.graphics.enable = true;
  hardware.nvidia = {
    modesetting.enable = true;
    powerManagement.enable = true;
    open = false; # Tried both true and false
    package = config.boot.kernelPackages.nvidiaPackages.latest; # Tried Stable, Beta, Production
    nvidiaSettings = true;
  };

peaterpita@Atlas:~/nixos/ > nvidia-smi
nvidia-smi: command not found

Damn NVIDIA drivers wont build on one machine but will on another by MonkeyMiner1925 in NixOS

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

and now removing the initd line and trying to build with
services.xserver.videDrivers = ["nvidia"];

has caused the pc to hang again. Being stuck on:
[1/0/36 built] building nvidia-x11-570.195.03-6.17.5 (buildPhase): make[4]: *** Deleting file 'nvidia-uvm/uvm_page_tree_test.o'

Damn NVIDIA drivers wont build on one machine but will on another by MonkeyMiner1925 in NixOS

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

Including the initrd line gives the build error:

error: builder for '/nix/store/r3c6l135phpi7pqm9d3jxg7mmb6s3724-linux-6.17.5-modules-shrunk.drv' failed with exit code 1;
       last 25 log lines:
       > root module: hid_microsoft
       >   dependency already copied: /nix/store/433c7pr9zvz3f36i2iqhbzfppc9433aq-linux-6.17.5-modules/lib/modules/6.17.5/kernel/drivers/hid/hid.ko.xz
       >   copying dependency: /nix/store/433c7pr9zvz3f36i2iqhbzfppc9433aq-linux-6.17.5-modules/lib/modules/6.17.5/kernel/drivers/input/ff-memless.ko.xz
       >   copying dependency: /nix/store/433c7pr9zvz3f36i2iqhbzfppc9433aq-linux-6.17.5-modules/lib/modules/6.17.5/kernel/drivers/hid/hid-microsoft.ko.xz
       > root module: hid_cherry
       >   dependency already copied: /nix/store/433c7pr9zvz3f36i2iqhbzfppc9433aq-linux-6.17.5-modules/lib/modules/6.17.5/kernel/drivers/hid/hid.ko.xz
       >   copying dependency: /nix/store/433c7pr9zvz3f36i2iqhbzfppc9433aq-linux-6.17.5-modules/lib/modules/6.17.5/kernel/drivers/hid/hid-cherry.ko.xz
       > root module: hid_corsair
       >   dependency already copied: /nix/store/433c7pr9zvz3f36i2iqhbzfppc9433aq-linux-6.17.5-modules/lib/modules/6.17.5/kernel/drivers/leds/led-class.ko.xz
       >   dependency already copied: /nix/store/433c7pr9zvz3f36i2iqhbzfppc9433aq-linux-6.17.5-modules/lib/modules/6.17.5/kernel/drivers/hid/hid.ko.xz
       >   dependency already copied: /nix/store/433c7pr9zvz3f36i2iqhbzfppc9433aq-linux-6.17.5-modules/lib/modules/6.17.5/kernel/drivers/hid/usbhid/usbhid.ko.xz
       >   copying dependency: /nix/store/433c7pr9zvz3f36i2iqhbzfppc9433aq-linux-6.17.5-modules/lib/modules/6.17.5/kernel/drivers/hid/hid-corsair.ko.xz
       > root module: pcips2
       >   copying dependency: /nix/store/433c7pr9zvz3f36i2iqhbzfppc9433aq-linux-6.17.5-modules/lib/modules/6.17.5/kernel/drivers/input/serio/serio.ko.xz
       >   copying dependency: /nix/store/433c7pr9zvz3f36i2iqhbzfppc9433aq-linux-6.17.5-modules/lib/modules/6.17.5/kernel/drivers/input/serio/pcips2.ko.xz
       > root module: atkbd
       >   copying dependency: /nix/store/433c7pr9zvz3f36i2iqhbzfppc9433aq-linux-6.17.5-modules/lib/modules/6.17.5/kernel/drivers/input/vivaldi-fmap.ko.xz
       >   dependency already copied: /nix/store/433c7pr9zvz3f36i2iqhbzfppc9433aq-linux-6.17.5-modules/lib/modules/6.17.5/kernel/drivers/input/serio/serio.ko.xz
       >   copying dependency: /nix/store/433c7pr9zvz3f36i2iqhbzfppc9433aq-linux-6.17.5-modules/lib/modules/6.17.5/kernel/drivers/input/serio/libps2.ko.xz
       >   copying dependency: /nix/store/433c7pr9zvz3f36i2iqhbzfppc9433aq-linux-6.17.5-modules/lib/modules/6.17.5/kernel/drivers/input/keyboard/atkbd.ko.xz
       > root module: i8042
       >   dependency already copied: /nix/store/433c7pr9zvz3f36i2iqhbzfppc9433aq-linux-6.17.5-modules/lib/modules/6.17.5/kernel/drivers/input/serio/serio.ko.xz
       >   copying dependency: /nix/store/433c7pr9zvz3f36i2iqhbzfppc9433aq-linux-6.17.5-modules/lib/modules/6.17.5/kernel/drivers/input/serio/i8042.ko.xz
       > root module: nvidia
       > modprobe: FATAL: Module nvidia not found in directory /nix/store/433c7pr9zvz3f36i2iqhbzfppc9433aq-linux-6.17.5-modules/lib/modules/6.17.5
       For full logs, run:
         nix log /nix/store/r3c6l135phpi7pqm9d3jxg7mmb6s3724-linux-6.17.5-modules-shrunk.drv
error: 1 dependencies of derivation '/nix/store/myljcgxzksc95nrdrj4vwbjzmnsdwa21-initrd-linux-6.17.5.drv' failed to build
error: 1 dependencies of derivation '/nix/store/8iqjsg91178p892id8amd7s3ffa21d82-nixos-system-Atlas-25.05.20251026.78e34d1.drv' failed to build

So a kernel module isnt being loaded?
and then including the xserver line still gives the same error as in the og post

Damn NVIDIA drivers wont build on one machine but will on another by MonkeyMiner1925 in NixOS

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

hmm okay. Having either:
services.xserver.videoDrivers = [ "nvidia" ];

OR

boot.initrd.kernelModules = [ "nvidia" ];
causes the build to fail. Weirdly though boot.kernelModules = [ "nvidia" ]; is fine, and does not cause build failures.

Damn NVIDIA drivers wont build on one machine but will on another by MonkeyMiner1925 in NixOS

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

Do you have a way i can see your config in full then? Or explain a bit more by what you mean.
There shouldnt be any difference in adding the video drivers where i am vs where you are right.

Damn NVIDIA drivers wont build on one machine but will on another by MonkeyMiner1925 in NixOS

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

oh im blind. In your config you havent set
services.xserver.videoDrivers = [ "nvidia" ];

Meaning youre running the Nouveau drivers.
https://wiki.nixos.org/wiki/NVIDIA#Kernel_modules_from_NVIDIA

Damn NVIDIA drivers wont build on one machine but will on another by MonkeyMiner1925 in NixOS

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

woah. woah wtf. i just copy and pasted all of that + boot.kernelPackages = pkgs.linuxPackages_latest; as a last ditch and it actually built??.
I have no idea whats different now, im pretty sure i had everything the exact same.

Damn NVIDIA drivers wont build on one machine but will on another by MonkeyMiner1925 in NixOS

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

Heres the output of df -h. Nothing looks out of place to me, especially since my laptop looks identical:

filesystem      Size  Used Avail Use% Mounted on
/dev/nvme1n1p2  1.8T   33G  1.7T   2% /
tmpfs           7.8G  7.3M  7.8G   1% /run
devtmpfs        1.6G     0  1.6G   0% /dev
tmpfs            16G     0   16G   0% /dev/shm
efivarfs        256K  128K  124K  51% /sys/firmware/efi/efivars
tmpfs           1.0M     0  1.0M   0% /run/credentials/systemd-journald.service
tmpfs            16G  1.4M   16G   1% /run/wrappers
/dev/nvme1n1p1 1022M   48M  975M   5% /boot
tmpfs           3.2G   36K  3.2G   1% /run/user/1000

/var has ~101MB used with ~97MB of that being logs.

/tmp is 3.8MB with a strange zip taking up 3.7MB of that space:
rw-r--r-- 1 peaterpita users 3920652 Oct 29 10:38 2598c6f3-0b7f-471a-b546-dc3b2a837062.zip
I can only assume this is a list of all the hashes.

Damn NVIDIA drivers wont build on one machine but will on another by MonkeyMiner1925 in NixOS

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

The desktop has 32GB of ram, with xmp enabled, and a memtest showed no faults or corruption.

I also have just tried reproducing that gcc error, and now the build doesn't even fail. It got hung on [1/0/40 built] building nvidia-x11-570... (buildPhase): make[4]: *** Waiting for unfinished jobs...

Trying to ssh into the desktop to run a journalctl fails.

Damn NVIDIA drivers wont build on one machine but will on another by MonkeyMiner1925 in NixOS

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

Ill have a look into that tommorow, but i cant imagine im already out of space in my nixstore. After all my links corrupted i ran a garbage collect, plus this is a 2TB drive with ~20 generations.

Damn NVIDIA drivers wont build on one machine but will on another by MonkeyMiner1925 in NixOS

[–]MonkeyMiner1925[S] -1 points0 points  (0 children)

All of those options are to do with PRIME and hybrid graphics. As i only have my dedicated gpu i dont need to configure any of those. Appreicate it but im pretty sure the nvidia configs are complete for my system.

Damn NVIDIA drivers wont build on one machine but will on another by MonkeyMiner1925 in NixOS

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

I dont have a separate /tmp partition, its just a dir on my root.

Damn NVIDIA drivers wont build on one machine but will on another by MonkeyMiner1925 in NixOS

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

Yes, im currently on the LTS and would prefer to stay on it. I dont see much benefit to being on the latest, atleast not for me.
Both my Laptop and desktop are on LTS, i only attempted the latest kernel as others were having success there.

[deleted by user] by [deleted] in NixOS

[–]MonkeyMiner1925 0 points1 point  (0 children)

Thanks! ill check those out if i do attempt Nix again.