Go to file
Andreas Zweili bb80ff5a7b Make the management scripts easier to use 2023-12-04 13:01:55 +01:00
home-manager Update to 23.11 2023-12-04 13:01:55 +01:00
lib WIP add agenix to home-manager 2023-08-22 18:41:05 +02:00
modules Update to 23.11 2023-12-04 13:01:55 +01:00
scripts Make the management scripts easier to use 2023-12-04 13:01:55 +01:00
scrts Replace TT-RSS with FreshRSS 2023-11-06 15:03:50 +01:00
systems Add tag "freshrss" to restic backups 2023-11-27 16:30:39 +01:00
.editorconfig Add a script to test SD cards 2023-11-26 09:21:18 +01:00
.envrc Make the management scripts easier to use 2023-12-04 13:01:55 +01:00
.gitignore Ignore flycheck files 2023-11-08 20:02:10 +01:00
.gitmodules Remove unused submodule 2022-11-11 20:42:12 +01:00
LICENSE Initial commit 2021-11-15 17:43:04 +01:00
README.md Update README 2023-07-22 14:33:00 +02:00
flake.lock Update to 23.11 2023-12-04 13:01:55 +01:00
flake.nix Update to 23.11 2023-12-04 13:01:55 +01:00
shell.nix Use nix-output-monitor in all scripts 2023-11-26 12:14:08 +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.

Raspberry Pi installation

  1. Add the new system to flake.nix.
  2. Build the image with scripts/build-raspi-image.sh SYSTEMNAME
  3. Flash the image to an SD card dd if=~/Downloads/SYSTEMNAME.img of=/dev/mmcblk0 bs=4M.
  4. After you've booted the Pi get the new SSH key with ssh-keyscan hostname.custom.domain and add it to scrts/secrets.nix.
  5. Then login into the new Pi and mount the FIRMWARE partition with sudo mkdir -p /mnt && sudo mount /dev/disk/by-label/FIRMWARE /mnt and make sure that your config.txt looks like ./systems/raspi4/config.txt
  6. Change the password

x86 installation

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

Update remote systems

Simply run the script scripts/remote_switch.sh and it will iterate over all defined systems. With the option -r the systems will reboot as well.

Non-Nixos System

  1. scripts/install-home-manager.sh

Development

Options template

{ config, lib, pkgs, ... }:
let
  cfg = config.programs.NAME;
in
{
  options = {
    programs.NAME.enable = lib.mkEnableOption "DESCRIPTION";
  };

  config = lib.mkIf cfg.enable {
  };
}