Icy-Thought / snowflake

A repository which contains my current Nix (flake-based) setup!
GNU Affero General Public License v3.0
180 stars 13 forks source link

Flake does not provide attribute error #22

Closed godspeed1709 closed 1 year ago

godspeed1709 commented 1 year ago

Using the final command and replacing '.#conf-name' with '.#{my-device-name}' gets the error:

flake 'git+file:///root/Snowflake does not provide attribute 'packages.x86_64-linux.nixosConfigurations."{my-device-name}".config.system.build.nixos-rebuild'.... and more

I'm really new to this.. but I loved your setup.. so wanted to replicate it. I'm sorry if this was a noob mistake that could've been solved easily.

Icy-Thought commented 1 year ago

Do not apologize about being a noob/not being able to navigate properly in an unfamiliar environment! Clearly, I am the one at fault for not being able to explain how to replicate my setup.. (apologies)

I reply within a couple of hours (busy atm) and update the README.md to become more informative. :)

But for now, it appears as if you did not input the correct value in .#{my-device-name}. It should be the hostname of your device, which in my case is .#thinkpad-e595.

godspeed1709 commented 1 year ago

Thank you so much for replying even though you're bz.. I'd like to add that I've input the correct name.. being my device name.. i just didn't wanna disclose it and hence in the curly brackets

I have used .#workstation as the replacement which is also the folder name where your copied default.nix and my hardware-configuration.nix is.

I seemed to have worked around it by copying the entire Snowflake folder contents into another folder and hence run the same command, but, kmonad seems to have an issue of not being of the type 'path'.

IMG_2023-02-04-13-12-13-706

Icy-Thought commented 1 year ago

Crap my bad.. I should've mentioned that you ought to place the snowflake directory in git/icy-thought/snowflake (or modify where options point to) for other issues to be resolved..

Excluding that issue, what is the value of kmonad.deviceID in your host config? If you copied my thinkpad-e595 host then it should be placed in hosts/thinkpad-e595/hwCfg.nix in L76

Do note that the KMonad config I am using atm does nothing but add an extra functionality to tab & caps, where

  1. hold-tab -> C-M-A- insert-key
  2. hold-cap -> M-A- insert-key

If you are not interested in that, just disable the module all-together.

godspeed1709 commented 1 year ago

My hardware-configuration.nix doesn't seem to have any kmonad.deviceID as this is the one generated by nixos-generate-config

Icy-Thought commented 1 year ago

Nope, that is what I had placed inside my own hardware-configuration.nix. That's why it's not there.

I tend to keep hardware-related configurations inside hwCfg.nix, which is as of now a combo between: custom modules + nix services + hardware-configuration.nix.

godspeed1709 commented 1 year ago

Mann.. I loved your config and really wanted to try it but it seems I'm cursed with ignorance regarding nix as every nix-flake dotfiles that I've tried as of yet have failed :(

If you can walk me through as to what I should do next I would love to try again.. but for now I may need to change to some other distro.

PS: Thank you again for your time

Icy-Thought commented 1 year ago

I understand your frustration! The reason to why you are confused at the moment is due to diving into an unknown territory without having basic nix knowledge.

My suggestion is:

  1. Install nix from the installation iso and retain the basic configuration setup + add the necessary packages for your daily tasks.
  2. Start reading about the nix language and nix-flakes. a. Packaging simple applications/themes/scripts can be useful for familiarizing yourself with the language!
  3. Start writing simple nix flakes for simple projects.
  4. Get inspired by other projects or use the projects you want to replicate.

I would've loved to help you get it up and running, but the issue is that I am living on cellular data atm in a rather awkward place. So I won't be able to guide you for the next 3 months..

Otherwise, list what is not working for you and I'll try to help you get them up and running! :)

godspeed1709 commented 1 year ago

What you've written here is more than enough help.

I'll work on it as you've said and meanwhile switch to a hyprland artix rice that I liked.

PS: Should i close this issue?

Icy-Thought commented 1 year ago

Glad that it provided some form of help and I apologize for not being able to help beyond this stage.. :/

Otherwise, have a nice day!