Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hi, how you do fresh install? #2

Open
osv opened this issue Feb 3, 2023 · 10 comments
Open

Hi, how you do fresh install? #2

osv opened this issue Feb 3, 2023 · 10 comments
Assignees

Comments

@osv
Copy link

osv commented Feb 3, 2023

Hi! I found your video https://www.youtube.com/watch?v=t8ydCYe9Y3M and I have questions.

  1. Can you give example how you usually do new setup on pc?
  2. Do you plan to add some secrets support? (There are many ways, like private repo, etc, but interesting what do you plan to use)

Thanks

@jakehamilton
Copy link
Owner

Hey @osv!

I think those would be super helpful! I do plan on covering NixOS installation in the future and would be happy to show how easy it is with the right tools. Though, I don't currently have a strategy for managing secrets that I like. Most solutions require too much manual work so I'll probably hold off on that until I have a better answer.

@jakehamilton jakehamilton self-assigned this Feb 3, 2023
@osv
Copy link
Author

osv commented Feb 3, 2023

Agree. For exampl private repo for secrets. During installation you need to have access to private repo. You need setup keys for accessing private repo. Maybe not hard to do this manual work, but main cons of private repo - your secret config structure is hidden, and no one able to reproduce your setup without pain of manually recreate hidden structure of private repo (and not encrypted password even in private git repo is also looks weird for me)

@tqwewe
Copy link

tqwewe commented Feb 17, 2023

I also am trying to do this but struggling to build the flake. My PC hostname is ari, so I tried cloning this repo down, and running cp -r ./systems/x86_64-linux/bismuth ./systems/x86_64-linux/ari, and then sudo nixos-rebuild build --flake .#, but I get the following error:

✦ ❯ sudo nixos-rebuild build --flake .#
building the system configuration...
warning: Git tree '/home/ari/dev/tqwewe/config' is dirty
error: flake 'git+file:///home/ari/dev/tqwewe/config' does not provide attribute 'packages.x86_64-linux.nixosConfigurations."ari".config.system.build.toplevel', 'legacyPackages.x86_64-linux.nixosConfigurations."ari".config.system.build.toplevel' or 'nixosConfigurations."ari".config.system.build.toplevel'

@jakehamilton
Copy link
Owner

Hi @tqwewe, it looks like you might not have added your new files to git. Since Nix Flakes can only use files that are tracked by git, you'll want to run this from the root of the repository:

git add .

@tqwewe
Copy link

tqwewe commented Feb 17, 2023

Thanks! I got it working in the end, but it turned out my monitor would no longer turn on after rebooting 🤦‍♂️
I ended up reinstalling from scratch, but also am in the process of creating my own nix flake using snowfall

@ahaxu
Copy link

ahaxu commented Feb 20, 2023

im getting this error:

$ sudo nixos-rebuild build --flake .#lk

building the system configuration...
warning: Git tree '/home/lk/nixconfig/config' is dirty
error: hash mismatch in fixed-output derivation '/nix/store/bfx63i49zcgllyxk6qag4cqfdkmcr49z-README.md.drv':
         specified: sha256-8sYW8h4WiC1NfpZ5J1ZO+qNxb03L/c437ctLPyr2l5g=
            got:    sha256-Pkp5hbkP1DympuIfV9Q2Tr3clJayJVM2mVRr6IlttZI=
error: 1 dependencies of derivation '/nix/store/7wicm6cl59yd2zn5rqp9hxm2r89462a3-home-manager-files.drv' failed to build
error: 1 dependencies of derivation '/nix/store/ki2640lnx64n2h4n5bl9mmlyfy3gg8pk-yubikey-guide.drv' failed to build
error: 1 dependencies of derivation '/nix/store/k28wl0lkl2bhdck57c7bf3rm7vdvih52-home-manager-generation.drv' failed to build
error: 1 dependencies of derivation '/nix/store/ihlxj62xp4shs84pib0zvbbjwsqrqmgm-yubikey-guide.desktop.drv' failed to build
error: 1 dependencies of derivation '/nix/store/rkjb8jdplib2qi22x7w6xz0shs3gb90c-system-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/j0gb9m16j71dxv5ijjz6767vfa7f9ndk-unit-home-manager-short.service.drv' failed to build
error: 1 dependencies of derivation '/nix/store/8rxra7p2akb644q0k488qql7ssr8aj5c-nixos-system-lk-22.11.20230122.ab12540.drv' failed to build

any idea how to fix this? thank you so much.

@tqwewe
Copy link

tqwewe commented Feb 20, 2023

im getting this error:

$ sudo nixos-rebuild build --flake .#lk

building the system configuration...
warning: Git tree '/home/lk/nixconfig/config' is dirty
error: hash mismatch in fixed-output derivation '/nix/store/bfx63i49zcgllyxk6qag4cqfdkmcr49z-README.md.drv':
         specified: sha256-8sYW8h4WiC1NfpZ5J1ZO+qNxb03L/c437ctLPyr2l5g=
            got:    sha256-Pkp5hbkP1DympuIfV9Q2Tr3clJayJVM2mVRr6IlttZI=
error: 1 dependencies of derivation '/nix/store/7wicm6cl59yd2zn5rqp9hxm2r89462a3-home-manager-files.drv' failed to build
error: 1 dependencies of derivation '/nix/store/ki2640lnx64n2h4n5bl9mmlyfy3gg8pk-yubikey-guide.drv' failed to build
error: 1 dependencies of derivation '/nix/store/k28wl0lkl2bhdck57c7bf3rm7vdvih52-home-manager-generation.drv' failed to build
error: 1 dependencies of derivation '/nix/store/ihlxj62xp4shs84pib0zvbbjwsqrqmgm-yubikey-guide.desktop.drv' failed to build
error: 1 dependencies of derivation '/nix/store/rkjb8jdplib2qi22x7w6xz0shs3gb90c-system-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/j0gb9m16j71dxv5ijjz6767vfa7f9ndk-unit-home-manager-short.service.drv' failed to build
error: 1 dependencies of derivation '/nix/store/8rxra7p2akb644q0k488qql7ssr8aj5c-nixos-system-lk-22.11.20230122.ab12540.drv' failed to build

any idea how to fix this? thank you so much.

I also had this problem. You need to regenerate the hash for this readme file using curl ... | sha256...
I'm on my phone now so i can't really provide much more info, but if you're in the NixOS discord server, here's some more context: https://discord.com/channels/568306982717751326/790886215532150815/1076007863249551440

@jakehamilton
Copy link
Owner

The sha mismatch should be resolved with this commit: 479b825

I switched it to use flake inputs instead of calls to fetchurl.

@jakehamilton
Copy link
Owner

Hey @osv 👋

You mentioned secret support a little while ago and, while I don't think this is a great answer, I've ended up implementing Vault and Vault Agent to manage secrets. It's still a bit tedious, but I think it's the best option currently available.

@danielnbalasoiu
Copy link

Hi @tqwewe, it looks like you might not have added your new files to git. Since Nix Flakes can only use files that are tracked by git, you'll want to run this from the root of the repository:

git add .

Hi @jakehamilton ,

After a loot of research, I decided on using your config files, so thank for your work and help!

I trying to add a test machine, but I'm having the same error as @tqwewe had:

[nixu@orion:~/nixos-config-jakehamilton]$ nixos-rebuild dry-run --flake .#
building the system configuration...
error: flake 'git+file:///home/nixu/nixos-config-jakehamilton' does not provide attribute 'packages.x86_64-linux.nixosConfigurations."orion".config.system.build.toplevel', 'legacyPackages.x86_64-linux.nixosConfigurations."orion".config.system.build.toplevel' or 'nixosConfigurations."orion".config.system.build.toplevel'

I run git add . as suggested and even commited my changes, but without success.

What am I missing? Can you please point me to the right direction, please?

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants