Skip to content

Fork of iynaix/dotfiles - My configuration for NixOS.

Notifications You must be signed in to change notification settings

rotteegher/rotfiles

 
 

Repository files navigation

Rotteegher's NixOS Config

Forked from iynaix/dotfiles.

This config is intended to be used with NixOS. There is experimental support for running the dotfiles on legacy operating systems.

Features

  • Multiple NixOS configurations, including desktop, laptops and VM
  • Persistence via impermanence (both / and /home)
  • Automatic ZFS snapshots with rotation
  • Flexible NixOS / Home Manager config via feature flags
  • sops-nix for managing secrets [WIP]
  • Hyprland with waybar setup, with screen capture
  • Dynamic colorschemes using wallust (pywal, but maintained)

How to Install

Run the following commands from a terminal on a NixOS live iso or from a tty on the minimal iso.

The following install script partitions the disk, sets up the necessary datasets and installs NixOS.

sh <(curl -L https://raw.githubusercontent.com/rotteegher/rotfiles/master/install.sh)

Reboot your system.

Creating Persist Snapshot to Restore

Filesystem snapshot

sudo zfs snapshot zroot/persist@persist-snapshot

File snapshot

sudo zfs send zroot/persist@persist-snapshot > SNAPSHOT_FILE_PATH

Restoring from Persist Snapshot

Use recover.sh script or...

Recover from file snapshot manually:

# the rename is needed for encrypted datasets, as -F doesn't work
sudo zfs receive -o mountpoint=legacy zroot/persist-new < SNAPSHOT_FILE_PATH
sudo zfs rename zroot/persist zroot/persist-old
sudo zfs rename zroot/persist-new zroot/persist

Recover from filesystem snapshot manually:

sudo zfs rename zroot/persist zroot/persist-old
sudo zfs rename zroot/existing_filesystem_snapshotname zroot/persist

Create Password Files (When Not Using Persist Snapshot)

This is not needed if restoring from persist snapshot.

mkdir -p /persist/etc/shadow
mkpasswd -m sha-512 'USER_PASSWORD' | sudo tee -a /persist/etc/shadow/root
mkpasswd -m sha-512 'USER_PASSWORD' | sudo tee -a /persist/etc/shadow/iynaix
mkpasswd -m sha-512 'USER_PASSWORD' | sudo tee -a /persist/etc/shadow/rot
mkpasswd -m sha-512 'USER_PASSWORD' | sudo tee -a /persist/etc/shadow/anyotheruser

System Rescue for Bootloader.

Run the following commands from a terminal on a NixOS live iso / from a tty on the minimal iso.

The following script optionally reformats the boot partition and / or /nix dataset, then reinstalls NixOS.

sh <(curl -L https://raw.githubusercontent.com/rotteegher/rotfiles/master/recover.sh)

Check out iynaix/dotfiles

This repo was forked from my friend Iynaix's config

Screenshots of the rice

Rice1 Rice2

About

Fork of iynaix/dotfiles - My configuration for NixOS.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Nix 76.4%
  • Rust 14.0%
  • Shell 8.3%
  • GLSL 1.3%