Hosts - hxrmonlka/alice GitHub Wiki

System Hosts

System hosts are made for many reasons and purposes, since putting a lot of features in one host could lead to rebuilding for hours, each needs are separated using hosts listed below.

Each host registers itself in modules/hosts/default.nix with easy-hosts:

easy-hosts.hosts = {
  serpentine.modules = [self.custom.serpentine.hostConfig];
  tanuki.modules = [self.custom.tanuki.hostConfig];
};

Serpentine

  • Reference.
  • Purpose: The primary host of Alice. The main NixOS host (desktop).
  • Managed by: hxrmonlka and yixanni.
  • User: alice (zsh), configured with Home Manager.
  • Hardware modules:
    • noctHardware: the hardware profile (BTRFS, kvm-intel).
    • intelSettings: Intel GPU with generation = "legacy". See Intel.
    • otdSettings: OpenTabletDriver.
  • Kernel: CachyOS (linuxPackages-cachyos-latest), from the nix-cachyos-kernel input.
  • Bootloader: GRUB. The theme comes from a Lumina package.
  • Desktop: Niri and mango, with DankMaterialShell. The DMS greeter module is dgreet.
  • Main use: daily activities.

Tanuki

  • Reference.
  • It serves as the host for ASUS TUF A15.
  • Managed by: seiryouden.
  • User: konoe, configured with Home Manager (Niri, Noctalia, Alacritty, VS Code, Zen Browser, Spotify).
  • Hardware modules:
    • asustuf: the hardware profile (ext4, kvm-amd).
    • asusSettings: the asus-fa506nc profile from nixos-hardware, Nvidia PRIME offload, and Vulkan tools.
  • Desktop: GNOME with GDM. asusd runs for the keyboard backlight, and a oneshot service sets a static color.
  • Main use: slightly more for the gaming side.

Other systems

  • modules/systems is for non-NixOS Linux distributions, mainly because other people like yixanni does not daily drive a NixOS system, and yet, they still prefer managing their dotfiles through Nix with Alice.

Adding a host

  1. Add a namespace for the host in modules/parts.nix.
  2. Create modules/hosts/<name>/configuration.nix. Define flake.custom.<name>.hostConfig in it.
  3. Put the other parts of the host in modules/hosts/<name>/settings/. Each file defines flake.custom.<name>.<module>. Import them in hostConfig.
  4. Import the Lumina signatures in hostConfig: inputs.lumina.lib.signatures.mkHostSignature "<name>" for the host, and mkUserSignature "<name>" "<user>" for each user.
  5. Register the host in modules/hosts/default.nix.

Testing a host in a VM

nix develop
build-vm serpentine

build-vm <host> builds the host as a QEMU VM and starts it. Run it without an argument to list the hosts.

⚠️ **GitHub.com Fallback** ⚠️