LoginSignup
1
0

Guix の初期インストールで uid と shell を変更する

Posted at

はじめに

Guix をインストールしては削除を繰り返して、概ね仕組みがわかってきたので、いろいろ試す。
最近の Linux のディストリビューションはユーザを作成すると uid が 1001 から始まるものが多いが昔のシステムは 501 のものも多く、アップデート、アップデートで生きながらえさせてきたので uid を 501 にしたかった。
ついでに、シェルを最初から zsh にする。

ユーザの uid とシェルを変更する

インストールの最後の config.scm の確認時に編集して以下のように変更する

--- config.scm.orig     2024-03-15 17:43:21.149610892 +0900
+++ config.scm  2024-03-15 17:43:44.439990988 +0900
@@ -9,7 +9,7 @@

 ;; Indicate which modules to import to access the variables
 ;; used in this configuration.
-(use-modules (gnu))
+(use-modules (gnu)(gnu packages shells))
 (use-service-modules cups desktop networking ssh xorg)

 (operating-system
@@ -23,6 +23,8 @@
                   (name "foo")
                   (comment "foo")
                   (group "users")
+                  (uid 501)
+                  (shell (file-append zsh "/bin/zsh"))
                   (home-directory "/home/foo")
                   (supplementary-groups '("wheel" "netdev" "audio" "video")))
                 %base-user-accounts))
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0