1
1
Fork 0
NixOS Configuration
Find a file
Myned 9cc8cbc0c8
kitty: switch cursor to beam
Signed-off-by: Myned <dev@bjork.tech>
2024-09-15 18:23:34 -05:00
machines myork: disable cpu limit on charger 2024-09-14 19:56:47 -05:00
options kitty: switch cursor to beam 2024-09-15 18:23:34 -05:00
profiles nix: format with alejandra 2024-09-12 20:50:53 -05:00
secrets nix: format with alejandra 2024-09-12 20:50:53 -05:00
.gitignore git: migrate to forgejo 2024-09-12 19:41:21 -05:00
configuration.nix home: enable hm and fish program for root 2024-09-15 18:23:14 -05:00
flake.in.nix nix: disable nixpkgs-local 2024-09-14 16:08:50 -05:00
flake.lock nix: update flake.lock 2024-09-14 16:08:20 -05:00
flake.nix nix: disable nixpkgs-local 2024-09-14 16:08:50 -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