TeeWallz / dotfiles-flake

Minimal flake for NixOS on ZFS installation.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Minimal NixOS on ZFS Configuration

This repository contains a minimal configuration needed to install NixOS with ZFS as root filesystem.

Directory Structure

flake.nix                    # entry point.
                             # Defines input and output.

configuration.nix            # common configuration shared by all hosts

# custom functions
/my/default.nix              # imports lib.nix
/my/lib.nix                  # defines my.lib.mkHost function
			       #
			       # this function takes per-host configuration as input
			       # and then apply them to NixOS modules
			       # produces system configuration as result


# per-host configuration
/hosts
/hosts/qinghe/default.nix
/hosts/exampleHost/default.nix

# custom NixOS modules
/modules/default.nix         # imports other modules
/modules/networking          # defines my.networking options
/modules/fileSystems         # defines my.filesystems options
/modules/users               # defines my.users options
/modules/programs            # imports sway module
/modules/programs/sway       # defines my.programs.sway options
/modules/boot/               # defines my.boot options

# custom NixOS modules, not enabled by default
# "yc" is my user name
/modules/per-user            # imports yc module
/modules/per-user/yc         # defines my.yc.enable option
/modules/per-user/yc/*       # defines my.yc.* options

Usage Notes

This configuration use doas instead of the usual sudo command.

I hope this minimal example can serve as an inspiration for your own NixOS configuration. Happy Nixing!

About

Minimal flake for NixOS on ZFS installation.

License:Apache License 2.0


Languages

Language:Nix 67.3%Language:Perl 20.7%Language:Shell 4.2%Language:Emacs Lisp 4.0%Language:CSS 2.4%Language:HTML 1.5%