diff options
author | EuAndreh <eu@euandre.org> | 2018-07-16 23:37:01 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2018-07-16 23:37:01 -0300 |
commit | 246dc181e9b5717a18c2b03466f6a6dca298c623 (patch) | |
tree | 904642879b0835ac3ccca16f295dda4f5631e11d /site/posts/2018-07-15-running-guix-on-nixos.org | |
parent | Tweak license phrasing (diff) | |
download | euandre.org-246dc181e9b5717a18c2b03466f6a6dca298c623.tar.gz euandre.org-246dc181e9b5717a18c2b03466f6a6dca298c623.tar.xz |
WIP: guix-on-nixos post
Diffstat (limited to 'site/posts/2018-07-15-running-guix-on-nixos.org')
-rw-r--r-- | site/posts/2018-07-15-running-guix-on-nixos.org | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/site/posts/2018-07-15-running-guix-on-nixos.org b/site/posts/2018-07-15-running-guix-on-nixos.org index c21ee84..ebf5400 100644 --- a/site/posts/2018-07-15-running-guix-on-nixos.org +++ b/site/posts/2018-07-15-running-guix-on-nixos.org @@ -2,3 +2,51 @@ title: Running Guix on NixOS date: 2018-07-15 --- +https://riot.im/app/#/room/#freenode_#guix:matrix.org/$1531510045400627zjGbq:matrix.org +* h1 +** h2 +#+BEGIN_SRC nix -n + # FIXME: add line number + { config, pkgs, ...}: + + { + + # NixOS usual config + + users = { + mutableUsers = false; + + extraUsers = + let + andrehUser = { + andreh = { + # my custom user config + }; + }; + # From the Guix manual: + # https://www.gnu.org/software/guix/manual/en/html_node/Build-Environment-Setup.html#Build-Environment-Setup + buildUser = (i: + { + "guixbuilder${i}" = { # guixbuilder$i + group = "guixbuild"; # -g guixbuild + extraGroups = ["guixbuild"]; # -G guixbuild + home = "/var/empty"; # -d /var/empty + shell = pkgs.nologin; # -s `which nologin` + description = "Guix build user ${i}"; # -c "Guix buid user $i" + isSystemUser = true; # --system + }; + } + ); + in + # merge all users + pkgs.lib.fold (str: acc: acc // buildUser str) + andrehUser + # for i in `seq -w 1 10` + (map (pkgs.lib.fixedWidthNumber 2) (builtins.genList (n: n+1) 10)); + + extraGroups.guixbuild = { + name = "guixbuild"; + }; + }; + } +#+END_SRC |