Files
nixpkgs/flake.nix
m3tm3re dc2f3b6802
Some checks failed
Update Nix Packages with nix-update / nix-update (push) Failing after 1s
feat: update opencode to v1.1.60 and re-enable opencode-desktop
- Update opencode flake input to v1.1.60
- Add nixpkgs-master input for opencode (needs newer bun)
- Re-enable opencode-desktop with workaround for upstream issue #11755
- Add specta/tauri outputHashes for git dependencies
- Add .todos/ to gitignore
- Update AGENTS.md with td task management instructions
2026-02-12 19:42:11 +01:00

103 lines
3.1 KiB
Nix

{
description =
"m3ta's personal Nix repository - Custom packages, overlays, and modules";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs-master.url = "github:NixOS/nixpkgs/master";
# opencode needs newer bun from master
opencode = {
url = "github:anomalyco/opencode/v1.1.60";
inputs.nixpkgs.follows = "nixpkgs-master";
};
};
outputs = { self, nixpkgs, ... }@inputs:
let
# Supported systems
systems =
[ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
# Helper function to generate an attrset for each of the systems
forAllSystems = nixpkgs.lib.genAttrs systems;
# Helper to create pkgs for a given system
pkgsFor = system:
import nixpkgs {
inherit system;
config.allowUnfree = true;
};
in {
# Custom packages - accessible via 'nix build .#package-name'
packages = forAllSystems (system:
let pkgs = pkgsFor system;
in import ./pkgs { inherit pkgs inputs; });
# Overlays - can be imported in your system configuration
overlays = {
# Default overlay: adds all custom packages
default = final: prev:
import ./pkgs {
pkgs = final;
inputs = inputs;
};
# Individual overlays for more granular control
additions = final: prev:
import ./pkgs {
pkgs = final;
inputs = inputs;
};
modifications = final: prev: import ./overlays/mods { inherit prev; };
};
# NixOS modules - for system-level configuration
nixosModules = {
default = ./modules/nixos;
# Individual modules for selective imports
ports = ./modules/nixos/ports.nix;
mem0 = ./modules/nixos/mem0.nix;
};
# Home Manager modules - for user-level configuration
homeManagerModules = {
default = import ./modules/home-manager;
ports = import ./modules/home-manager/ports.nix;
zellij-ps = import ./modules/home-manager/zellij-ps.nix;
};
# Library functions - helper utilities for your configuration
lib = forAllSystems (system:
let pkgs = pkgsFor system;
in import ./lib { lib = pkgs.lib; });
# Development shells for various programming environments
# Usage: nix develop .#<shell-name>
# Available shells: default, python, devops
devShells = forAllSystems (system:
let pkgs = pkgsFor system;
in import ./shells { inherit pkgs; });
# Formatter for 'nix fmt'
formatter = forAllSystems (system: (pkgsFor system).alejandra);
# Templates for creating new packages/modules
templates = {
package = {
path = ./templates/package;
description = "Template for a new package";
};
nixos-module = {
path = ./templates/nixos-module;
description = "Template for a new NixOS module";
};
home-manager-module = {
path = ./templates/home-manager-module;
description = "Template for a new Home Manager module";
};
};
};
}