From 11ba75e40728e8b5735c9c7cefc7af1631c942af Mon Sep 17 00:00:00 2001 From: "Henry J. Webster" Date: Thu, 30 Jul 2026 10:38:54 -0500 Subject: Restructure into a multi-machine flake and add the enzo laptop Split the single-host config into a shared minimal base plus opt-in profiles, and add a second machine (enzo laptop) alongside kusanagi. - flake: add mkMachine helper; declare nixosConfigurations.kusanagi and .enzo; add the disko input; move overlays per-machine. - common/: minimal base only (boot, networking, tailscale, locale, nix settings, neovim editor). Old configuration.nix/programs.nix removed. - profiles/: coarse opt-in bundles (desktop, dev, apps). kusanagi imports all three and stays byte-for-byte identical to the running system. - machines/kusanagi/: all workstation-only config (ROCm, Scarlett audio, optical-disc archiving, NAS mounts, kavita/immich/ollama); hardware config moved here unchanged. User stays 'henz'. - machines/enzo/: new laptop. Declarative LUKS+btrfs via disko (LVM-on-LUKS, TPM2+PIN unlock, zram + encrypted swap for suspend-then-hibernate); its own minimal niri desktop with playback-only audio (no rtkit/jack); user 'hwebs'. Assisted-by: Claude:claude-opus-4-8 --- machines/enzo/desktop.nix | 68 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 machines/enzo/desktop.nix (limited to 'machines/enzo/desktop.nix') diff --git a/machines/enzo/desktop.nix b/machines/enzo/desktop.nix new file mode 100644 index 0000000..8fb68ef --- /dev/null +++ b/machines/enzo/desktop.nix @@ -0,0 +1,68 @@ +# Minimal niri desktop for enzo — deliberately separate from ../../profiles/desktop.nix +# so the laptop can grow on its own terms. Add to it (or switch to the shared +# profile) whenever you want more. +{ pkgs, ... }: + +{ + # --- Session / login --- + programs.niri.enable = true; + programs.dconf.enable = true; + + services.greetd = { + enable = true; + settings.default_session = { + command = "${pkgs.tuigreet}/bin/tuigreet --time --remember --cmd niri-session"; + user = "greeter"; + }; + }; + # Let tuigreet write its cache (for --remember). + systemd.services.greetd.serviceConfig = { + Type = "idle"; + StandardInput = "tty"; + StandardOutput = "tty"; + StandardError = "journal"; + TTYReset = true; + TTYVHangup = true; + TTYVTDisallocate = true; + }; + + # --- Graphics --- + hardware.graphics.enable = true; + + # --- Audio (playback only; no rtkit/jack — enzo isn't for recording). + # If you ever hear dropouts under load, add: security.rtkit.enable = true; + services.pulseaudio.enable = false; + services.pipewire = { + enable = true; + alsa.enable = true; + pulse.enable = true; + }; + + # --- Fonts (minimal) --- + fonts.enableDefaultPackages = true; + fonts.packages = with pkgs; [ + noto-fonts + nerd-fonts.symbols-only + ]; + + environment.sessionVariables = { + XCURSOR_THEME = "Adwaita"; + XCURSOR_SIZE = "24"; + }; + + # --- User: groups + niri essentials --- + users.users.hwebs.extraGroups = [ + "audio" + "input" + ]; + + users.users.hwebs.packages = with pkgs; [ + ghostty # terminal + fuzzel # launcher + swaybg # wallpaper + xwayland-satellite # run X11 apps under niri + networkmanagerapplet # wifi tray + mako # notifications + libnotify # notify-send + ]; +} -- cgit v1.3