Skip to content

Commit

Permalink
notes
Browse files Browse the repository at this point in the history
  • Loading branch information
BostX committed Feb 5, 2024
1 parent bec3fdb commit afcc5b2
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 59 deletions.
9 changes: 9 additions & 0 deletions notes/guix-guile-nix/guix.scrbl
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@
# This fetches the public key of the issuer of SIG from KEYRING, a keyring as
# returned by 'get-openpgp-keyring'.

# when ABI needs to be rebuild
# make --jobs=$jobs clean-go # delete the .go (Guile Object) files
./pre-inst-env guix home --fallback -L $dotf/guix/home/ container $dotf/guix/home/home-configuration.scm
./pre-inst-env guix system --cores=$jobs image -t iso9660 gnu/system/install.scm
Expand Down Expand Up @@ -615,3 +616,11 @@
rg "\boperating-system\s" (fd 'scm$' ~/dev/guix/)
rg --no-ignore-vcs -g '*.{scm,c,h}' -w "word\\s" $dgx $dev/guile
}

etc/teams.scm

Extension - language extension
https://gitlab.inria.fr/guix-hpc/guix-modules


inclus les entrées de développement du paquet suivant TODO add to the documentation "can be used repeatedly"
129 changes: 70 additions & 59 deletions notes/guix-guile-nix/guix_system_configuration.scrbl
Original file line number Diff line number Diff line change
Expand Up @@ -181,66 +181,77 @@
# list available linux-libre kernels
ls --format=single-column /gnu/store/*-linux-libre-*/bzImage
guix show linux-libre | grep version
}

@block{@block-name{Services}
Service:
- building block the operating system.
- (broadly speaking) extends the functionality of the operating system.
- can be extensible or non-extensible.
One-shot services stop immediately after their start action has completed.

# herd - client program to control a running instance of 'shepherd'.
# status of all the "system services":
sudo herd status
# status of "user services", assuming a user 'shepherd' is running
herd status

# list all available system services
guix system search .

# list all available (login) manager system services
guix system search manager

Extensions - connect system services. A service-extension gets the command line
from the service it is extending.
Service types - define extension relations.

(service-extension TARGET COMPUTE DEFAULT-VAL)

TARGET - "arrow target" in the graph, i.e. name of service which is going to
be extended.

COMPUTE - a procedure that, given the parameters of the service, returns a
list of objects to extend the service of that type.

DEFAULT-VAL - default value for instances of this service-extension.

Service instantiation examples:
(service guix-service-type ;; name of the service to start
;; initial service
(guix-configuration
(build-accounts 5)
(extra-options '("--gc-keep-derivations"))))
;;
(service guix-service-type) ;; uses the DEFAULT-VAL
;;
(simple-service 'consider-relogin
home-run-on-first-login-service-type
#~(begin (display "AAA\n")
(display "BBB\n")))

Every '...-service-type' has at least one extension. The only exception is
the boot service type, which is the ultimate service.

@block{@block-name{term-auto}
- Q: What's the term-auto service? It seems to be my only stopped service
- A1: "term-auto" is mainly for serial consoles that might need a log-in
prompt. The regular (VT) ttys use mingetty instead. It's basically always
stopped - that it could be presented in a less misleading way.
See https://logs.guix.gnu.org/guix/2020-09-23.log#174932
- A2: There is no 'term-auto' service (it's similar to a systemd term@"@"auto
instance). See https://logs.guix.gnu.org/guix/2020-03-23.log#213842
}
@block{@block-name{Services}
Service:
- building block the operating system.
- (broadly speaking) extends the functionality of the operating system.
- can be extensible or non-extensible.
One-shot services stop immediately after their start action has completed.

shepherd - init system, i.e. the first process started (PID 1 typically), run
as root, manages all system-wide services and can help managing daemons of
nonpriviledged users

herd
- client program to control a running instance of 'shepherd
- sends commands to shepherd
- communicates with spepherd using Unix Daemon Socket

# status of all the "system services":
sudo herd status
# status of "user services", assuming a user 'shepherd' is running
herd status
herd detailed-status
herd log
herd reload-modules <module-name> # e.g. herd reload-modules apache

# list all available system services
guix system search .

# list all available (login) manager system services
guix system search manager

Extensions - connect system services. A service-extension gets the command
line from the service it is extending.
Service types - define extension relations.

(service-extension TARGET COMPUTE DEFAULT-VAL)

TARGET - "arrow target" in the graph, i.e. name of service which is going to
be extended.

COMPUTE - a procedure that, given the parameters of the service, returns a
list of objects to extend the service of that type.

DEFAULT-VAL - default value for instances of this service-extension.

Service instantiation examples:
(service guix-service-type ;; name of the service to start
;; initial service
(guix-configuration
(build-accounts 5)
(extra-options '("--gc-keep-derivations"))))
;;
(service guix-service-type) ;; uses the DEFAULT-VAL
;;
(simple-service 'consider-relogin
home-run-on-first-login-service-type
#~(begin (display "AAA\n")
(display "BBB\n")))

Every '...-service-type' has at least one extension. The only exception is
the boot service type, which is the ultimate service.

@block{@block-name{term-auto}
- Q: What's the term-auto service? It seems to be my only stopped service
- A1: "term-auto" is mainly for serial consoles that might need a log-in
prompt. The regular (VT) ttys use mingetty instead. It's basically always
stopped - that it could be presented in a less misleading way.
See https://logs.guix.gnu.org/guix/2020-09-23.log#174932
- A2: There is no 'term-auto' service (it's similar to a systemd term@"@"auto
instance). See https://logs.guix.gnu.org/guix/2020-03-23.log#213842
}
}

Expand Down

0 comments on commit afcc5b2

Please sign in to comment.