1
1
Fork 0
NixOS Configuration
Find a file
Myned 1d4991da88
pkgs: add fragments
Signed-off-by: Myned <dev@bjork.tech>
2024-09-19 19:39:35 -05:00
machines myork: disable cpu limit on charger 2024-09-14 19:56:47 -05:00
options pkgs: add fragments 2024-09-19 19:39:35 -05:00
profiles nix: format with alejandra 2024-09-12 20:50:53 -05:00
secrets agenix: rekey secrets 2024-09-18 08:49:27 -05:00
.gitignore git: migrate to forgejo 2024-09-12 19:41:21 -05:00
configuration.nix nix: remove xdg-desktop-portal-hyprland overlay 2024-09-15 19:15:54 -05:00
flake.in.nix nix: remove xdg-desktop-portal-hyprland overlay 2024-09-15 19:15:54 -05:00
flake.lock nix: update flake.lock 2024-09-15 19:16:09 -05:00
flake.nix nix: remove xdg-desktop-portal-hyprland overlay 2024-09-15 19:15:54 -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