Files
homelab/hosts/terra/home.nix
T
darmanandClaude Opus 5 2abd842e97 terra: tome, rootless podman for GPU containers, direnv, kicad
- 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>
2026-08-06 03:32:06 +02:00

107 lines
3.0 KiB
Nix

{ pkgs, unstable, inputs, ... }:
let
tome = pkgs.callPackage ../../pkgs/tome.nix { src = inputs.tome; };
in
{
imports = [ ./home/hyprland.nix ./home/theme.nix ];
home.stateVersion = "26.05";
home.keyboard.layout = "de";
programs.git = {
enable = true;
settings = {
user.name = "Erik Simon";
user.email = "mail@erik-s.dev";
};
};
programs.home-manager.enable = true;
programs.zsh.enable = true;
# direnv + nix-direnv: lets per-repo devShells (e.g. ~/Data/Dev/repos/Tome's
# flake.nix) auto-load in the shell AND in Rider via its "direnv
# integration" plugin, instead of every dev repo needing its own
# jetbrains-toolbox SDK wiring by hand.
programs.direnv = {
enable = true;
nix-direnv.enable = true;
};
# Rootless podman: containers run as darman, not root. services/containers.nix
# gives us the `docker` CLI shim (dockerCompat), but compose v2 is a separate
# binary and talks to a socket rather than the CLI — the NixOS podman module
# enables the *user* socket (systemd.user.sockets.podman), so point compose at
# it instead of the root /var/run/docker.sock.
home.sessionVariables.DOCKER_HOST = "unix:///run/user/1000/podman/podman.sock";
xdg.userDirs = {
enable = true;
};
xdg.mime.enable = true;
xdg.configFile."quickshell".source = ../../dotfiles/quickshell;
xdg.configFile."scripts".source = ../../dotfiles/scripts;
home.packages = [
(pkgs.writeTextDir "share/mime/packages/application-x-ms-sln.xml"
(builtins.readFile ../../dotfiles/mime/application-x-ms-sln.xml))
unstable.claude-code
pkgs.opencode
pkgs.quickshell
pkgs.github-cli
pkgs.tea
pkgs.docker-compose
pkgs.hyprcursor
pkgs.bibata-cursors
pkgs.papirus-icon-theme
tome
];
xdg.desktopEntries.btop = {
name = "btop++";
genericName = "System Monitor";
exec = "btop";
icon = "btop";
terminal = true;
categories = [ "System" "Monitor" ];
noDisplay = true;
};
programs.alacritty = {
enable = true;
settings = {
env.SHELL = "${pkgs.zsh}/bin/zsh";
terminal.shell = {
program = "${pkgs.zsh}/bin/zsh";
args = [ "-l" ];
};
window = {
padding = { x = 10; y = 10; };
opacity = 0.8;
};
font.normal = {
family = "DepartureMono Nerd Font";
style = "Regular";
};
colors.primary = {
background = "#0F1012";
foreground = "#ffd369";
};
# hints.enabled = [
# {
# hyperlinks = true;
# regex = "(ipfs:|ipns:|magnet:|mailto:|gemini://|gopher://|https://|http://|news:|file:|git://|ssh:|ftp://)[^\\u0000-\\u001F\\u007F-\\u009F<>\"\\s{-}\\^⟨⟩`]+";
# command = "xdg-open";
# mouse.enabled = true;
# }
# ];
keyboard.bindings = [
# ESC + CR: nix has no literal escape for the ESC control char, so
# fromJSON decodes it from the JSON unicode escape below.
{ key = "Return"; mods = "Shift"; chars = builtins.fromJSON ''"\u001B\r"''; }
];
};
};
}