1
1
Fork 0
NixOS Configuration
Find a file
Myned a4de5f3324
headscale: initial disabled container
Signed-off-by: Myned <dev@bjork.tech>
2024-09-12 19:41:21 -05:00
machines mynix: use performance profile index 1 2024-09-12 19:41:21 -05:00
options headscale: initial disabled container 2024-09-12 19:41:21 -05:00
profiles headscale: initial disabled container 2024-09-12 19:41:21 -05:00
secrets headscale: initial disabled container 2024-09-12 19:41:21 -05:00
.gitignore git: migrate to forgejo 2024-09-12 19:41:21 -05:00
configuration.nix git: migrate to forgejo 2024-09-12 19:41:21 -05:00
flake.in.nix nix: lock hyprland to v0.43.0 2024-09-12 19:41:21 -05:00
flake.lock nix: update flake.lock 2024-09-12 19:41:21 -05:00
flake.nix nix: lock hyprland to v0.43.0 2024-09-12 19:41:21 -05:00
LICENSE git: migrate to forgejo 2024-09-12 19:41:21 -05:00
README.md nixos: remove support for script install 2024-09-12 19:41:21 -05:00

WARNING

This configuration is not meant for public usage

Install

Remote (with NixOS Anywhere)

  1. Clone this repository

    git clone https://github.com/Myned/nixos
    
  2. Enable Flakes

  3. Boot from NixOS minimal installer

  4. Create machine-specific modules in machines/MACHINE/

    b. Machine configuration and hostname in default.nix

    { custom.hostname = "MACHINE"; }
    

    c. Disko layout in disko.nix

    # Verify /dev identifier on machine
    lsblk
    
    # Verify EFI/BIOS firmware on machine
    [ -d /sys/firmware/efi/efivars ] && echo "UEFI" || echo "BIOS"
    

    d. Generated hardware configuration in hardware-configuration.nix

    nixos-generate-config --show-hardware-config --no-filesystems --root /mnt
    
  5. Choose profile and add machine-specific modules to flake.in.nix

    MACHINE = BRANCH [ ./profiles/PROFILE ./machines/MACHINE ];
    
  6. Generate flake.nix with flakegen

    git add .
    nix run .#genflake flake.nix
    nix flake lock
    
  7. Copy host public SSH key to root on machine

    # On machine
    sudo passwd root
    
    # On host
    ssh-copy-id root@MACHINE
    
  8. Test and execute NixOS Anywhere

    nixos-anywhere --vm-test -f .#MACHINE root@IP
    nixos-anywhere -f .#MACHINE root@IP
    
  9. Shutdown, detach ISO, and reboot