From 741bd1d948f7465454186a0a39acf53b1050035c Mon Sep 17 00:00:00 2001 From: Brendan Golden Date: Wed, 16 Oct 2024 20:04:42 +0100 Subject: [PATCH] assignment: added section (roughly) on nixos --- _git.tar.gz | 4 ++-- src/skynet/nix.md | 20 +++++++++++++++++++- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/_git.tar.gz b/_git.tar.gz index c5be389..eaf503f 100644 --- a/_git.tar.gz +++ b/_git.tar.gz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4c3be06c72432a2bcd9d057a97c7506e8b1f4065460fee1283ec5142531749ff -size 353210 +oid sha256:38d0593fccaba86da9f3c2cdfbdccc261e70e9194b3951772dd63932309f9bac +size 357908 diff --git a/src/skynet/nix.md b/src/skynet/nix.md index 72c13ef..67e2771 100644 --- a/src/skynet/nix.md +++ b/src/skynet/nix.md @@ -99,6 +99,23 @@ This is also the format that we use in Skynet. The [Official Wiki Page][nix_flake] will be more informative than what can be shoved into this article. ### Nixos +With teh package manager we are able to create packages in a deterministic manner and store them in a way that does not suffer path conflicts. + +Some (possibly crazy) folks saw this and decided to apply this to an entire operating system. +The advantages are clear, the required programs are added to teh path for teh current iteration of the system. +If any error arises the system can be rolled back to a previous config. + +Configuration is done via ``*.nix`` files, which are then converted into teh native config for the application in question. + +For example [this file][nix_dns] turns a list of attributes. +```nix +{ + record = "forgejo"; + r_type = "CNAME"; + value = "glados.skynet.ie"; +} +``` +Into a config usable by the BIND DNS server. ### Lix @@ -128,4 +145,5 @@ The [Official Wiki Page][nix_flake] will be more informative than what can be sh [nix_guide_official]: https://nix.dev/tutorials/first-steps/ [nix_guide_pills]: https://nixos.org/guides/nix-pills/# [nix_pkgs_sieve]: https://github.com/NixOS/nixpkgs/blob/a3c0b3b21515f74fd2665903d4ce6bc4dc81c77c/pkgs/by-name/si/sieve-editor-gui/package.nix -[nix_flake]: https://wiki.nixos.org/wiki/Flakes \ No newline at end of file +[nix_flake]: https://wiki.nixos.org/wiki/Flakes +[nix_dns]: https://forgejo.skynet.ie/Skynet/nixos/src/branch/main/applications/dns/dns.nix \ No newline at end of file