Fix: SDDM DM, SSH server, cleanup pi
This commit is contained in:
parent
5051dfdc8c
commit
a6886b33f2
7 changed files with 149 additions and 68 deletions
48
flake.nix
48
flake.nix
|
|
@ -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)"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue