Go to file
Ivan Bushchik fe16758519
Fix all nix-darwin machines + add effundam-x
Signed-off-by: Ivan Bushchik <ivabus@ivabus.dev>
2023-11-01 21:42:41 +03:00
common Fix all nix-darwin machines + add effundam-x 2023-11-01 21:42:41 +03:00
hardware Minor changes 2023-10-03 22:25:40 +03:00
machines Fix all nix-darwin machines + add effundam-x 2023-11-01 21:42:41 +03:00
pkgs Update ivabus.dev to fe2e4ae 2023-10-22 17:28:41 +03:00
roles Update ivabus-dev.nix and router.nix 2023-10-22 09:18:32 +03:00
secrets Fix all nix-darwin machines + add effundam-x 2023-11-01 21:42:41 +03:00
shells Call nixfmt for the first time 2023-09-06 16:10:11 +03:00
.gitignore Minor changes 2023-10-03 22:25:40 +03:00
default.nix Minor changes 2023-10-03 22:25:40 +03:00
features.nix Minor changes 2023-10-03 22:25:40 +03:00
flake.lock Fix all nix-darwin machines + add effundam-x 2023-11-01 21:42:41 +03:00
flake.nix Fix all nix-darwin machines + add effundam-x 2023-11-01 21:42:41 +03:00
LICENSE Add license file 2023-08-27 18:25:55 +03:00
README.md Enable NGINX proxying on rubusidaeus 2023-10-27 12:29:45 +03:00
secrets.nix Enable NGINX proxying on rubusidaeus 2023-10-27 12:29:45 +03:00

ivabus 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

Raspberry Pi image generation

Replace {{REPO_PATH}} with path to this repo (surprising, isn't it) and run on NixOS system (or system with Nix (don't tested))

nix build path:{{REPO_PATH}}#nixosConfigurations.HOST.config.system.build.sdImage

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

  • celerrime (MacBook Air M2) (coding)
  • vetus (iMac 27" 2017) (gaming)
  • stella (Random Ryzen 3 3250U laptop) (lite web surfing client)
  • celerrime-x (MacBook Air M2 under Darwin) - Needs unifying + doesn't work - Nix daemon gets in "boot loop"
  • rubusidaeus (Raspberry Pi 4B) (small services)
  • periculo (StarFive VisionFive2) (as router) - WIP + untested

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)
    • ivabus.dev
    • iva.bz (proxying not-Nix env)
    • ивабус.рф (proxying not-Nix env)
  • Setup "secret" roles (I need them)
  • Setup router (in progress with periculo)
  • Setup dotfiles properly with home-manager

This configuration is MIT licensed.

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