# Example NixOS Configuration using m3ta-nixpkgs # This file demonstrates how to integrate m3ta-nixpkgs into your NixOS system { description = "Example NixOS configuration with m3ta-nixpkgs"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; # Add m3ta-nixpkgs as an input m3ta-nixpkgs = { url = "git+https://code.m3ta.dev/m3tam3re/nixpkgs"; # Or use a local path during development: # url = "path:/home/user/projects/m3ta-nixpkgs"; inputs.nixpkgs.follows = "nixpkgs"; }; home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; }; outputs = { self, nixpkgs, m3ta-nixpkgs, home-manager, ... } @ inputs: { nixosConfigurations = { # Replace 'hostname' with your actual hostname hostname = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = {inherit inputs;}; modules = [ # Your hardware configuration ./hardware-configuration.nix # Import m3ta's NixOS modules (if any are defined) m3ta-nixpkgs.nixosModules.default # Main configuration ({pkgs, ...}: { # ============================================ # METHOD 1: Using Overlays (Recommended) # ============================================ # This makes custom packages available as if they were in nixpkgs nixpkgs.overlays = [ m3ta-nixpkgs.overlays.default # Or use individual overlays for more control: # m3ta-nixpkgs.overlays.additions # m3ta-nixpkgs.overlays.modifications ]; # Now you can use packages normally environment.systemPackages = with pkgs; [ # Custom packages from m3ta-nixpkgs code2prompt hyprpaper-random msty-studio pomodoro-timer tuxedo-backlight zellij-ps # Regular nixpkgs packages vim git htop ]; # ============================================ # METHOD 2: Direct Package Reference # ============================================ # Use this if you don't want to use overlays # environment.systemPackages = [ # inputs.m3ta-nixpkgs.packages.${pkgs.system}.code2prompt # inputs.m3ta-nixpkgs.packages.${pkgs.system}.zellij-ps # ]; # ============================================ # Using Custom NixOS Modules # ============================================ # If you've defined custom NixOS modules, configure them here # m3ta.myModule = { # enable = true; # # module-specific options # }; # ============================================ # System Configuration # ============================================ system.stateVersion = "24.05"; networking.hostName = "hostname"; # Enable flakes nix.settings.experimental-features = ["nix-command" "flakes"]; }) # ============================================ # Home Manager Integration # ============================================ home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.users.m3tam3re = {pkgs, ...}: { # Import m3ta's Home Manager modules imports = [ m3ta-nixpkgs.homeManagerModules.default # Or import specific modules: # m3ta-nixpkgs.homeManagerModules.zellij-ps ]; # Home Manager packages with overlay home.packages = with pkgs; [ launch-webapp # Other packages... ]; # Configure custom Home Manager modules # programs.myProgram = { # enable = true; # # options... # }; home.stateVersion = "24.05"; }; } ]; }; # ============================================ # Alternative: Minimal Configuration # ============================================ minimal = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ ({pkgs, ...}: { nixpkgs.overlays = [m3ta-nixpkgs.overlays.default]; environment.systemPackages = with pkgs; [ code2prompt ]; system.stateVersion = "24.05"; }) ]; }; }; }; }