templates
nixos-fhs-compat
templates | nixos-fhs-compat | |
---|---|---|
10 | 7 | |
365 | 51 | |
3.6% | - | |
6.0 | 0.0 | |
26 days ago | over 1 year ago | |
Nix | Nix | |
MIT License | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
templates
-
What does the function `nixpkgs.lib.nixosSystem` do?
Unless you want to handwire something together or use another higher level function from some 3rd party library, your want to use this function. It is basically the entrypoint to a flake based nixos system configuration. See https://github.com/NixOS/templates/blob/master/simple-container/flake.nix for an example.
- Would it make sense to start a repo which contains some "standard" flake.nix files for various types of projects?
- Have you convinced anyone to use Nix or NixOS? Friends? Coworkers?
-
Why can't things "just work" on NixOS?
There are some templates on the official repository. https://github.com/NixOS/templates You can find others on github.
-
Big list of Flakes tutorials
Don’t forget about the official templates. Built right into the CLI https://github.com/NixOS/templates
-
Nix flake --impure segfaults
I am new to nix, and even newer when it comes to using flakes. I was trying out the following simple flake (based on this template), which just terminates with a segmentation fault whenever I use --impure flag (e.g. nix develop --impure)
-
Help me understand how to install something that isn't in the official nixpkgs
You would probably want to use flakes. There is NixOS/templates repo with flake templates. Take a look at go-hello one.
-
I created a super simple flake.nix template so you can finally use python painlessly in your nix projects. Just copy a few lines over into your flake.nix and you can use all of PyPi :)
You should consider adding this as a template to https://github.com/nixos/templates.
- Have you heard of NixOS/template?
nixos-fhs-compat
-
Why can't things "just work" on NixOS?
You can, in theory, use https://github.com/balsoft/nixos-fhs-compat for this.
-
Arch + NixOS at once?
There's also nix-alien to run random binaries and nixos-fhs-compat to FHS your OS (might need some tweaking).
- The Curse of NixOS
-
Containers with easy graphics acceleration?
Thanks, it was fun working with containers in NixOS! I tweaked the config a little bit so that the DISPLAY variable is automatically set and I also added nixos-fhs-compat's modules so that the guest OS uses FHS. Overall, a very slick setup if you want to run GPU-accelerated software quickly or what to do software development in a more traditional environment.
-
Way to install apps in their own FHS environment.
There's buildFHSUserEnv as the proper way to run those apps, and there's also a massive hack that I don't really recommend using on your host: https://github.com/balsoft/nixos-fhs-compat . If you want to use it, do it with something similar to this: https://github.com/balsoft/kalinix/blob/master/scripts/run-container and then run your vscode/android studio/etc inside that container. The final option is to just run another distro with docker or lxc, set up X11/Wayland passthru to it and run stubborn applications that way.
-
Do we need an alternative to the Filesystem Hierarchy Standard?
The root filesystem only contains two FHS-y symbolic links by default: /bin/sh and /usr/bin/env (and some /etc stuff that is hardcoded in some applications and wasn't considered to be worth patching). All the other files are kept in non-FHS-compliant locations (/nix/var/nix/profiles/per-user/*/default and /run/current-system/sw or /nix/var/nix/profiles/system). This means, for example, that binaries from other Linux distros won't run unless they have been statically compiled with musl (because there's no dynamic linker at /lib/ld-linux.so.2). There's this hack courtesy of Matthew Bauer that links stuff to FHS locations: https://github.com/balsoft/nixos-fhs-compat , but it's not supported upstream and it doesn't change how all the internal Nix stuff works, it's only a wrapper to allow running FHS and LSP-reliant binaries.
What are some alternatives?
nix-templates - Nix Flake templates for various languages
distrobox - Use any linux distribution inside your terminal. Enable both backward and forward compatibility with software and freedom to use whatever distribution you’re more comfortable with. Mirror available at: https://gitlab.com/89luca89/distrobox
nix-flake-templates
nix-alien - Run unpatched binaries on Nix/NixOS
pypi-deps-db - Dependency DB for python packages on pypi
nixos-shell - Spawns lightweight nixos vms in a shell
mach-nix-template - Simple and straight-forward way to create python environments using PyPi in nix
kalinix - A pentesting/CTF toolbox with the help of Nix
nix-template - Make creating nix expressions easy
nixpkgs - Nix Packages collection & NixOS
nixos - My system configuration