dnf-test/usr/config.yaml
2025-10-27 00:08:16 -02:00

177 lines
4.5 KiB
YAML

# Nix generator configuration file for Darkone NixOS Framework (common file)
# Global network configuration is converted in lists / attSets to be used in
# your nix configuration through "network" special arg.
network:
domain: "darkone.lan" # required
timezone: "America/Miquelon"
locale: "fr_FR.UTF-8"
gateway:
hostname: "gateway" # required (if gateway key exists)
wan:
interface: "eth0" # required
gateway: "192.168.0.1" # required
lan:
interfaces: ["enu1u4"] # required
ip: "192.168.1.1"
prefixLength: 24
dhcp-range:
- "192.168.1.100,192.168.1.230,24h"
dhcp-extra-option: # option
- "option:ntp-server,191.168.1.1"
extraHosts:
"192.168.0.1": ["box"]
#------------------------------------------------------------------------------
# Nix DNF static hosts (nested hosts.<type>)
#------------------------------------------------------------------------------
# Static users
# -> profile is the HomeManager profile
# -> groups is used to select related hosts
users:
# A nix administrator
nixos:
uid: 1000
name: "An admin user"
profile: "admin"
groups: ["admin"]
# A real user with its own profile "darkone"
darkone:
uid: 1001
name: "Darkone Linux"
email: "darkone@darkone.yt"
profile: "darkone"
groups: ["admin", "media", "common"]
# A student with specific profile "student"
ethan:
uid: 1002
name: "Ethan"
profile: "student"
groups: ["sn", "tsn"]
# A child of my home network
esteban:
uid: 1003
name: "Esteban"
profile: "teenager"
groups: [ "kids", "common" ]
# Hosts declaration
# -> name: human readable name or description
# -> profile: the host profile related to this host
# -> users: a list of existing user logins
# -> groups: used to select related users
# -> tags: added to colmena tags for deployment filtering.
# -> local: true is only for the local (master) machine.
hosts:
# Static hosts
static:
# The gateway
- hostname: "gateway"
name: "Local Gateway"
arch: "aarch64-linux"
profile: "gateway"
groups: ["admin"]
aliases: ["gateway", "passerelle"]
services:
homepage:
ncps:
forgejo:
title: "Our local forge"
lldap:
# A laptop
- hostname: "my-laptop"
name: "My Laptop"
profile: "laptop"
users: ["nixos"]
groups: ["admin", "common"]
tags: ["laptops", "admin"]
aliases: ["my-laptop", "darkone"] # Host name aliases
interfaces:
- mac: "e8:ff:1e:d0:44:82"
ip: "192.168.1.2"
- mac: "e8:ff:1e:d0:44:83"
ip: "192.168.1.82"
services:
homepage:
domain: "laptop-home"
immich:
title: "My pictures"
description: "A very cool images app"
domain: "photos"
icon: "immich"
nextcloud:
domain: "cloud"
# Host groups by range (generated from min to max)
range:
# 12 workstations based on the profile "workstation"
- hostname: "pc%'02s"
name: "Workstation %d"
profile: "workstation"
range: [1, 4]
groups: ["tsn", "sn"]
hosts:
1:
interfaces:
- mac: "08:00:27:03:BB:20"
ip: "192.168.1.101"
2:
interfaces:
- mac: "08:00:27:AE:49:7F"
ip: "192.168.1.102"
3:
interfaces:
- mac: "08:00:27:EA:85:CB"
ip: "192.168.1.103"
4:
interfaces:
- mac: "08:00:27:A4:B1:36"
ip: "192.168.1.104"
# List of similar hosts (each item is a host)
list:
# 3 similar hosts (for the default network)
- hostname: "laptop-%s"
name: "Laptop %s"
profile: "home-laptop"
groups: ["common"]
users: ["darkone"]
hosts:
kids:
name: "Kids"
interfaces:
- mac: "f0:1f:af:13:61:c6"
ip: "192.168.1.20"
family:
name: "Kids"
interfaces:
- mac: "f0:1f:af:13:61:c7"
ip: "192.168.1.21"
# Nix DNF hosts from LLDAP (wip)
# Contains users and groups
# users <-> groups <-> hosts
#------------------------------------------------------------------------------
hostProvider:
lldap:
enabled: false
# Use nsswitch to login users, otherwise user configurations are
# generated in the nix configuration
#nss: false # Not implemented yet
url: "ldap://localhost:3890"
bind:
user: "admin"
passwordFile: "lldap" # located in usr/secrets