Hacker Newsnew | past | comments | ask | show | jobs | submit | cole-h's commentslogin

It is very degraded in my experience: actions that would take 5-10 minutes to run are now taking 20-30 (and spinning for a long time before even showing any logs, until at some point the action logs are made visible).

ETA: and also they sometimes randomly fail with no logs at all.


The most obvious example is that using the installer in the quick start enables the flakes and nix-command features automatically, even though they are still considered experimental by upstream.


I'd also suggest that, once you _do_ feel comfortable enough to step foot into NixOS territory, that you start off by version-controlling your configuration. It doesn't necessarily have to be public, but I've found it very helpful in the past when I've had to debug various issues due to misconfiguration by me.


Do you symlink your config repo to /etc/nixos or something else? So far, I've just been rsyncing my config repo folder after I modify it.


I don't; my config lives in ~/flake, and I run `nixos-rebuild ... --flake ~/flake` whenever I update it.


You don't have to specify the nixosConfiguration name (e.g ~/flake#my-configuration)? Do you just name it "default" or something for that to work? I've never tried that.


Exactly as Macha said, if you name the attribute `nixosConfiguration.<hostname>`, `nixos-rebuild` will look for that attribute implicitly; you can still specify another configuration if you're e.g. in a VM or a live image.


You name it the same as your current system's hostname.


Oh, I had no idea. I was actually already doing that. Guess I was just being extra verbose on the command line.


You can actually put your NixOS config anywhere. Assuming you're not using flakes, `nixos-rebuild` finds the config through NIX_PATH:

grahamc@scruffy:~/ > echo $NIX_PATH

nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos:nixos-config=/etc/nixos/configuration.nix:/nix/var/nix/profiles/per-user/root/channels

you can change the `nixos-config` value to point to somewhere else, or call it like this:`nixos-rebuild -I nixos-config=./configuration.nix`


I use an update script that overrides that location to $(pwd), and also uses nvd to print a package diff for the update. Among a few other niceties. With flakes, that's a regular nixos-rebuild flag; otherwise it's an envvar.

/etc/nixos is just the default, there's a number of ways to set your own path. One of the simplest might be to put "import /home/wherever" as the sole contents of configuration.nix.


That sounds like a nice little workflow; I might have to incorporate something like that with `nvd`...

Though, it should be said that `import /home/wherever` might not work if you switch to / use flakes, as that is likely outside of the flake's git repo (and thus impure).


Yeah, I symlink `/etc/nixos/configuration.nix` to my git repo. (I do keep a `hardware-configuration.nix` which isn't version controlled. I probably should add version-control at some point but for now it is simple enough to copy around and maybe make some minor tweaks).


You can also use `git init --separate-git-dir=~/something /etc/nixos` to keep the git data in your user directory while the config remains in the default location. I like this solution because it keeps the stuff I want to do as root (configuring the system) separate from what I want to do as regular user (tracking changes of the configuration).


Really? I searched for `filename:home.nix` (which brought me to https://github.com/search?utf8=%E2%9C%93&q=filename%3Ahome.n...). That seems site-wide to me, unless I'm misunderstanding you.


These kind of keywords really should be next to the search box with a question mark next to them or something.

TIL some of them are on this page that you only see if you search for an empty string:

https://github.com/search?q=

Click on 'prefixes'. This kind of thing should be readily available from any search box that searches through GitHub.


That's awesome. I didn't know about the keyword filename: I've been using the button to the left of "Clone or Download" this whole time. Thanks for the info!


I don't see any Rust source code on its GitHub: https://github.com/lobsters/lobsters.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: