From 56be97690f888a8ad43fd698d7b13773ba40457f Mon Sep 17 00:00:00 2001 From: Timothy DeHerrera Date: Tue, 7 Jan 2020 13:04:32 -0700 Subject: [PATCH] README.md: expand on quick setup details --- README.md | 14 +++++++++++++- hosts/NixOS.nix | 11 ++++++++++- hosts/niximg.nix | 3 ++- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ec47e1eb..9fc20087 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,19 @@ git checkout -b $new_branch template # generate hardware config nixos-generate-config --show-hardware-config > ./hosts/${new_host}.nix -# ensure configuration lives in expected location +# Edit the new file, removing `not-deteced.nix` from the imports. +# In order to maintain purity flakes cannot resolve from the NIX_PATH. +# You may also want to import ./hosts/NixOS.nix from here which sets up +# an efi bootloader, enables Network Manager and sets an empty root password. +# Otherwise you'll need to set the bootloader, network and password yourself. + +# Also ensure your file systems are set the way you want. And import +# any ./profiles you may wish to try out. +$EDITOR ./hosts/${new_host}.nix + + +# backup existing config and ensure configuration lives in expected location +mv /etc/nixos /etc/nixos.old ln -s $PWD /etc/nixos # a flake is vcs based, so only git aware files are bundled diff --git a/hosts/NixOS.nix b/hosts/NixOS.nix index 71cfa211..c933bcb2 100644 --- a/hosts/NixOS.nix +++ b/hosts/NixOS.nix @@ -1 +1,10 @@ -{ imports = [ ../profiles/develop ]; } +{ + imports = [ ]; + + # Use the systemd-boot EFI boot loader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + networking.networkmanager.enable = true; + users.users.root.password = ""; +} diff --git a/hosts/niximg.nix b/hosts/niximg.nix index e4229abe..ba934340 100644 --- a/hosts/niximg.nix +++ b/hosts/niximg.nix @@ -1,5 +1,6 @@ { modulesPath, ... }: { - imports = [ ./NixOS.nix "${modulesPath}/installer/cd-dvd/iso-image.nix" ]; + imports = + [ ../profiles/develop "${modulesPath}/installer/cd-dvd/iso-image.nix" ]; isoImage.makeEfiBootable = true; isoImage.makeUsbBootable = true;