Go to file
2024-03-02 16:57:38 -08:00
cores [nb] Commit 2024-03-02 16:57:38 -08:00
hosts [nb] Commit 2024-03-02 16:57:38 -08:00
modules [nb] Commit 2024-03-02 16:57:38 -08:00
todos [nb] Commit 2024-03-01 20:01:17 -08:00
.gitignore Cleaned up todo list with nb. 2024-01-14 22:19:04 -08:00
.index [nb] Commit 2024-02-21 08:24:20 -08:00
.justfile [nb] Commit 2024-02-21 08:24:20 -08:00
flake.lock Final commit before merge 2024-03-01 19:20:02 -08:00
flake.nix Final commit before merge 2024-03-01 19:20:02 -08:00
README.md [nb] Commit 2024-03-02 16:57:38 -08:00

iiogama's Personal NixOS/Home-Manager Configuration

How to build existing system with flake

cd <build repo>
sudo nixos-rebuild switch --flake ".#<hostname>"

How to update existing system's packages

sudo nixos-rebuild switch --flake ".#<hostname>" --update-input nixpkgs --commit-lock-file

How to install with single command

nix-shell -p git --command "nix run https://git.sdf.org/iiogama/confix --extra-experimental-features nix-command --extra-experimental-features flakes --flake .#fireweed"

## How to install new system with flake

### Method 1

1. Boot into live NixOS disk and run the following commands:

sudo su nix-env -iA nixos.git git clone /mnt/etc/nixos nixos-install --flake ".#"

2. Reboot machine, log in, and run the following commands:

sudo rm -r /etc/nixos/configuration.nix

3. Move build to desired location.


### Method 2
1. Boot into live NixOS disk
2. Install NixOS
3. Add the following changes:
```/etc/nixos/configuration.nix
environment.systemPackages = with pkgs; [
  git
];
services.openssh.enable = true;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
  1. Run the following command:
sudo nixos-rebuild switch
  1. Grab the IP address with the following command:
ip addr
  1. Copy a flake repo from the host machine:
rsync -avz <repo directory> <user>@<ip addr>:

Nix commands to remember

nix flake update
nix run nixpkgs#<package>

Resources