Digital Autonomy Workspace for Governments based on DAWO-Core
  • Nix 60.5%
  • Shell 39.5%
Find a file
opencode 92b3be1ccd
Some checks are pending
CI / check (push) Waiting to run
CI / iso (push) Blocked by required conditions
Apply DAWG branding to boot, login, and desktop
2026-12-03 22:07:05 +01:00
.forgejo/workflows Add CI workflow, expand baseline checks, and data-drive installer presets 2026-11-30 16:14:51 +01:00
data Generate installer presets from Nix data and validate against tzdata 2026-11-30 16:44:35 +01:00
modules Apply DAWG branding to boot, login, and desktop 2026-12-03 22:07:05 +01:00
.gitignore init 2026-11-28 17:10:33 +01:00
flake.lock init 2026-11-28 17:10:33 +01:00
flake.nix init 2026-11-28 17:10:33 +01:00
install.md Provide a default LUKS passphrase during installation 2026-12-03 15:31:20 +01:00
README.md Simplify installer disk confirmation and add DAWG branding 2026-11-30 21:52:17 +01:00

DAWG

Digital Autonomy Workspace for Governments. DAWG is a NixOS overlay on DAWO-Core: DAWO supplies the audited workplace baseline, DAWG supplies the government identity, application set, accounts, fleet services, and install/deploy outputs.

Layout

flake.nix                     pinned DAWO-Core input, flake-parts entry point
modules/flake-parts/          host matrix, deploy nodes, offline ISO, baseline check
modules/installer/            offline install backend and dialog TUI
modules/branding/             DAWG wallpaper, logo, Plasma/SDDM settings
modules/applications/         government workplace applications
modules/users/                named officials and break-glass administrator
modules/policy/               hardening level, compliance selection, Nix/OS policy
modules/hosts/profiles/       aggregate DAWG client profile
modules/hosts/                concrete hosts

Each Nix file contributes to flake.modules.nixos.<name>; import-tree collects them and host-machines.nix turns every hosts/<name> module into a nixosConfigurations.<name> output.

Module map

Module Purpose
flake-parts/flake-parts.nix Registers the flake.modules option and supported systems.
flake-parts/host-machines.nix Builds one NixOS system per hosts/* module.
flake-parts/deploy.nix deploy.nodes for every host, and a nix develop shell with deploy-rs.
flake-parts/installer-iso.nix Offline ISO carrying this flake, every pinned input, an offline tar.gz bundle, and the TUI.
installer/dawg-install-tui.sh Host/disk selection, password and SSH-key setup, confirmation, progress.
installer/dawg-install.sh Root-safe disko-install wrapper with offline flags and target credentials.
flake-parts/checks.nix Eval-time guard for the DAWG workplace baseline.
branding/desktop-dawg.nix DAWG wallpaper, avatar, fonts, panel and screen-lock settings.
applications/dawg-applications.nix Office, mail, chat, browsers, file sync, RDP/VPN, graphics and media tools, plus opt-in developer/editor tools (dawg.apps.dev.enable).
users/dawg-users.nix dawg-user and dawg-admin, both key-only and password-locked.
policy/dawg-policy.nix Hardened BIO/NCSC rule selection, firewall, SSH and Nix settings.
hosts/profiles/dawg-client.nix Client profile: DAWO core plus the DAWG blocks.
hosts/dawg-generic.nix Generic Intel laptop host.

Build and check

For a step-by-step laptop installation, see install.md.

nix flake check --no-build
nix build .#nixosConfigurations.dawg-generic.config.system.build.toplevel
nix build .#dawg-installer-iso --out-link result-iso

The ISO contains this flake and its locked inputs, so a machine can be installed without reaching a binary cache or source forge. It also carries /iso/dawg-offline.tar.gz, a transportable copy of the flake, locked inputs, host list, and installer scripts. The machine boots straight into a dialog-based installer on tty1; tty2 remains a root shell. The TUI:

  1. offers to open nmtui so you can select a Wi-Fi network (optional, skipped in unattended mode; disable with DAWG_WIFI_SETUP=0 or dawg.install.wifiSetup=0),
  2. asks for country/language, keyboard, and time zone (worldwide presets, including South America and Japan; custom option for any region),
  3. lists every nixosConfigurations host from this flake,
  4. lists eligible disks by device, size, and model, hiding the ISO device and disks with mounted partitions,
  5. asks for a break-glass admin password and a daily user password (hashed locally with SHA-512 before any disk is touched),
  6. asks for optional SSH public keys for both accounts,
  7. asks you to choose Erase and install or Cancel before wiping the disk,
  8. runs disko-install with a stage-based progress bar and live status. Full output is available on tty2 in /tmp/dawg-install.*.log.

Passwords are written into the target as /etc/dawg/dawg-admin.hash and /etc/dawg/dawg-user.hash; no plaintext or secret is stored in this repository or in the ISO.

To customize the live ISO's welcome screen, console colors, or boot artwork, import nixosModules.dawg-installer in your own NixOS ISO configuration. See Branding the installer ISO for an example.

Unattended install

For fleet imaging, place a preseed on the ISO image (or pass the equivalent kernel arguments) and boot:

# /iso/dawg/preseed.env
DAWG_HOST=dawg-generic
DAWG_DISK=/dev/nvme0n1
DAWG_ADMIN_HASH_FILE=/iso/dawg/admin.hash
DAWG_USER_HASH_FILE=/iso/dawg/user.hash
DAWG_ADMIN_KEY="ssh-ed25519 AAAA... admin@example.invalid"
DAWG_AUTO_REBOOT=1
DAWG_UNATTENDED=1

Kernel arguments are dawg.install.host, dawg.install.disk, dawg.install.adminHashFile, dawg.install.userHashFile, dawg.install.confirmWipe=WIPE-<disk>, dawg.install.autoReboot=1, dawg.install.unattended=1, and dawg.install.wifiSetup=0. Unattended mode requires both hash files and an explicit wipe confirmation token; generate hashes on a trusted machine with printf '%s' 'password' | mkpasswd -m sha-512 -s > admin.hash. Do not ship plaintext passwords in the ISO.

A manual equivalent is also available from a root shell:

sudo dawg-install --host dawg-generic --disk /dev/nvme0n1 \
  --admin-hash-file /path/admin.hash --user-hash-file /path/user.hash

dawg-install calls disko-install with the LUKS/Btrfs layout from DAWO-Core, forces offline Nix (substituters = ""), and passes the extra files/SSH keys to the target configuration. Always check the device name before confirming.

Adding a host

Create modules/hosts/<name>.nix with a flake.modules.nixos."hosts/<name>" module. Import a hardware module and profiles-dawg-client, then set networking.hostName. It automatically becomes a NixOS configuration, a deploy node, and (after adding it to installHosts) part of the offline ISO.

Accounts and secrets

No passwords or private keys are stored in this repository. dawg-user and dawg-admin each have a password: NixOS reads their SHA-512 hashes at activation from root-readable runtime files:

/etc/dawg/dawg-admin.hash
/etc/dawg/dawg-user.hash

Generate a hash with printf '%s' 'password' | mkpasswd -m sha-512 -s and install it with mode 600 before switching. Changing a password on the device with passwd lasts until the next rebuild, which restores the hash from the file.

SSH public keys can also be configured at build time:

dawg.organization.adminKeys = [ "ssh-ed25519 AAAA... admin@example.invalid" ];
dawg.organization.userKeys = [ "ssh-ed25519 AAAA... official@example.invalid" ];

Set them per host or in the profile before deployment; an empty adminKeys list produces an evaluation warning, though password login still works. The core bootstrap account is disabled. The deploy account comes from DAWO-Core and also needs an SSH key before deploy can be used.

Updates and compliance

The profile enables DAWO's comin-based auto-update, the hardened rule level, and the bio and ncsc rule selections; dawo-verify runs daily and after activation. The default update repository is upstream DAWO-Core. Before a fleet rollout, point dawo.autoUpdate.options.repoUrl and branch at your own DAWG repository so devices receive this overlay, not just the core.

nix flake check evaluates checks.x86_64-linux.dawg-baseline. It fails when a host loses the password manager, office suite, screen lock, firewall, hardened rule level, git-driven updates, DAWG branding, or when a shared bootstrap password reappears.

Scope notes

  • hardware-generic-intel is a starting point, not a model profile. Add a nixos-hardware/nixos-facter profile for each purchased machine type.
  • Secure Boot stays off until sbctl keys are enrolled; then set dawo.secureboot.enable = true and rebuild.
  • Opt-in controls such as USBGuard and AppArmor are declared by DAWO-Core but left off by default; enable them per host after a canary test.