easy-hosts

easy-hosts lets you define multiple nixos and darwin configurations agnosticly. Whilst providing a nice user interface via shared configurations and perClass configurations meaning that easy-hosts remains highly extensible.

Installation

To use these options, add to your flake inputs:

easy-hosts.url = "github:tgirlcloud/easy-hosts";

and inside the mkFlake:

imports = [ inputs.easy-hosts.flakeModule ];

Run nix flake lock and you're set.

Options

easy-hosts.additionalClasses

Additional classes and their respective mappings to already existing classes

Type: attribute set of string

Default: { }

Example:

{ wsl = "nixos"; rpi = "nixos"; macos = "darwin"; }

Declared by:

easy-hosts.autoConstruct

Whether to enable Automatically construct hosts.

Type: boolean

Default: false

Example: true

Declared by:

easy-hosts.hosts

Hosts to be defined by the flake

Type: attribute set of (submodule)

Default: { }

Declared by:

easy-hosts.hosts.<name>.arch

The architecture of the host

Type: one of “x86_64”, “aarch64”, “armv6l”, “armv7l”, “i686”, “powerpc64le”, “riscv64”

Default: "x86_64"

Example: "aarch64"

Declared by:

easy-hosts.hosts.<name>.class

The class of the host

Type: one of “nixos”, “darwin”, “iso”

Default: "nixos"

Example: "darwin"

Declared by:

easy-hosts.hosts.<name>.deployable

Whether to enable Is this host deployable.

Type: boolean

Default: false

Example: true

Declared by:

easy-hosts.hosts.<name>.modules

‹name› modules to be included in the system

Type: list of module

Default: [ ]

Example:

[ ./hardware-configuration.nix ./networking.nix ]

Declared by:

easy-hosts.hosts.<name>.path

Path to the directory containing the host files

Type: null or path

Default: null

Example: ./hosts/myhost

Declared by:

easy-hosts.hosts.<name>.specialArgs

‹name› special arguments to be passed to the system

Type: lazy attribute set of raw value

Default: { }

Example:

{ foo = "bar"; }

Declared by:

easy-hosts.onlySystem

Only construct the hosts with for this platform

Type: null or string

Default: null

Example: aarch64-darwin

Declared by:

easy-hosts.path

Path to the directory containing the host files

Type: null or path

Default: null

Example: ./hosts

Declared by:

easy-hosts.perClass

Per class settings

Type: function that evaluates to a(n) (submodule)

Default: <function>

Example:

class: { modules = [ { system.nixos.label = class; } ]; specialArgs = { }; }

Declared by:

easy-hosts.perClass.<function body>.modules

Per class modules to be included in the system

Type: list of module

Default: [ ]

Example:

[ ./hardware-configuration.nix ./networking.nix ]

Declared by:

easy-hosts.perClass.<function body>.specialArgs

Per class special arguments to be passed to the system

Type: lazy attribute set of raw value

Default: { }

Example:

{ foo = "bar"; }

Declared by:

easy-hosts.shared.modules

Shared modules to be included in the system

Type: list of module

Default: [ ]

Example:

[ ./hardware-configuration.nix ./networking.nix ]

Declared by:

easy-hosts.shared.specialArgs

Shared special arguments to be passed to the system

Type: lazy attribute set of raw value

Default: { }

Example:

{ foo = "bar"; }

Declared by: