Niklaus notes about Elexis and NixOS https://blog.ngiger.dyndns.org/ Recent content on Niklaus notes about Elexis and NixOS Hugo -- gohugo.io en-us Mon, 21 Feb 2022 11:17:24 +0100 Ideas for improving my NixOS setup https://blog.ngiger.dyndns.org/posts/nixops-ideas/ Mon, 21 Feb 2022 11:17:24 +0100 https://blog.ngiger.dyndns.org/posts/nixops-ideas/ Ideas for storing secrets See nixos-encrypted-secrets using age which is a simple, modern and secure file encryption tool, format, and Go library. Setting up a private mail server [Setting up a private mail server](https://oddco.de/post/private-server/) [Use ox-hugo?](https://ox-hugo.scripter.co/) Howto monitor my services nagios https://github.com/zimbatm/nixos-wiki-test/blob/master/Nagios.md zabbix is the older-generation tool prometheus is cutting edge https://www.metricfire.com/blog/prometheus-vs-zabbix/ https://www.zabbix.com/integrations/windows https://sysdig.com/blog/monitoring-windows-prometheus/ Dnsmasq https://blog.ngiger.dyndns.org/posts/dnsmasq/ Sun, 20 Feb 2022 19:32:48 +0100 https://blog.ngiger.dyndns.org/posts/dnsmasq/ DNSMASQ as DHCP server in my local network Changes to the minimal setup of the NixOS setup Open firewall DNS port 53 # DNS DHCP port 67 Add list of mac-addr -> ip Defined gateway Defined nameservers The NixOS snippet is { pkgs, config, ...}: { # leases are found under /var/lib/dnsmasq/dnsmasq.leases environment.systemPackages = [ pkgs.dnsmasq pkgs.bind.dnsutils ]; networking.firewall.allowedUDPPorts = [ 67 # DHCP 53 # DNS ]; networking.nameservers = [ "127. Borgbase Backup https://blog.ngiger.dyndns.org/posts/borgbase-backup/ Fri, 18 Feb 2022 17:12:08 +0100 https://blog.ngiger.dyndns.org/posts/borgbase-backup/ Motivation and overview I am always concerned whether I have a backup of my data, as life teached that things go wrong when you do not expect it. My requirements were somewhere in my local network somewhere outside of my local network (eg. a fire, broken dam destroy my house) encrypted open source tools moderate size 50GB -> 1 TB After looking at several alternatives I decided to use borbackup and the offerings of borgbase. Patching a nix package https://blog.ngiger.dyndns.org/posts/nixops-patch/ Sat, 05 Feb 2022 11:17:24 +0100 https://blog.ngiger.dyndns.org/posts/nixops-patch/ Adding ruby gem postrunner with a test See Patch Postrunner and Nixos: Creating packages Notes on running a test Added in default.nix the lines passthru.tests = { simple-execution = callPackage ./tests.nix { }; }; passthru.tests = { simple-execution = callPackage ./tests.nix { }; }; Where tests.nix is quite simple { runCommand, postrunner, stdenv }: let inherit (postrunner) name; version = (import ./gemset.nix).postrunner.version; in runCommand "${name}-tests" { meta.timeout = 3; } '' # get version of installed program and compare with package version if [[ `${postrunner}/bin/postrunner version` ! Using rbenv under NixOS https://blog.ngiger.dyndns.org/posts/nixops-rbenv/ Sat, 05 Feb 2022 11:17:24 +0100 https://blog.ngiger.dyndns.org/posts/nixops-rbenv/ Adding rbenv nix-env -iA nixos.rbenv echo "status --is-interactive; and source (rbenv init -|psub)" | tee --append ~/.config/fish/config.fish mkdir -p ~/.rbenv/plugins cd ~/.rbenv/plugins git clone https://github.com/rbenv/ruby-build nix-shell -p openssl readline bundler rbenv install 3.1.0 # autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm6 libgdbm-dev libdb-dev Notes about nixops https://blog.ngiger.dyndns.org/posts/nixops/ Tue, 01 Feb 2022 11:17:24 +0100 https://blog.ngiger.dyndns.org/posts/nixops/ Bootstrapping nixops version 2.0 nixops create -d nuc cd /etc/nixos/hosts/nuc nixops deploy -d nuc --test # test the system and if everythins is okay install and reboot nixops deploy -d nuc --boot nixops deploy -d nuc --force-reboot Hatte die Fehlermeldung nuc> warning: unable to download 'https://cache.nixos.org/nix-cache-info': Couldn't resolve host name (6); retrying in 276 mss Gelöst mit rm $HOME/.cache/nix/binary-cache-v*.sqlite* auf nuc https://oddco.de/post/private-server/ Ideas for storing secrets See https://christine.website/blog/nixos-encrypted-secrets-2021-01-20 pkgs.age # https://github.