Skip to content

Commit

Permalink
updated: README.md and screenshot
Browse files Browse the repository at this point in the history
  • Loading branch information
amz-x committed Jun 20, 2023
1 parent 9978556 commit d46e48d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 56 deletions.
68 changes: 12 additions & 56 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Personal NixOS & MacOS Configurations
# Personal NixOS System Configuration

![Screenshot](./data/nixos-screenshot.png "NixOS - Pantheon Desktop")

Expand All @@ -15,83 +15,39 @@
- Nano CLI Editor
- Visual Studio Code
- Opensnitch
- Firejail
- Steam

___

## Setup

### Nix Package Manager

Installing the Nix Package Manager (standalone), needed for Mac setup.

```bash
# Linux (non-NixOS)
sh <(curl -L https://nixos.org/nix/install) --daemon

# Mac
sh <(curl -L https://nixos.org/nix/install)

# Windows (run NixOS in WSL - following line is for non-NixOS distros)
sh <(curl -L https://nixos.org/nix/install) --no-daemon
```
## NixOS

[The official nix package manager installation guide](https://nixos.org/download.html#download-nix)
NixOS comes preinstalled with the Nix package manager, update the nix package manager configuration to enable the `nix-command` & `flakes` experimental features.

### Enabling Nix Flakes

Edit **/etc/nix/nix.conf** and add/modify the following line:

```bash
```conf
experimental-features = nix-command flakes
```

___

## NixOS
### Setup

NixOS comes preinstalled with the Nix package manager, execute the following within the project directory:
Execute the following within the project directory:

```bash
# Basic switch
sudo nixos-rebuild switch --flake ./#<hostname>
sudo nixos-rebuild switch --flake ./#machine-hostname

# Switch with upgrade
sudo nixos-rebuild switch --flake ./#<hostname> --upgrade
sudo nixos-rebuild switch --flake ./#machine-hostname --upgrade

# Example
sudo nixos-rebuild switch --flake ./#AMZ-Linux
```

___

## Mac (Nix Darwin)

[Nix Darwin](https://github.com/LnL7/nix-darwin) is similar to NixOS. This project aims to bring the convenience of a declarative system approach to macOS.

An additional installation step is required:

```bash
# Nix Package Manager is needed for this step
nix-build https://github.com/LnL7/nix-darwin/archive/master.tar.gz -A installer

# Run the installer
./result/bin/darwin-installer
```

After Nix Darwin has been installed, execute the following within the project directory:

```bash
# Basic switch
darwin-rebuild switch --flake ./#<hostname>

# Example (inside root of project)
darwin-rebuild switch --flake ./#AMZ-MacBook
```

___

## Nix Flakes Commands

Inside the root of the project directory execute the following:
Expand All @@ -109,11 +65,7 @@ nix flake update --refresh
Execute the following, if you would like to run garbage collection:

```bash
# NixOS
sudo nix-collect-garbage -d

# Nix Darwin
nix-collect-garbage -d
```

___
Expand All @@ -124,6 +76,10 @@ ___

- [Zero to Nix](https://zero-to-nix.com/)

### Installers

- [The Determinate Nix Installer](https://github.com/DeterminateSystems/nix-installer)

### Manuals

- [NixOS Manual](https://nixos.org/nixos/manual)
Expand Down
Binary file modified data/nixos-screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d46e48d

Please sign in to comment.