Fix: SDDM DM, SSH server, cleanup pi

This commit is contained in:
Scott Scoble 2026-05-16 16:04:16 -07:00
parent 5051dfdc8c
commit a6886b33f2
7 changed files with 149 additions and 68 deletions

82
flake.lock generated Normal file
View file

@ -0,0 +1,82 @@
{
"nodes": {
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1778954430,
"narHash": "sha256-oaNyOr05lblaQdtbkbN1wO0b2KLIL2O1LkmwDgdQp4I=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "26aaab785b0bab4af60a2c42b22760fa906ef22a",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"nixos-hardware": {
"locked": {
"lastModified": 1778945272,
"narHash": "sha256-Aipz0UiBhE2a1FYJrNc2y+5vKWo5QVkhmaIJk3/ls+g=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "379c1f274f0fa354d012f0600806de54e79f29b5",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "master",
"repo": "nixos-hardware",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1778869304,
"narHash": "sha256-30sZNZoA1cqF5JNO9fVX+wgiQYjB7HJqqJ4ztCDeBZE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d233902339c02a9c334e7e593de68855ad26c4cb",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"pi-mono": {
"flake": false,
"locked": {
"lastModified": 1778886387,
"narHash": "sha256-uEMGoJ8kNmqbXRyVgY9M42XxMLw6js2PhVlgF0JMD40=",
"ref": "refs/heads/main",
"rev": "b4ee3aaeea183b793d320d71eb91ee80c6a1c583",
"revCount": 4102,
"type": "git",
"url": "https://os.scoble.me/forgejo/sscoble/pi-mono.git"
},
"original": {
"type": "git",
"url": "https://os.scoble.me/forgejo/sscoble/pi-mono.git"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs",
"pi-mono": "pi-mono"
}
}
},
"root": "root",
"version": 7
}

View file

@ -1,5 +1,5 @@
{
description = "Scobleclaw — NixOS + home-manager configuration for personal laptop (x86_64) and work Mac (aarch64)";
description = "Scobleclaw NixOS + home-manager configuration";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
@ -18,49 +18,13 @@
linuxSystem = "x86_64-linux";
darwinSystem = "aarch64-darwin";
# Linux pkgs with overlay (pi, qmd)
linuxPkgs = import nixpkgs {
system = linuxSystem;
overlays = [ self.overlays.default ];
};
in {
# === Overlay: pi + qmd (Linux only) ===
overlays.default = final: prev: {
pi-coding-agent = final.buildNpmPackage {
pname = "pi-coding-agent";
version = "0.73.0";
src = pi-mono;
npmDepsHash = ""; # Fill after first build
npmWorkspace = "packages/coding-agent";
npmFlags = [ "--legacy-peer-deps" ];
dontNpmBuild = true;
preConfigure = ''
cd packages/ai && npm run build && cd ../..
cd packages/agent && npm run build && cd ../..
cd packages/tui && npm run build && cd ../..
cd packages/coding-agent && npm run build && cd ../..
'';
installPhase = ''
runHook preInstall
mkdir -p $out/lib/node_modules/@mariozechner/pi-coding-agent
cp -r packages/coding-agent/dist $out/lib/node_modules/@mariozechner/pi-coding-agent/
cp packages/coding-agent/package.json $out/lib/node_modules/@mariozechner/pi-coding-agent/
mkdir -p $out/bin
cat > $out/bin/pi <<'EOF'
#!/usr/bin/env bash
exec ${final.nodejs}/bin/node $out/lib/node_modules/@mariozechner/pi-coding-agent/dist/cli.js "$@"
EOF
chmod +x $out/bin/pi
runHook postInstall
'';
};
overlays.default = import ./pi-overlay.nix;
qmd = final.writeShellScriptBin "qmd" ''
exec ${final.bun}/bin/bunx --bun @tobilu/qmd "$@"
'';
};
# === NixOS: full system + desktop ===
nixosConfigurations.laptop = nixpkgs.lib.nixosSystem {
system = linuxSystem;
modules = [
@ -70,6 +34,7 @@
./modules/t490.nix
nixos-hardware.nixosModules.lenovo-thinkpad-t490
{ nixpkgs.config.allowUnfree = true; }
{ nixpkgs.overlays = [ self.overlays.default ]; }
{
home-manager = {
useGlobalPkgs = true;
@ -86,13 +51,13 @@
];
};
# === VM: minimal NixOS for testing (aarch64, UTM) ===
nixosConfigurations.vm = nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
modules = [
home-manager.nixosModules.home-manager
./modules/vm.nix
{ nixpkgs.config.allowUnfree = true; }
{ nixpkgs.overlays = [ self.overlays.default ]; }
{
home-manager = {
useGlobalPkgs = true;
@ -108,7 +73,6 @@
];
};
# === macOS: home-manager standalone (no desktop, no Hyprland) ===
homeConfigurations.sscoble = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.${darwinSystem};
modules = [
@ -121,10 +85,8 @@
];
};
# === Dev shell (Linux) ===
devShells.${linuxSystem}.default = linuxPkgs.mkShell {
buildInputs = with linuxPkgs; [
pi-coding-agent
qmd
nodejs
bun
@ -132,7 +94,7 @@
zsh
];
shellHook = ''
echo "🦞 Scobleclaw dev shell"
echo "Scobleclaw dev shell"
echo " pi: $(which pi)"
echo " qmd: $(which qmd)"
echo " node: $(node --version)"

View file

@ -0,0 +1,31 @@
# Do not modify this file! It was generated by ‘nixos-generate-config’
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "sdhci_pci" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/c8491535-8aa2-4893-833e-e261459c8683";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/49E1-827D";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices = [ ];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -4,7 +4,6 @@
# === Linux desktop packages ===
home.packages = with pkgs; [
# pi + qmd (from overlay)
pi-coding-agent
qmd
# Terminal
ghostty
@ -12,12 +11,12 @@
# Status bar
waybar
# App launcher
rofi-wayland
rofi
# Notifications
dunst
libnotify
# Wallpaper
swww
awww
# Lock + idle
hyprlock
hypridle
@ -80,12 +79,10 @@
# Autostart
exec-once = waybar
exec-once = dunst
exec-once = swww-daemon
exec-once = swww img ~/wallpapers/default.jpg
exec-once = wl-paste --type text --watch cliphist store
exec-once = wl-paste --type image --watch cliphist store
exec-once = hypridle
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
# Input
input {

View file

@ -2,13 +2,13 @@
{
# === Wayland + Hyprland ===
programs.hyprland = {
programs.hyprand = {
enable = true;
xwayland.enable = true; # For X11 apps (Electron, etc.)
xwayland.enable = true;
};
# Wayland essentials
environment.sessionVariables.NIXOS_OZONE_WL = "1"; # Force Wayland for Electron
# Session variables
environment.sessionVariables.NIXLOS_OZONE_WL = "1";
# Security — required for hyprlock
security.pam.services.hyprlock = {};
@ -28,28 +28,24 @@
};
};
# Display manager — greetd with tuigreet for lightweight login
services.greetd = {
# Display manager — SSDM (stable for Hyprand, doesn't lock TTY)
services.displayManager.sddm = {
enable = true;
settings = {
default_session = {
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --remember --cmd Hyprland";
user = "greeter";
};
};
wayland.enable = true;
};
# XDG portal for Wayland (screensharing, file dialogs)
# XDG portal for Wayland
xdg.portal = {
enable = true;
extraPortals = [ pkgs.xdg-desktop-portal-hyprland ];
extraPortals = [ pkgs.xdg-desktop-portal-hypranc ];
config.common.default = "*";
};
# Fonts for Waybar / desktop
# Fonts
fonts.packages = with pkgs; [
font-awesome
(nerdfonts.override { fonts = [ "JetBrainsMono" "FiraCode" ]; })
nerd-fonts.jetbrains-mono
nerd-fonts.fira-code
];
# Audio (pipewire)

View file

@ -1,10 +1,11 @@
{ config, pkgs, ... }:
{
imports = [ ../hardware-configuration.nix ];
# === System Packages ===
environment.systemPackages = with pkgs; [
# Core development tools
pi-coding-agent
qmd
nodejs
bun
@ -15,7 +16,7 @@
# System utilities
htop
neofetch
fastfetch
ripgrep
fd
jq
@ -54,6 +55,12 @@
users.defaultUserShell = pkgs.zsh;
# === SSH ===
# === SSH Server ===
services.openssh = {
enable = true;
settings.PasswordAuthentication = false;
};
programs.ssh = {
startAgent = true;
extraConfig = ''
@ -121,3 +128,4 @@
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
}

5
pi-overlay.nix Normal file
View file

@ -0,0 +1,5 @@
final: prev: {
qmd = final.writeShellScriptBin "qmd" ''
exec ${final.bun}/bin/bunx --bun @tobilu/qmd "$@"
'';
}