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 = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
@ -18,49 +18,13 @@
linuxSystem = "x86_64-linux"; linuxSystem = "x86_64-linux";
darwinSystem = "aarch64-darwin"; darwinSystem = "aarch64-darwin";
# Linux pkgs with overlay (pi, qmd)
linuxPkgs = import nixpkgs { linuxPkgs = import nixpkgs {
system = linuxSystem; system = linuxSystem;
overlays = [ self.overlays.default ]; overlays = [ self.overlays.default ];
}; };
in { in {
# === Overlay: pi + qmd (Linux only) === overlays.default = import ./pi-overlay.nix;
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
'';
};
qmd = final.writeShellScriptBin "qmd" ''
exec ${final.bun}/bin/bunx --bun @tobilu/qmd "$@"
'';
};
# === NixOS: full system + desktop ===
nixosConfigurations.laptop = nixpkgs.lib.nixosSystem { nixosConfigurations.laptop = nixpkgs.lib.nixosSystem {
system = linuxSystem; system = linuxSystem;
modules = [ modules = [
@ -70,6 +34,7 @@
./modules/t490.nix ./modules/t490.nix
nixos-hardware.nixosModules.lenovo-thinkpad-t490 nixos-hardware.nixosModules.lenovo-thinkpad-t490
{ nixpkgs.config.allowUnfree = true; } { nixpkgs.config.allowUnfree = true; }
{ nixpkgs.overlays = [ self.overlays.default ]; }
{ {
home-manager = { home-manager = {
useGlobalPkgs = true; useGlobalPkgs = true;
@ -86,13 +51,13 @@
]; ];
}; };
# === VM: minimal NixOS for testing (aarch64, UTM) ===
nixosConfigurations.vm = nixpkgs.lib.nixosSystem { nixosConfigurations.vm = nixpkgs.lib.nixosSystem {
system = "aarch64-linux"; system = "aarch64-linux";
modules = [ modules = [
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
./modules/vm.nix ./modules/vm.nix
{ nixpkgs.config.allowUnfree = true; } { nixpkgs.config.allowUnfree = true; }
{ nixpkgs.overlays = [ self.overlays.default ]; }
{ {
home-manager = { home-manager = {
useGlobalPkgs = true; useGlobalPkgs = true;
@ -108,7 +73,6 @@
]; ];
}; };
# === macOS: home-manager standalone (no desktop, no Hyprland) ===
homeConfigurations.sscoble = home-manager.lib.homeManagerConfiguration { homeConfigurations.sscoble = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.${darwinSystem}; pkgs = nixpkgs.legacyPackages.${darwinSystem};
modules = [ modules = [
@ -121,10 +85,8 @@
]; ];
}; };
# === Dev shell (Linux) ===
devShells.${linuxSystem}.default = linuxPkgs.mkShell { devShells.${linuxSystem}.default = linuxPkgs.mkShell {
buildInputs = with linuxPkgs; [ buildInputs = with linuxPkgs; [
pi-coding-agent
qmd qmd
nodejs nodejs
bun bun
@ -132,7 +94,7 @@
zsh zsh
]; ];
shellHook = '' shellHook = ''
echo "🦞 Scobleclaw dev shell" echo "Scobleclaw dev shell"
echo " pi: $(which pi)" echo " pi: $(which pi)"
echo " qmd: $(which qmd)" echo " qmd: $(which qmd)"
echo " node: $(node --version)" 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 === # === Linux desktop packages ===
home.packages = with pkgs; [ home.packages = with pkgs; [
# pi + qmd (from overlay) # pi + qmd (from overlay)
pi-coding-agent
qmd qmd
# Terminal # Terminal
ghostty ghostty
@ -12,12 +11,12 @@
# Status bar # Status bar
waybar waybar
# App launcher # App launcher
rofi-wayland rofi
# Notifications # Notifications
dunst dunst
libnotify libnotify
# Wallpaper # Wallpaper
swww awww
# Lock + idle # Lock + idle
hyprlock hyprlock
hypridle hypridle
@ -80,12 +79,10 @@
# Autostart # Autostart
exec-once = waybar exec-once = waybar
exec-once = dunst 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 text --watch cliphist store
exec-once = wl-paste --type image --watch cliphist store exec-once = wl-paste --type image --watch cliphist store
exec-once = hypridle exec-once = hypridle
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
# Input # Input
input { input {

View file

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

View file

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