Open osv opened 1 year ago
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.
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)
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'
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 .
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
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.
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
The sha mismatch should be resolved with this commit: https://github.com/jakehamilton/config/commit/479b8250451413e8b09c5661181c30b383d2357e
I switched it to use flake inputs instead of calls to fetchurl
.
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.
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!
Hi! I found your video https://www.youtube.com/watch?v=t8ydCYe9Y3M and I have questions.
Thanks