This reverts commit
|
||
---|---|---|
home-manager | ||
lib | ||
modules | ||
scripts | ||
scrts | ||
systems | ||
.editorconfig | ||
.envrc | ||
.gitignore | ||
.gitmodules | ||
LICENSE | ||
README.md | ||
flake.lock | ||
flake.nix | ||
shell.nix |
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
- Add the new system to
flake.nix
. - Build the image with
scripts/build-raspi-image.sh SYSTEMNAME
- Flash the image to an SD card
dd if=~/Downloads/SYSTEMNAME.img of=/dev/mmcblk0 bs=4M
. - After you've booted the Pi get the new SSH key with
ssh-keyscan hostname.custom.domain
and add it toscrts/secrets.nix
. - Then login into the new Pi and mount the
FIRMWARE
partition withsudo mkdir -p /mnt && sudo mount /dev/disk/by-label/FIRMWARE /mnt
and make sure that yourconfig.txt
looks like ./systems/raspi4/config.txt - Change the password
x86 installation
curl https://git.2li.ch/Nebucatnetzer/nixos/archive/master.tar.gz | tar xz
cd nixos && nix-shell
sudo ./scripts/format-disk.py
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
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 {
};
}