Git Product home page Git Product logo

nix-os's Introduction

NH System Flake Configuration and Config files

NixOs

How to install from a clean install

Step 01: Disko time (optional)

Disko is a way to to declartive disk partitioning in NixOs. There is a good quickstart guide about it. The disko configurtion i am using is in the disko.nix file.

# Set the hostname
hostname="nixos"

# Define the keyfile name using the hostname with .luks.key extension
keyfile_name="${hostname}.luks.key"

# Generate the keyfile
dd if=/dev/urandom of=${keyfile_name} bs=1024 count=4

# Set appropriate permissions
chmod 600 ${keyfile_name}
# Read the keyfile content
keyfile_content=$(cat ${keyfile_name})

# Log in to Bitwarden CLI
bw login

# Create a secure note in Bitwarden with the keyfile content
bw create item '{"type": 2, "name": "'"${hostname} LUKS Keyfile"'", "notes": "'"${keyfile_content}"'"}'

Step 01: Clone the repo in ~/.setup folder

nix-env -iA nixos.curl
curl -Lks https://raw.githubusercontent.com/nickhartjes/nix-os/main/nixos/scripts/install.sh | /bin/bash

Step 02:

Decrypt the secrets in the folder.

git-crypt unlock

Step 03:

cd ~/.setup && sudo nixos-rebuild boot --flake .#$HOST

If you try building it before decrypting the secrets, it will fail. Encrypted files are in the Nixos store, please remove them first with sudo nix-collect-garbage -d. Then decrypt the folder and build again.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.