danielphan2003 / flk

Cold and spike-y ─ a perfect place to build your dotfiles from the ground up!
MIT License
26 stars 1 forks source link

any updates? #1

Open luxus opened 2 years ago

luxus commented 2 years ago

hi, i found your config by accident :D i'm very impressed by it and saw your note that you need to update the documentation. (its already cool that it exist in such a complex config) are you still planing it? and did you really changed nothing in the last 2 month? :D

danielphan2003 commented 2 years ago

Hi! Thanks for the compliments. flk is currently going under a rewrite to follow https://github.com/divnix/hive conventions. Quite a lot of things have changed, so here is a non exhaustive list:

Now that you mentioned it, I usually push new changes every two months since I made so many changes and I use a Yubikey to sign my commit, so I tend to push all the changes as a single commit to save the hassle.

Worry not, I have been close to finalise the tree to the point where I can confidently push the upcoming changes to main branch. In the meantime I will try to push the unfinished changes to a separate tree as https://github.com/danielphan2003/flk/tree/22.11 (the .11 isn't actually November, I just followed Nixpkgs's upcoming stable branch name, which is release-22.11). After that, I will continue to std-ify the tree until it can be deployed with Colmena and usable in nix repl, at which it will be merged into main branch.

luxus commented 2 years ago

Hello daniel, Thanks for this detailed answer. And I'm very happy about it :D I try to answer, but English is not my native tongue that I only will see updates every two months is quite sad :( But I can understand.

At the moment, I use my fork of https://github.com/Misterio77/nix-config

Looking forward to your config; maybe I will rewrite mine and for yours. I learn a lot about nix by dissecting configs and changing them to my needs. Flakes and digga / std are complex beasts that are easier to understand with good examples, at least for me.

stuff that I need to add to my fork of your config looking forward to your WIP tree.

br kai

luxus commented 2 years ago

Do you know when you will add the experimental branch? I want to rework my config and hope for some inspiration and base :)

danielphan2003 commented 2 years ago

I'm currently still doing some major reworks after seeing https://github.com/GTrunSec/cells-lab, but for now I will upload the zip file here

danielphan2003 commented 2 years ago

Places of interest are cells/nixos/*, cells/home/*, cells/flk/hosts/* and cells/flk/users/*

luxus commented 2 years ago

haha GTrunSec already made me rewriting my config already 1 time .. so i know how you feel :D any timeframe when you will be done with the major rework?

luxus commented 1 year ago

are you still working on this?

danielphan2003 commented 1 year ago

There has been little progress been made to finalize the APIs and std cells since I can only work with this at weekends. I'm sadly not actively planning things out because of my uni life, and rethinking https://github.com/divnix/digga into std takes more time than I had originally thought.

That said, I will upload the code later since finishing this alone would be possible, but having some help from https://github.com/divnix/hive and the DivNix's Matrix chat would surely get the job done faster.

Update: the changes are up! Hope you find it useful even though it's a big wip.

luxus commented 1 year ago

nice i will check it right now :D

luxus commented 1 year ago

oh nice update :D how useable is it now?

danielphan2003 commented 1 year ago

oh nice update :D how useable is it now?

Pretty much everything works, including custom channel for each host as well as your own overlays and packages are also available. This wouldn't be possible without https://github.com/divnix/hive, but in order to pass specialArgs to nixos module ({profiles, suites, inputs, self, ...}) I had to fork it at https://github.com/danielphan2003/hive/tree/evalConfigArgs. My flake outputs with hive are almost exactly the same as when I used digga (nixos or home{,Portable}Configurations, pkgs, packages etc.) except for packages where I think I have to use exportPackages from https://github.com/gytis-ivaskevicius/flake-utils-plus.

You can use https://github.com/zhaofengli/colmena instead of nixos-rebuild and deploy-rs. Note that hive's generated {colmena,nixos}Configurations has a form of {cell}-o-{target} so you have to specify that in your command. For example, I have a cell called themachine, and I also have a {colmena,nixos}Configurations file that has a themachine attrs, so I run sudo colmena apply-local --target themachine-o-themachine. I might open an issue about this in hive to simplify things.

luxus commented 1 year ago

The first moment, I was a little confused that I saw so many digga "references". i have some Linux machines and servers. But my main Computer is a Mac, does it supports darwinConfigurations?

danielphan2003 commented 1 year ago

The first moment, I was a little confused that I saw so many digga "references".

No worries. If you were to take any repo built with digga and run nix flake show, the output would be similar to mine, which is why I'm replacing digga in the first place.

Being built on std, it makes sense to unify how and where to look for type-specific dotfiles such as NixOS's vs. Darwin's vs. Home Manager's hosts/users/modules/profiles etc, instead of relying on passing framework-specific inputs so that the framework can do its job while limiting options for any outputs other than that framework outputs.

i have some Linux machines and servers. But my main Computer is a Mac, does it supports darwinConfigurations?

You can adapt https://github.com/danielphan2003/hive/blob/evalConfigArgs/make-mead.nix so that it uses Darwin-specific modules or builder instead. See how I used it to generate the output for nixosConfigurations at my flake.nix. I don't have any Mac but I think hive would love to see an implementation for this.

luxus commented 1 year ago

i guess you patched something here locally? https://github.com/danielphan2003/flk/blob/e3e6197677355fea5f816126f60086c62bf2e344/flake.nix#L78

luxus commented 1 year ago

You can adapt danielphan2003/hive@evalConfigArgs/make-mead.nix so that it uses Darwin-specific modules or builder instead. See how I used it to generate the output for nixosConfigurations at my flake.nix. I don't have any Mac but I think hive would love to see an implementation for this.

okay I will work on makeCider for darwin :D

luxus commented 1 year ago

i run into this error asciicast

danielphan2003 commented 1 year ago

i guess you patched something here locally? https://github.com/danielphan2003/flk/blob/e3e6197677355fea5f816126f60086c62bf2e344/flake.nix#L78

Ah yes, the changes are available at https://github.com/danielphan2003/devos-ext-lib/tree/std

luxus commented 1 year ago

yeah i just updated the source 1 minute before you posted :D but the error is still the same :( sorry to bother you with my problems I think it has todo with the fact that I entered the directory on darwin edit: looks like it works fine in linux builds fine but I get the next error when I try to launch std

error: attribute 'default' missing

       at /nix/store/74zk8l7g93zh1y48iilw9nzgcx7cjz30-cells/flk/overlays.nix:30:21:

           29|
           30|     devos-ext-lib = inputs.devos-ext-lib.overlays.default;
             |                     ^
           31|
(use '--show-trace' to show detailed location information)
2022/11/29 23:43:37 exit status 1
danielphan2003 commented 1 year ago

yeah i just updated the source 1 minute before you posted :D but the error is still the same :( sorry to bother you with my problems I think it has todo with the fact that I entered the directory on darwin edit: looks like it works fine in linux builds fine but I get the next error when I try to launch std

error: attribute 'default' missing

       at /nix/store/74zk8l7g93zh1y48iilw9nzgcx7cjz30-cells/flk/overlays.nix:30:21:

           29|
           30|     devos-ext-lib = inputs.devos-ext-lib.overlays.default;
             |                     ^
           31|
(use '--show-trace' to show detailed location information)
2022/11/29 23:43:37 exit status 1

Fixed with latest commit in flk

LiGoldragon commented 1 year ago

Hi! I'm also impressed by your nix code. Not a lot of people are using std. You will probably like kriomOS when it's ready. How can we get in touch? I use matrix, check my links. I can read your horoscope if you want on my astrology podcast, or we can talk on my coding podcast, or just chat. Cam Eun! :wink: