Skip to content
Shabka. Declaritive description of my network, workstations and servers.
Branch: master
Clone or download
Latest commit db69a6b Apr 14, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
doc README: extract congruent definition to doc/congruent.md (#61) Nov 26, 2018
external [nixos] Set the NixOS label correctly set from within a Git worktree (#… Apr 12, 2019
hosts [AutoRandr] must have one and only one primary monitor per profile (#198 Mar 15, 2019
lib/bash [External] Expose externals into a top-level attribute (#194) Mar 9, 2019
libexec/doctoc Remove nixos-rebuild wrapper in favor of standard NixOS installation Oct 14, 2018
modules [NeoVim] Remove Vim-specific from README Apr 14, 2019
network hosts/zeus: remove my users, add a builder user and fix iscsi discove… Feb 4, 2019
os-specific/darwin
overlays [External] Expose externals into a top-level attribute (#194) Mar 9, 2019
scripts scripts/nixops: fix what 99d429 broke Mar 23, 2019
terraform terraform: route53: increase TTL to lower the bill Mar 22, 2019
util [External] Expose externals into a top-level attribute (#194) Mar 9, 2019
.editorconfig editorconfig: copy nixpkgs official editorconfig to fix broken symlink Aug 27, 2018
.envrc envrc: do not set -u as it explodes when loading from cache (#79) Jan 2, 2019
.gitignore home: install pijul from unstable (#71) Dec 24, 2018
.release [External] Expose externals into a top-level attribute (#194) Mar 9, 2019
LICENSE README: re-write after the move to NixOS (#53) Oct 30, 2018
Makefile [External] Expose externals into a top-level attribute (#194) Mar 9, 2019
README.md README: extract congruent definition to doc/congruent.md (#61) Nov 26, 2018
default.nix [External] Expose externals into a top-level attribute (#194) Mar 9, 2019
shell.nix Pin nixpkgs and expose it in NIX_PATH at /run/current-system/nixpkgs (#… Jan 6, 2019

README.md

Table of Contents

Shabka

Shabka (Arabic for Network) is a declarative congruent representation of my workstations (desktops, and laptops), network devices and servers. It's based on the NixOS operating system, and uses home-manager to setup the home directory of the users, for both NixOS and the other operating systems, including Mac.

See What is "declarative congruence"? for more information on the subject.

Why Nix?

Nix is a powerful package manager for Linux and other Unix systems that makes package management reliable and reproducible. It provides atomic upgrades and rollbacks, side-by-side installation of multiple versions of a package, multi-user package management and easy setup of build environments. Read more…

Packages are built from Nix expressions, which is a simple functional language. A Nix expression describes everything that goes into a package build action (a “derivation”): other packages, sources, the build script, environment variables for the build script, etc. Nix tries very hard to ensure that Nix expressions are deterministic: building a Nix expression twice should yield the same result.

Because it's a functional language, it's easy to support building variants of a package: turn the Nix expression into a function and call it any number of times with the appropriate arguments. Due to the hashing scheme, variants don't conflict with each other in the Nix store.

Nix has a large set of Nix expressions containing thousands of existing Unix packages, in the Nix Packages collection (Nixpkgs).

Why NixOS?

NixOS is a Linux distribution with a unique approach to package and configuration management. Built on top of the Nix package manager, it is completely declarative, makes upgrading systems reliable, and has many other advantages.

Similar to Nix, NixOS is built upon the concept of atomic system updates as well as rollbacks, and that includes the kernel and the initrd images for early boot.

You simply cannot find yourself on a system that does not boot anymore, provided the hardware is not defective and you have not broken GRUB or Systemd-boot.

Please see the NixOS about page for a quick taste of managing a NixOS system.

Documentation

Please see doc/modules for documentation on all the supported options.

Shabka structure

Directory Description
overlays package and module overrides used throughout the configuration.
scripts various development scripts to help with the development.
external Nix expressions for fetching externals such as nixos-hardware.
hosts top-level expressions specific to individual workstations or servers.
modules/nixos custom NixOS modules under the mine namespace controlled by host configuration.
modules/home custom home-manager modules under the mine namespace controlled by host configuration.
util Nix expressions, mainly functions, used as helpers in the actual modules.
os-specific OS-specific configuration files, and bootstrap scripts not belonging to NixOS or the home-manager.
libexec development helpers, mainly used by the scripts (not invoked directly).
network top-level expressions describing a NixOps network.
terraform cloud-resources that are not nixops-able.

Author

twitter/ylcodes
Wael Nasreddine

Credit

Thanks to #nixos community on Freenode, particularly infinisil, clever and samueldr for helping me learn how to configure my NixOS system and debug it.

The host configuration, the modules and the options are inspired by @dustinlacewell's dotfiles.

The images from the declarative congruence description above are taken from the paper published on Usenet, written by Steve Traugott and Lance Brown.

License

All source code is licensed under the MIT License.

You can’t perform that action at this time.