--- author: Birk --- # Nix(OS) a introduction --- ## What is Nix? * a domain specific language * a package manager * a Linux distribution --- ```mermaid %%{init: {'theme': 'dark', 'themeVariables': { 'darkMode': true }}}%% flowchart LR A(Nix language) B(Nix package manager) C(NixOS) D(macOS) E(Debian) F(Software/User config) G(Git) H(File) A-->B--->C & D & E---->F --> G & H ``` --- ## History - 2003: a declarative programming language - 2008: first stable NixOS version - 2014: 10.000 packages - 2019: Flakes - 2025: [120.000 packages](https://repology.org/repositories/graphs) --- ## Features - [declarative configuration](https://search.nixos.org/options?) (20.000 options) - [package](https://search.nixos.org/packages) count (120.000 + third party) - Development community on Github and other hosters --- ## Infrastructure - [nixpkgs](https://github.com/NixOS/nixpkgs) on Github - [nix language](https://github.com/NixOS/nix) on Github - [Binary cache](https://cache.nixos.org/) for built packages - [CI server](https://hydra.nixos.org/) - [Build status](https://status.nixos.org/) page --- ## Demo ```mermaid %%{init: {'theme': 'dark', 'themeVariables': { 'darkMode': true }}}%% flowchart TD B(Disk & OS Installation) C(Desktop) D(Nextcloud server) E(nspawn container) F(Gitlab server) G(Podman container) H(Forgejo) I(MicroVM) J(Kubernetes) K(Splunk) B--> D & E & G & I B-->C E-->F G-->H I-->J-->K ``` --- ## Nextcloud ```mermaid %%{init: {'theme': 'dark', 'themeVariables': { 'darkMode': true }}}%% flowchart TD B(Disk & OS Installation) C[services.nextcloud.enable=true] D(Nextcloud server) E[services.nextcloud.package=nextcloud30] B--> D D-->C & E ``` --- ## Gitlab ```mermaid %%{init: {'theme': 'dark', 'themeVariables': { 'darkMode': true }}}%% flowchart TD B(Disk & OS Installation) E(nspawn container) F(Gitlab server) G[services.gitlab.enable=true] H[services.gitlab.backup.startAt=03:00] I[services.nginx.enable=true] B--> E --> F F-->G & H & I ``` --- ## Forgejo ```mermaid %%{init: {'theme': 'dark', 'themeVariables': { 'darkMode': true }}}%% flowchart LR B(Disk & OS Installation) G(Podman container) H(Forgejo) I[virtualisation.containers.enable=true] J[virtualisation.oci-containers.containers.forgejo-frontend.image=codeberg.org/forgejo/forgejo:11.0.3-rootless] K[forgejo-backend.image=docker.io/library/mariadb:11.8.2] B --> I --> G --> H --> J & K ``` --- ## Splunk ```mermaid %%{init: {'theme': 'dark', 'themeVariables': { 'darkMode': true }}}%% flowchart LR subgraph pc-demo1 direction LR B(Disk & OS Installation) subgraph k8s direction LR I("MicroVM(NixOS)") J(Kubernetes) subgraph containerd direction LR L(Container) K(Splunk) end end end B--> I --> J --> L --> K ```