dotfiles/nixos/flake.nix
DannyDannyDanny 0eb9d0e8ed OpenClaw: documents from local path, rebuild workaround, forgejo-cli
- Documents (SOUL/TOOLS/AGENTS) from path input to openclaw-documents-repo
- Flake: openclaw-documents.url = path to local clone (no SSH under sudo)
- Remove in-repo openclaw-documents; add docs/openclaw-documents.md
- openclaw.nix: activation backup + force for openclaw.json (TODO to remove)
- home.nix: add forgejo-cli
- .gitignore: openclaw-documents-repo; drop SOUL/TOOLS ignores
- AGENTS.md: OpenClaw docs ref
- TODO: remove OpenClaw activation/force bloat

Made-with: Cursor
2026-03-14 11:48:59 +01:00

132 lines
4.2 KiB
Nix

{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
nixos-wsl.url = "github:nix-community/NixOS-WSL/main";
vscode-server.url = "github:nix-community/nixos-vscode-server";
nix-darwin.url = "github:nix-darwin/nix-darwin/master";
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
zen-browser.url = "github:0xc000022070/zen-browser-flake";
zen-browser.inputs.nixpkgs.follows = "nixpkgs";
disko.url = "github:nix-community/disko";
disko.inputs.nixpkgs.follows = "nixpkgs";
nix-openclaw.url = "github:openclaw/nix-openclaw";
# OpenClaw SOUL/TOOLS and other docs. Absolute path to local clone (no SSH under sudo).
openclaw-documents.url = "path:/Users/danny/dotfiles/openclaw-documents-repo";
};
outputs = {
nixpkgs,
nixos-wsl,
vscode-server,
nix-darwin,
self,
home-manager,
zen-browser,
disko,
nix-openclaw,
openclaw-documents,
...
}: {
nixosConfigurations = {
wsl = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
nixos-wsl.nixosModules.default
vscode-server.nixosModules.default
./hosts/wsl.nix
./tmux.nix
# TODO: handle all user-level programs via home-manager
# ./neovim.nix # Now handled via home-manager
./fish.nix
# home-manager.nixosModules.default
];
};
macbookair = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
nixos-wsl.nixosModules.default
vscode-server.nixosModules.default
./hosts/macbookair.nix
./hardware-configuration.nix
./tmux.nix
# TODO: handle all user-level programs via home-manager
# ./neovim.nix # Now handled via home-manager
./fish.nix
# home-manager.nixosModules.default
];
};
sunken-ship = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [ ./hosts/sunken-ship.nix ];
};
# For disko-install: LUKS + WiFi; hostname/WiFi via --system-config.
server-install = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
disko.nixosModules.disko
./disko-server.nix
./hosts/server-install.nix
];
};
# Custom minimal installer ISO (build with: nix build .#installer-iso).
# Optional: add ./installer-wifi.nix (gitignored) to modules for live WiFi.
installer-iso = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [ ./installer-iso.nix ];
};
};
packages.x86_64-linux.installer-iso =
self.nixosConfigurations.installer-iso.config.system.build.isoImage;
# macOS (nix-darwin) configuration
darwinConfigurations."Daniel-Macbook-Air" = nix-darwin.lib.darwinSystem {
specialArgs = { inherit zen-browser nix-openclaw openclaw-documents; };
modules = [
./hosts/macos.nix
./fish.nix
# OpenClaw overlay so pkgs.openclaw etc. are available
({ nix-openclaw, ... }: {
nixpkgs.overlays = [ nix-openclaw.overlays.default ];
})
# Home Manager on macOS
home-manager.darwinModules.home-manager
({ lib, zen-browser, nix-openclaw, openclaw-documents, ... }: {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
# Automatically backup files before home-manager overwrites them
home-manager.backupFileExtension = "backup";
# Pass flake inputs to home-manager modules (e.g. home.nix)
home-manager.extraSpecialArgs = { inherit zen-browser openclaw-documents; };
home-manager.users.danny = { ... }: {
# Force an absolute path even if another module sets a bad value.
home.username = "danny";
home.homeDirectory = lib.mkForce "/Users/danny";
imports = [
./home/danny/home.nix
nix-openclaw.homeManagerModules.openclaw
./home/danny/openclaw.nix
];
};
})
];
};
};
}