2.4 KiB
2.4 KiB
Declaratively Yours
- Intro
- The model
- Packages
- Declarative vs. procedural
- Exploiting the structure
- Services
- OS
- Wrap-up
- COMMENT Emacs
Intro
- everyone likes declarative
-
but:
-
only for certain things: Ansible, Puppet
- see configmgmt track
- other things remain imperative: apt, pip, Dockerfile, etc.
- volatile Docker containers vs. imperative systems
- for Ansible & co.: declarations not quite honored (TODO: find pix/citations)
-
-
problem:
- we need declarations absolutely honored (devops)
-
we need structure
- what's declarative? function vs. data
- to exploit it (examples will follow)
- to discover, explore, understand, and reason about systems
The model
[declaration] —-[ Guix ]—-> [actual thing]
declaration = package, services, OS, etc. actual thing = executables, Shepherd service, machine, VM, etc.
Packages
- guix graph -t …
- guix package –search-paths
- guix package -m …
-
yet: guix install, etc.
- guix package –export-manifest (TODO)
- guix package –export-channels (TODO)
Declarative vs. procedural
-
search paths
- Guix decl. vs. Nix setupHook
- package/origin objects vs. Nix derivation-returning functions
- package parameters vs. package-returning functions
- functions in the store monad vs. declarative file-like objects
Exploiting the structure
-
package transformation options
- DEMO: guix build –with-input
- guix graph –with-input
- bonus: –with-latest
-
declarative vs. function: parameters
- –with-parameter
- DEMO: guix install gettext –with-latest=gettext
Services
- DEMO: folding/unfolding (explorer)
OS
- check initrd modules
- check file system labels
- check accounts
Wrap-up
COMMENT Emacs
Local Variables: ispell-local-dictionary: "american" End: