-
namespaces - overview of Linux namespaces http://man7.org/linux/man-pages/man7/namespaces.7.html
-
mount_namespaces - overview of Linux mount namespaces
| #!/usr/bin/env bash | |
| # Example usage from an Ansible playbook: | |
| # - name: Copy the nginx validate script | |
| # copy: src=validate-nginx-config.sh dest=/opt/validate-nginx-config.sh mode=0744 | |
| # | |
| # - name: Update main nginx config file | |
| # template: | |
| # src: nginx.conf.j2 | |
| # dest: /etc/nginx/nginx.conf |
docker run -d -p 9000:9000 --name minio minio/minio server /export
docker logs minio
| # Suspend process: | |
| Ctrl + z | |
| # Move process to foreground: | |
| fg | |
| # Generate random hex number where n is number of characters: | |
| openssl rand -hex n | |
| # Execute commands from a file in the current shell: |
In the following example, sddm will be used as a display manager. The process is however similar for other display managers in nixpkgs and a summary that applies to all nixpkgs display managers is given at the end.
-
Systemd unit "display-manager.service" starts
services.x11.displayManager.job.execCmd(the display manager)Code reference:
<nixpkgs>/nixos/modules/services/x11/xserver.nix -
services.x11.displayManager.job.execCmdis set to the path of thesddmbinary from thesddmpackage in the nix store. So SDDM will start and read its configuration from/etc/sddm.conf.
With autofs you can easily mount network volumes upon first access to the folder where you want to mount the volume. Autofs is available for many OS and is preinstalled on Mac OS X so I show you how I mounted my iTunes library folder using this method.
autofs needs to be configured so that it knows where to gets its configuration. Edit the file /etc/auto_master and add the last line:
#
# Automounter master map
#
+auto_master # Use directory service
| #!/bin/sh | |
| set -ex | |
| PATH=/bin:/sbin:/usr/bin:/usr/sbin | |
| KEYMAP="us us" | |
| HOST=alpine | |
| USER=anon | |
| ROOT_FS=ext4 | |
| BOOT_FS=ext4 |
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| #IP addrees this VM will have | |
| IP = "192.168.50.4" | |
| # script that updates the system, downloads all prerequisities, installs docker, | |
| # zookeeper, marathon, clones actual mesos branch and compiles it. | |
| $setup = <<SCRIPT |