2024-10-20 00:30:58 +02:00
|
|
|
|
{
|
|
|
|
|
|
description = ''
|
|
|
|
|
|
For questions just DM me on X: https://twitter.com/@m3tam3re
|
|
|
|
|
|
There is also some NIXOS content on my YT channel: https://www.youtube.com/@m3tam3re
|
|
|
|
|
|
|
|
|
|
|
|
One of the best ways to learn NIXOS is to read other peoples configurations. I have personally learned a lot from Gabriel Fontes configs:
|
|
|
|
|
|
https://github.com/Misterio77/nix-starter-configs
|
|
|
|
|
|
https://github.com/Misterio77/nix-config
|
|
|
|
|
|
|
|
|
|
|
|
Please also check out the starter configs mentioned above.
|
|
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
|
|
inputs = {
|
|
|
|
|
|
home-manager = {
|
|
|
|
|
|
url = "github:nix-community/home-manager";
|
|
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
|
};
|
|
|
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
2026-01-02 15:12:26 +01:00
|
|
|
|
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-25.11";
|
2026-02-18 16:28:31 +01:00
|
|
|
|
nixpkgs-45570c2.url = "github:nixos/nixpkgs/45570c299dc2b63c8c574c4cd77f0b92f7e2766e";
|
|
|
|
|
|
nixpkgs-locked.url = "github:nixos/nixpkgs/2744d988fa116fc6d46cdfa3d1c936d0abd7d121";
|
|
|
|
|
|
nixpkgs-9e58ed7.url = "github:nixos/nixpkgs/9e58ed7ba759d81c98f033b7f5eba21ca68f53b0";
|
2024-11-07 10:50:13 +01:00
|
|
|
|
nixpkgs-master.url = "github:nixos/nixpkgs/master";
|
2024-10-20 00:30:58 +02:00
|
|
|
|
|
2026-02-16 18:59:34 +01:00
|
|
|
|
m3ta-nixpkgs.url = "git+https://code.m3ta.dev/m3tam3re/nixpkgs";
|
|
|
|
|
|
# m3ta-nixpkgs.url = "path:/home/m3tam3re/p/NIX/nixpkgs";
|
2026-03-07 11:44:04 +01:00
|
|
|
|
llm-agents.url = "github:numtide/llm-agents.nix";
|
|
|
|
|
|
|
2025-10-05 14:38:50 +02:00
|
|
|
|
#
|
2025-10-03 14:55:24 +02:00
|
|
|
|
nur = {
|
|
|
|
|
|
url = "github:nix-community/NUR";
|
2026-01-14 20:55:23 +01:00
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
2025-10-03 14:55:24 +02:00
|
|
|
|
};
|
2024-11-14 12:17:43 +01:00
|
|
|
|
agenix.url = "github:ryantm/agenix";
|
|
|
|
|
|
|
2024-11-16 19:58:59 +01:00
|
|
|
|
disko = {
|
|
|
|
|
|
url = "github:nix-community/disko";
|
|
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2026-02-18 16:28:31 +01:00
|
|
|
|
nixos-generators = {url = "github:nix-community/nixos-generators";};
|
2025-05-19 12:53:05 +02:00
|
|
|
|
|
2024-11-07 13:35:17 +01:00
|
|
|
|
hyprpanel.url = "github:Jas-SinghFSU/HyprPanel";
|
2024-12-06 10:16:17 +01:00
|
|
|
|
rose-pine-hyprcursor.url = "github:ndom91/rose-pine-hyprcursor";
|
2025-08-30 14:32:25 +02:00
|
|
|
|
nix-colors.url = "github:misterio77/nix-colors";
|
2026-01-06 08:54:17 +01:00
|
|
|
|
|
|
|
|
|
|
agents = {
|
2026-02-18 16:28:31 +01:00
|
|
|
|
# url = "path:/home/m3tam3re/p/AI/AGENTS";
|
|
|
|
|
|
url = "git+https://code.m3ta.dev/m3tam3re/AGENTS";
|
2026-01-06 08:54:17 +01:00
|
|
|
|
flake = false;
|
|
|
|
|
|
};
|
2024-10-20 00:30:58 +02:00
|
|
|
|
};
|
|
|
|
|
|
|
2026-02-18 16:28:31 +01:00
|
|
|
|
outputs = {
|
|
|
|
|
|
self,
|
|
|
|
|
|
agenix,
|
|
|
|
|
|
home-manager,
|
|
|
|
|
|
nixpkgs,
|
|
|
|
|
|
m3ta-nixpkgs,
|
|
|
|
|
|
nur,
|
|
|
|
|
|
agents,
|
|
|
|
|
|
...
|
|
|
|
|
|
} @ inputs: let
|
|
|
|
|
|
inherit (self) outputs;
|
|
|
|
|
|
systems = [
|
|
|
|
|
|
"aarch64-linux"
|
|
|
|
|
|
"i686-linux"
|
|
|
|
|
|
"x86_64-linux"
|
|
|
|
|
|
"aarch64-darwin"
|
|
|
|
|
|
"x86_64-darwin"
|
|
|
|
|
|
];
|
|
|
|
|
|
forAllSystems = nixpkgs.lib.genAttrs systems;
|
|
|
|
|
|
in {
|
|
|
|
|
|
packages =
|
|
|
|
|
|
forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});
|
|
|
|
|
|
overlays = import ./overlays {inherit inputs outputs;};
|
|
|
|
|
|
homeManagerModules = import ./modules/home-manager;
|
|
|
|
|
|
|
|
|
|
|
|
nixosConfigurations = {
|
|
|
|
|
|
m3-ares = nixpkgs.lib.nixosSystem {
|
|
|
|
|
|
specialArgs = {
|
|
|
|
|
|
inherit inputs outputs;
|
2026-03-07 11:44:04 +01:00
|
|
|
|
system = "x86_64-linux";
|
2026-02-18 16:28:31 +01:00
|
|
|
|
hostname = "m3-ares";
|
|
|
|
|
|
};
|
|
|
|
|
|
modules = [
|
|
|
|
|
|
./hosts/m3-ares
|
|
|
|
|
|
agenix.nixosModules.default
|
|
|
|
|
|
m3ta-nixpkgs.nixosModules.default
|
|
|
|
|
|
];
|
|
|
|
|
|
};
|
|
|
|
|
|
m3-atlas = nixpkgs.lib.nixosSystem {
|
2026-03-07 11:44:04 +01:00
|
|
|
|
specialArgs = {
|
|
|
|
|
|
inherit inputs outputs;
|
|
|
|
|
|
system = "x86_64-linux";
|
|
|
|
|
|
};
|
2026-02-18 16:28:31 +01:00
|
|
|
|
system = "x86_64-linux";
|
|
|
|
|
|
modules = [
|
|
|
|
|
|
./hosts/m3-atlas
|
|
|
|
|
|
inputs.disko.nixosModules.disko
|
|
|
|
|
|
agenix.nixosModules.default
|
|
|
|
|
|
m3ta-nixpkgs.nixosModules.default
|
|
|
|
|
|
];
|
|
|
|
|
|
};
|
|
|
|
|
|
m3-kratos = nixpkgs.lib.nixosSystem {
|
|
|
|
|
|
specialArgs = {
|
|
|
|
|
|
inherit inputs outputs;
|
2026-03-07 11:44:04 +01:00
|
|
|
|
system = "x86_64-linux";
|
2026-02-18 16:28:31 +01:00
|
|
|
|
hostname = "m3-kratos";
|
|
|
|
|
|
};
|
|
|
|
|
|
modules = [
|
|
|
|
|
|
./hosts/m3-kratos
|
|
|
|
|
|
agenix.nixosModules.default
|
|
|
|
|
|
nur.modules.nixos.default
|
|
|
|
|
|
m3ta-nixpkgs.nixosModules.default
|
|
|
|
|
|
];
|
|
|
|
|
|
};
|
|
|
|
|
|
m3-helios = nixpkgs.lib.nixosSystem {
|
2026-03-07 11:44:04 +01:00
|
|
|
|
specialArgs = {
|
|
|
|
|
|
inherit inputs outputs;
|
|
|
|
|
|
system = "x86_64-linux";
|
|
|
|
|
|
};
|
2026-02-18 16:28:31 +01:00
|
|
|
|
system = "x86_64-linux";
|
|
|
|
|
|
modules = [
|
|
|
|
|
|
./hosts/m3-helios
|
|
|
|
|
|
inputs.disko.nixosModules.disko
|
|
|
|
|
|
agenix.nixosModules.default
|
|
|
|
|
|
m3ta-nixpkgs.nixosModules.default
|
|
|
|
|
|
];
|
|
|
|
|
|
};
|
|
|
|
|
|
};
|
|
|
|
|
|
homeConfigurations = {
|
|
|
|
|
|
"m3tam3re@m3-daedalus" = home-manager.lib.homeManagerConfiguration {
|
|
|
|
|
|
pkgs = nixpkgs.legacyPackages."x86_64-linux";
|
|
|
|
|
|
extraSpecialArgs = {
|
|
|
|
|
|
inherit inputs outputs;
|
2026-03-07 11:44:04 +01:00
|
|
|
|
system = "x86_64-linux";
|
2026-02-18 16:28:31 +01:00
|
|
|
|
hostname = "m3-daedalus";
|
|
|
|
|
|
};
|
|
|
|
|
|
modules = [./home/m3tam3re/m3-daedalus.nix];
|
|
|
|
|
|
};
|
|
|
|
|
|
};
|
|
|
|
|
|
devShells = forAllSystems (system: let
|
|
|
|
|
|
pkgs = import nixpkgs {
|
|
|
|
|
|
inherit system;
|
|
|
|
|
|
config.allowUnfree = true; # Allow unfree packages in devShell
|
|
|
|
|
|
};
|
|
|
|
|
|
m3taLib = m3ta-nixpkgs.lib.x86_64-linux;
|
|
|
|
|
|
rules = m3taLib.opencode-rules.mkOpencodeRules {
|
|
|
|
|
|
inherit agents;
|
|
|
|
|
|
languages = ["nix"];
|
|
|
|
|
|
};
|
2026-02-17 20:11:14 +01:00
|
|
|
|
in {
|
2026-02-18 16:28:31 +01:00
|
|
|
|
default = pkgs.mkShell {
|
|
|
|
|
|
buildInputs = with pkgs; [
|
|
|
|
|
|
alejandra
|
|
|
|
|
|
nixd
|
|
|
|
|
|
openssh
|
|
|
|
|
|
agenix.packages.${system}.default
|
|
|
|
|
|
];
|
2026-02-17 20:11:14 +01:00
|
|
|
|
inherit (rules) instructions;
|
2025-05-15 09:31:36 +02:00
|
|
|
|
shellHook = ''
|
2026-02-17 20:11:14 +01:00
|
|
|
|
${rules.shellHook}
|
|
|
|
|
|
echo "======================================"
|
2026-02-18 16:28:31 +01:00
|
|
|
|
echo "🧑🚀 Nix Development Shell with Opencode Rules"
|
2026-02-17 20:11:14 +01:00
|
|
|
|
echo "======================================"
|
|
|
|
|
|
echo ""
|
|
|
|
|
|
echo "Active rules:"
|
|
|
|
|
|
echo " - Nix language conventions"
|
|
|
|
|
|
echo " - Coding-style best practices"
|
|
|
|
|
|
echo " - Naming conventions"
|
|
|
|
|
|
echo " - Documentation standards"
|
|
|
|
|
|
echo " - Testing guidelines"
|
|
|
|
|
|
echo " - Git workflow patterns"
|
|
|
|
|
|
echo " - Project structure guidelines"
|
|
|
|
|
|
echo ""
|
|
|
|
|
|
echo "Generated files:"
|
|
|
|
|
|
echo " - .opencode-rules/ (symlink to AGENTS repo)"
|
|
|
|
|
|
echo " - opencode.json (configuration file)"
|
|
|
|
|
|
echo ""
|
|
|
|
|
|
echo "Useful commands:"
|
|
|
|
|
|
echo " - cat opencode.json View rules configuration"
|
|
|
|
|
|
echo " - ls .opencode-rules/ Browse available rules"
|
|
|
|
|
|
echo " - nix develop Re-enter this shell"
|
|
|
|
|
|
echo ""
|
|
|
|
|
|
echo "Remember to add to .gitignore:"
|
|
|
|
|
|
echo " .opencode-rules"
|
|
|
|
|
|
echo " opencode.json"
|
|
|
|
|
|
echo "======================================"
|
2025-05-15 09:31:36 +02:00
|
|
|
|
'';
|
|
|
|
|
|
};
|
2026-02-18 16:28:31 +01:00
|
|
|
|
});
|
|
|
|
|
|
};
|
2024-10-20 00:30:58 +02:00
|
|
|
|
}
|