- install tome from pkgs/tome.nix, built against the re-added flake input - import services/containers.nix and put darman in `render`/`video`: /dev/dri/renderD128 is root:render 0660, so a rootless container can only reach the GPU if the host user is in the group. Needed by the Vulkan whisper.cpp/llama.cpp containers in content-trigger-scanner. - point DOCKER_HOST at the podman *user* socket and add docker-compose. dockerCompat gives a `docker` CLI shim, but compose v2 is its own binary talking to a socket, and rootless podman's socket is the user one under /run/user/1000 — not root's /var/run/docker.sock. - direnv + nix-direnv, so per-repo devShells load in the shell and in Rider via its direnv plugin, instead of hand-wiring a toolbox SDK per repo - kicad as a flatpak, alongside the other flatpak desktop apps Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
103 lines
3.5 KiB
Nix
103 lines
3.5 KiB
Nix
# ---- TERRA ----
|
|
{ config, pkgs, lib, inputs, ... }:
|
|
|
|
let
|
|
unstable = import inputs.nixpkgs-unstable {
|
|
inherit (pkgs.stdenv.hostPlatform) system;
|
|
config = pkgs.config;
|
|
};
|
|
in
|
|
{
|
|
imports = [
|
|
./hardware-configuration.nix
|
|
./disk-config.nix
|
|
./secrets.nix
|
|
../../common.nix
|
|
../../services/containers.nix
|
|
../../services/vpn/tailscale.nix
|
|
../../services/desktop/desktop-hyprland.nix
|
|
../../services/desktop/desktop-apps.nix
|
|
];
|
|
|
|
networking.hostName = "terra";
|
|
|
|
services.flatpak = {
|
|
enable = true;
|
|
remotes = [{ name = "flathub"; location = "https://dl.flathub.org/repo/flathub.flatpakrepo"; }];
|
|
packages = [
|
|
{ appId = "com.github.tchx84.Flatseal"; origin = "flathub"; }
|
|
{ appId = "com.blitzfc.qbz"; origin = "flathub"; }
|
|
{ appId = "com.discordapp.Discord"; origin = "flathub"; }
|
|
{ appId = "org.telegram.desktop"; origin = "flathub"; }
|
|
{ appId = "com.bambulab.BambuStudio"; origin = "flathub"; }
|
|
{ appId = "org.kicad.KiCad"; origin = "flathub"; }
|
|
];
|
|
};
|
|
|
|
environment.systemPackages = [ unstable.proton-pass-cli ];
|
|
|
|
# ---- nix-ld: lets generic dynamically-linked Linux binaries run as-is —
|
|
# needed for editor extensions (Zed/VSCode LSPs, debuggers, etc.) that
|
|
# download prebuilt binaries not built for NixOS. See
|
|
# https://nix.dev/permalink/stub-ld ----
|
|
programs.nix-ld.enable = true;
|
|
|
|
# ---- home-manager (user-level config for darman) ----
|
|
home-manager.useGlobalPkgs = true;
|
|
home-manager.useUserPackages = true;
|
|
home-manager.backupFileExtension = "hm-bak";
|
|
home-manager.extraSpecialArgs = { inherit unstable inputs; };
|
|
home-manager.users.darman = import ./home.nix;
|
|
|
|
# ---- Boot (UEFI) ----
|
|
boot.loader.systemd-boot.enable = true;
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
|
hardware.cpu.amd.updateMicrocode = true;
|
|
|
|
# mercury (aarch64) is built/flashed from here. Without this, `nix build`
|
|
# for it dies with "platform mismatch" — no qemu binfmt handler registered
|
|
# and aarch64-linux missing from nix.settings.extra-platforms. This module
|
|
# sets up both (see CLAUDE.md's aarch64 gotcha).
|
|
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
|
|
|
# ---- GPU (Radeon RX 6800 XT / Navi 21) ----
|
|
hardware.enableRedistributableFirmware = true;
|
|
boot.initrd.kernelModules = [ "amdgpu" ];
|
|
|
|
# /dev/dri/renderD128 is root:render 0660, so rootless podman containers can
|
|
# only reach the GPU if the *host* user is in render. Needed by the Vulkan
|
|
# whisper.cpp/llama.cpp containers in ~/Data/Dev/repos/content-trigger-scanner.
|
|
users.users.darman.extraGroups = [ "render" "video" ];
|
|
|
|
# ---- Dev-data disks — NOT in disko, mounted read-write, never wiped ----
|
|
fileSystems."/mnt/hdd_01" = {
|
|
device = "/dev/disk/by-uuid/b8445126-ec6d-4f88-818a-d9e13031d9a4";
|
|
fsType = "ext4";
|
|
options = [ "nofail" ];
|
|
};
|
|
fileSystems."/mnt/ssd_01" = {
|
|
device = "/dev/disk/by-uuid/6ca18a9f-27bc-4e58-aea8-de43a0d0ed5d";
|
|
fsType = "ext4";
|
|
options = [ "nofail" ];
|
|
};
|
|
|
|
# jupiter's samba share (services/network/samba.nix) — mounted on demand so
|
|
# terra doesn't stall boot/login when jupiter is off or unreachable.
|
|
fileSystems."/mnt/jupiter" = {
|
|
device = "//jupiter/data";
|
|
fsType = "cifs";
|
|
options = [
|
|
"credentials=${config.sops.templates."jupiter-smb.credentials".path}"
|
|
"uid=1000"
|
|
"gid=100"
|
|
"nofail"
|
|
"x-systemd.automount"
|
|
"x-systemd.idle-timeout=60"
|
|
"x-systemd.mount-timeout=10s"
|
|
"_netdev"
|
|
];
|
|
};
|
|
|
|
system.stateVersion = "26.05";
|
|
}
|