nixos/README.md

42 lines
1.3 KiB
Markdown
Raw Normal View History

2021-11-15 17:43:04 +01:00
# nixos
2021-11-29 10:55:16 +01:00
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.
## Installation
2024-01-12 21:28:06 +01:00
1. For Raspis it's the easiest if you prepare the SD card/disk on another system. For a PC you can just boot the installation ISO directly.
1. For both devices you can format the disk/card with the following script `sudo ./scripts/format-disk.py`. It will walk you through the formatting process and for a Raspi4 it will prepare it for UEFI setup.
1. Next install the system with `sudo nixos-install --no-root-passwd --root /mnt/nixos --impure --flake .#SYSTEMNAME`
When everything is finished you can reboot the system and remove the USB stick. You have now a fully encrypted NixOS system.
2021-11-29 10:55:16 +01:00
2022-01-17 11:23:55 +01:00
## Update remote systems
2023-07-22 14:33:00 +02:00
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.
2022-01-17 11:23:55 +01:00
2021-11-29 10:55:16 +01:00
## Non-Nixos System
2022-01-25 18:19:00 +01:00
1. `scripts/install-home-manager.sh`
2023-05-27 17:51:15 +02:00
## Development
### Options template
```nix
{ config, lib, pkgs, ... }:
let
cfg = config.programs.NAME;
in
{
options = {
programs.NAME.enable = lib.mkEnableOption "DESCRIPTION";
};
config = lib.mkIf cfg.enable {
};
}
```