summaryrefslogtreecommitdiff
path: root/_pastebins/2018-07-13-guix-users-in-nixos-system-configuration.md
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2024-11-18 08:21:58 -0300
committerEuAndreh <eu@euandre.org>2024-11-18 08:44:57 -0300
commit960e4410f76801356ebd42801c914b2910a302a7 (patch)
tree615d379416f72956d0c1666c63ce062859041fbe /_pastebins/2018-07-13-guix-users-in-nixos-system-configuration.md
parentRemove jekyll infrastructure setup (diff)
downloadeuandre.org-960e4410f76801356ebd42801c914b2910a302a7.tar.gz
euandre.org-960e4410f76801356ebd42801c914b2910a302a7.tar.xz
v0 migration to mkwb
Diffstat (limited to '_pastebins/2018-07-13-guix-users-in-nixos-system-configuration.md')
-rw-r--r--_pastebins/2018-07-13-guix-users-in-nixos-system-configuration.md53
1 files changed, 0 insertions, 53 deletions
diff --git a/_pastebins/2018-07-13-guix-users-in-nixos-system-configuration.md b/_pastebins/2018-07-13-guix-users-in-nixos-system-configuration.md
deleted file mode 100644
index 880d347..0000000
--- a/_pastebins/2018-07-13-guix-users-in-nixos-system-configuration.md
+++ /dev/null
@@ -1,53 +0,0 @@
----
-
-title: Guix users in NixOS system configuration
-
-date: 2018-07-13
-
-layout: post
-
-lang: en
-
-eu_categories: nix,guix
-
-ref: guix-users-in-nixos-system-configuration
-
----
-
-```nix
- 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";
- };
- };
-```