No description
Find a file
Ivan Bushchik ab528c81b2
Add raspberry pi machine
Signed-off-by: Ivan Bushchik <ivabus@ivabus.dev>
2023-08-31 18:38:01 +03:00
common Add raspberry pi machine 2023-08-31 18:38:01 +03:00
machines Add raspberry pi machine 2023-08-31 18:38:01 +03:00
roles Add raspberry pi machine 2023-08-31 18:38:01 +03:00
secrets uhhhhhhhhh 2023-07-28 15:39:50 +03:00
shells Rethink configuration 2023-08-21 13:30:49 +03:00
.gitignore Add raspberry pi machine 2023-08-31 18:38:01 +03:00
default.nix Aughhthghhhgh 2023-08-24 11:06:09 +03:00
flake.lock Add raspberry pi machine 2023-08-31 18:38:01 +03:00
flake.nix Add raspberry pi machine 2023-08-31 18:38:01 +03:00
LICENSE Add license file 2023-08-27 18:25:55 +03:00
README.md Merge branch 'main' of github.com:ivabus/nixos 2023-08-30 11:26:05 +03:00
secrets.nix uhhhhhhhhh 2023-07-28 15:39:50 +03:00

NixOS Configuration files.

Deploying

Setup disks, mount root to /mnt and /boot to /mnt/boot and run something like this

git clone https://github.com/ivabus/nixos /mnt/etc/nixos
nixos-generate-config --show-hardware-config --root /mnt > /mnt/etc/nixos/machines/host/hardware.nix
nixos-install --flake path:.#host

Rebuilding

nixos-rebuild switch --flake path:/etc/nixos

Apple Silicon hosts require additional --impure flag for firmware installation. (Firmware should be placed in /etc/nixos/asahi/firmware (ignored by git)).

Hosts configured

  • stella (Random Ryzen 3 3250U laptop)
  • vetus (iMac 27" 2017)
  • celerrime (MacBook Air M2)

Modules

Module example:

{ config, lib, ... }:

let
    cfg = config.my.MODULE;
in {
  options.my.MODULE.enable = lib.mkEnableOption "Enable MODULE";
  config = lib.mkIf (cfg.enable) {
    MODULE_CONFIGURATION
  };
}

Shells

I "made" some shell in shells/.

Dotfiles (from ivabus/dotfiles)

I install my dotfiles with prepared script

curl https://iva.bz/nix | sh

TODO

  • Setup services (which I host)
  • Setup "secret" roles (I need them)
  • Setup router

This configuration is MIT licensed.

I used delroth/infra.delroth.net (MIT license) as a reference for my configuration.