Go to file
Andreas Zweili 246c58e84d Integrate inputs into custom 2022-11-05 01:26:31 +01:00
custom Integrate inputs into custom 2022-11-05 01:26:31 +01:00
hardware Remove unused pkgs 2022-11-03 13:13:36 +01:00
home-manager Integrate inputs into custom 2022-11-05 01:26:31 +01:00
lib Integrate inputs into custom 2022-11-05 01:26:31 +01:00
modules Integrate inputs into custom 2022-11-05 01:26:31 +01:00
scripts Define pihole more explictly 2022-11-04 16:35:14 +01:00
scrts Encrypt the email secrets 2022-11-04 19:06:14 +01:00
secrets@ccb7f913c3 Update secrets 2022-11-04 19:13:29 +01:00
systems Integrate inputs into custom 2022-11-05 01:26:31 +01:00
.envrc extend the development environment 2022-03-18 18:06:59 +01:00
.gitignore Remove the variables.el file 2022-05-16 18:55:28 +02:00
.gitmodules remove the nixos-hardware submodule 2021-12-16 20:58:37 +01:00
LICENSE Initial commit 2021-11-15 17:43:04 +01:00
README.md Extend README 2022-11-04 14:53:02 +01:00
flake.lock Update flake 2022-11-01 15:16:56 +01:00
flake.nix Integrate inputs into custom 2022-11-05 01:26:31 +01:00
requirements.txt rename requirements 2021-12-20 12:23:38 +01:00
shell.nix extend the development environment 2022-03-18 18:06:59 +01:00

README.md

nixos

This repository contains my configuration for my Nixos systems. I don't provide any garantuees that it will work on other systems. In addition some of the scripts required for installation will destroy your data when used.

VM installation

This allows you to setup a VM with minimal effort. However this requires some prerequisites.

  • A VM running the minimal NixOS ISO reachable with SSH under nixos@nixos.2li.local.
  • The VM runs UEFI.
  • You've set a password for the nixos user.
  1. ./scripts/install_new_vm.sh
  2. Provide the required information and wait until the script is finished.
  3. Reboot and profit!

Raspberry Pi installation

  1. Download the image from: https://hydra.nixos.org/job/nixos/release-22.05/nixos.sd_image.aarch64-linux
  2. Extract it with: unzstd nixos-sd-image-*-aarch64-linux.img.zst
  3. Flash it to the SD card with sudo dd if=$(ls nixos-sd-image-*-aarch64-linux.img) of=/dev/mmcblk0 bs=4M
  4. After booting create a password for the nixos user.
  5. Get the system key and add it to scrts/secrets.nix. Use ssh-keyscan nixos.2li.local.
  6. SSH into the system.
  7. curl https://git.2li.ch/Nebucatnetzer/nixos/archive/master.tar.gz | tar xz
  8. sudo cp nixos/systems/raspi4/init_config.nix /etc/nixos/configuration.nix
  9. sudo nixos-rebuild switch
  10. Mount the FIRMWARE partition sudo mount /dev/disk/by-label/FIRMWARE /mnt and make sure that your config.txt looks like ./systems/raspi4/config.txt
  11. Install the system by running this command on your computer: ./scripts/install_new_system.sh

x86 installation

  1. curl https://git.2li.ch/Nebucatnetzer/nixos/archive/master.tar.gz | tar xz
  2. cd nixos && nix-shell
  3. sudo python3 scripts/format-disk.py
  4. sudo nixos-install --no-root-passwd --root /mnt --impure --flake .#SYSTEMNAME

Update remote systems

Simply run the script scripts/update_all_systems.xsh and it will iterate over all defined systems. The script requires Xonsh but can be easily adapted to BASH or similar.

Non-Nixos System

  1. scripts/install-home-manager.sh