9 ms·
If you like Nix than probably try GNU Guix [1] and if possible use Guix System on server side. This is one of the most modern development in operating systems.
by dragonsh 7y ago
If you like Nix than probably try GNU Guix [1] and if possible use Guix System on server side. This is one of the most modern development in operating systems.
In the modern security conscious world where most companies run their workloads on virtual machines controlled by other companies, it's imperative that applications are deployed on such predictable, secure and reproducible operating systems.
Guix supports transactional upgrades and roll-backs, unprivileged package management, and more. When used as a standalone distribution, Guix supports declarative system configuration for transparent and reproducible operating systems.
I still think Amazon, Google and Azure will take a decade or two to build and offer something like this to it's customers. Indeed Google's Fuschia is trying to do the same, but I feel it's at least a decade away.
It has one of the best wonderful documentation [2] to get started and explore with all the details.
[1] https://guix.gnu.org/ https://guix.gnu.org/
[2] https://guix.gnu.org/manual/en/html_node/ https://guix.gnu.org/manual/en/html_node/
- ozataman 7y agoIf I could trouble you for the common discourse here, would you mind summarizing why one may prefer to use Guix in the place of Nix? They seem to be based on the very same ideas and Guix even admits to being inspired by Nix.
- kragen 7y agoScheme instead of a bespoke programming language, and more focus on reducing the bootstrap set that compromises the goal of reproducibility shared by both systems.
- svd4anything 7y agoBut the bespoke language has some benefits. It’s concise and specifically designed for the problem. Also Nix has more contributors and that is very important to have a large collection of recipes to start from.
- Koshkin 7y agoScheme, being a Lisp, is exceptionally well-suited to serve as a base for DSLs.
- svd4anything 7y agoOk I’ll give another reason. Nix community is more relaxed and doesn’t downvote just because they don’t like some comment or somebody disagrees with them.
- celticmusic 7y agoI bet you the irony of your downvotes is lost on the people downvoting.
- svd4anything 7y agoFor sure they are pilling on ... for what I don’t get. Relax people.
- kragen 7y agoYes, Scheme is a bit verbose for my taste.
- catalogia 7y agoThere are obviously some differences between the two, but I'm not really perceiving any real verbosity gap between the two, one way or the other. Here is a guix package declaration for tmux: [Edit: fixed indentation] (define-module (gnu packages tmux) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix build-system gnu) #:use-module (guix build-system trivial) #:use-module (gnu packages) #:use-module (gnu packages bash) #:use-module (gnu packages libevent) #:use-module (gnu packages ncurses)) (define-public tmux (package (name "tmux") (version "3.0a") (source (origin (method url-fetch) (uri (string-append "https://github.com/tmux/tmux/releases/download/" version "/tmux-" version ".tar.gz")) (sha256 (base32 "1fcdbw77nz918f7gqc1ga7zlkp1g112in1h8kkjnkadgnhldzlaa")))) (build-system gnu-build-system) (inputs `(("libevent" ,libevent) ("ncurses" ,ncurses))) (home-page "https://tmux.github.io/") (synopsis "Terminal multiplexer") (description "tmux is a terminal multiplexer: it enables a number of terminals (or windows), each running a separate program, to be created, accessed, and controlled from a single screen. tmux may be detached from a screen and continue running in the background, then later reattached.") (license license:isc))) Here is (roughtly) the equivalent in Nix: { stdenv, fetchFromGitHub, autoreconfHook, ncurses, libevent, pkgconfig, makeWrapper }: let bashCompletion = fetchFromGitHub { owner = "imomaliev"; repo = "tmux-bash-completion"; rev = "fcda450d452f07d36d2f9f27e7e863ba5241200d"; sha256 = "092jpkhggjqspmknw7h3icm0154rg21mkhbc71j5bxfmfjdxmya8"; }; in stdenv.mkDerivation rec { pname = "tmux"; version = "2.9a"; outputs = [ "out" "man" ]; src = fetchFromGitHub { owner = pname; repo = pname; rev = version; sha256 = "040plbgxlz14q5p0p3wapr576jbirwripmsjyq3g1nxh76jh1ipg"; }; nativeBuildInputs = [ pkgconfig autoreconfHook ]; buildInputs = [ ncurses libevent makeWrapper ]; configureFlags = [ "--sysconfdir=/etc" "--localstatedir=/var" ]; postInstall = '' mkdir -p $out/share/bash-completion/completions cp -v ${bashCompletion}/completions/tmux $out/share/bash-completion/completions/tmux ''; meta = { homepage = http://tmux.github.io/; description = "Terminal multiplexer"; longDescription = '' tmux is intended to be a modern, BSD-licensed alternative to programs such as GNU screen. Major features include: * A powerful, consistent, well-documented and easily scriptable command interface. * A window may be split horizontally and vertically into panes. * Panes can be freely moved and resized, or arranged into preset layouts. * Support for UTF-8 and 256-colour terminals. * Copy and paste with multiple buffers. * Interactive menus to select windows, sessions or clients. * Change the current window by searching for text in the target. * Terminal locking, manually or after a timeout. * A clean, easily extended, BSD-licensed codebase, under active development. ''; license = stdenv.lib.licenses.bsd3; platforms = stdenv.lib.platforms.unix; maintainers = with stdenv.lib.maintainers; [ thammers fpletz ]; }; }
- dragonsh 7y agoGuix is a GNU project which underpins today’s largest eco-system of OS, utilities, tools, apps and language related work. It has larger community as well. So although it’s inspired by Nix, I personally will chose it as it has evolved quickly and if you look at all three aspects Guix, Guix System and documentation it’s now better than Nix. Also last but not the least I work with emacs lisp, so I feel at home with Guile Scheme so I will prefer Guix over Nix. Personally I will like Nix also to flourish and being a non GNU project it will be able to provide closed source proprietary packages which is not part of core Guix. I think a healthy competition between the two is good, and whichever gets popular is overall good for advances in OS eco-system. Guix System is a new OS, not just package manager. But by making Guix package manager available to other systems, it might move people who see benefits to move to transactional, predictable, secure OS like NixOS or Guix System.
- XMPPwocky 7y ago> Guix is a GNU project which underpins today’s largest eco-system of OS, utilities, tools, apps and language related work. It has larger community as well. To be clear, this is talking about the entire GNU project compared to just Nix? All metrics I can find show Nix's adoption is significantly above that of Guix. https://news.ycombinator.com/item?id=16490027 https://news.ycombinator.com/item?id=16490027 seems like a pretty interesting comment on the benefits of Guix, albeit old.
- xena 7y agoI actually tried guix several times, and for my trouble I got my tmux sessions (and random processes on my box) killed on a box with 32 GB of ram. #guix on freenode was confused. I intend to wait until guix is a bit more stable on Ubuntu.
- CameronNemo 7y agoGuix is technically interesting, but as a fsf endorsed distro it makes running common hardware a challenge. Are there linux-antilibre packages out there for guix?
- _emacsomancer_ 7y agohttps://gitlab.com/nonguix/nonguix https://gitlab.com/nonguix/nonguix
- kalium_xyz 7y agoGuix does not have tools such as NixOps aimed at managing cloud servers (unless im mistaken), how do you manage servers with it?
- uncletaco 7y agoYou are mistaken. Granted their deployment tools are still in an early stage, but like everything else in the guix ecosystem it looks promising Here's a tutorial for guix server deployments https://guix.gnu.org/blog/2019/managing-servers-with-gnu-guix-a-tutorial/ https://guix.gnu.org/blog/2019/managing-servers-with-gnu-gui... Here's the docs on guix deploy. https://guix.gnu.org/manual/devel/en/html_node/Invoking-guix-deploy.html https://guix.gnu.org/manual/devel/en/html_node/Invoking-guix...
- ertian 7y agoI'd really love to use GuixSD. I'd much prefer Lisp to Nix. But the strict licensing is just too much of a handicap. You've really got to build your system around the underlying licenses. I've tried installing it on 3 or 4 systems, and was always tripped up by some critical missing driver. I admire the ideological purity, but it kinda renders it irrelevant to me.
- _emacsomancer_ 7y agoAdd non-pure channels, e.g. https://gitlab.com/nonguix/nonguix https://gitlab.com/nonguix/nonguix
- sterlind 7y agoAs a Nix user, Guix interests me but I have three concerns, namely my pain points with Nix: 1. Small package base. My workflow includes running Julia on CUDA, editing from VS Code. Remarkably, Guix has both Julia and (on a third-party PKG repo) CUDA. What it's missing is VS Code. I understand that VS Code is non-free (like Chrome, it attaches trademarks on its branding), but there's no VS Codium I could find either. I also can't find Atom. Am I missing something? 2. Package index mirroring. Nix has an issue where Python, Node and other "third-party" packages have to be manually added to nixpkgs. If you want celery or requests, you're in luck because those are popular. If you want something more obscure, like pywikibot, you have to add it yourself (or run pip/npm yourself, and forego the benefits of Nix/Guix.) Does Guix address this? 3. Ease of scripting. This might be a plus for Guix, since Nix design patterns are arcane (the language is easy, things like overrides and needing to replace broken URLs is hard), but how easy is it to debug failing builds? Is there something like a debugger, or at least a way to shell-in and call things yourself? Bonus #4: broken URLs. is there a cache? what can be done?
- whateveracct 7y agoI don't think you can get away from explicit package mirroring without compromising having a nixpkgs pinned to a rev. Luckily it's pretty automatable and painless if your language has a decent packaging syste - the way Hackage is mirrored is very nice and automated. And then you can just ask for "vector version X.Y.Z" and if that version is there (probably is if nixpkgs is recent and the library is on Hackage), it finds it. And if you don't want to wait for nixpkgs to maintain the Hackage hashes, you can pretty easily maintain it yourself.
- rkangel 7y agoThe solution to Python packages is the 'pypi2nix' tool. This is an alternate approach that you see also used in the blog post, this time with vgo2nix. These tools take a set of dependencies (e.g. requirements.txt) and generate Nix expressions to build all of them from source.
- adisbladis 7y agoYou may also want to take a look at https://github.com/nix-community/poetry2nix https://github.com/nix-community/poetry2nix Disclaimer: I am the author (and also the author of vgo2nix).