{ description = "NixOS configuration for multiple machines with modular home-manager and rice support"; inputs = { # Core nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; # Home Manager home-manager = { url = "github:nix-community/home-manager/release-25.11"; inputs.nixpkgs.follows = "nixpkgs"; }; # NixOwOs theming - disabled until fixed nixowos = { url = "github:yunfachi/NixOwOS"; inputs.nixpkgs.follows = "nixpkgs"; }; # Theming - centralized color management stylix = { url = "github:danth/stylix/release-25.11"; inputs.nixpkgs.follows = "nixpkgs"; }; # Rust toolchain fenix = { url = "github:nix-community/fenix"; inputs.nixpkgs.follows = "nixpkgs"; }; # Rust build system for Nix crane.url = "github:ipetkov/crane"; }; outputs = { self, nixpkgs, nixpkgs-unstable, nixowos, home-manager, stylix, fenix, crane, ... } @ inputs: let system = "x86_64-linux"; # Overlays for the system overlays = [ # Access unstable packages via pkgs.unstable.* (final: prev: { unstable = import nixpkgs-unstable { inherit system; config.allowUnfree = true; }; }) # Fenix Rust overlay fenix.overlays.default ]; # Per-host home-manager configuration mkHomeManagerModule = hostname: rice: { home-manager = { useGlobalPkgs = true; useUserPackages = true; extraSpecialArgs = { inherit inputs; inherit hostname; inherit rice; }; users.mun = import ./home/mun; sharedModules = [ nixowos.homeModules.default ]; }; }; # Helper to create a NixOS system with rice mkSystem = hostname: rice: nixpkgs.lib.nixosSystem { inherit system; specialArgs = {inherit inputs;}; modules = [ # Apply overlays via nixpkgs module { nixpkgs = { inherit overlays; config.allowUnfree = true; }; } ./hosts/${hostname}/configuration.nix ./system ./home/rices/${rice}/system.nix home-manager.nixosModules.home-manager nixowos.nixosModules.default stylix.nixosModules.stylix (mkHomeManagerModule hostname rice) ]; }; in { nixosConfigurations = { kronos = mkSystem "kronos" "nord-blue"; herra = mkSystem "herra" "plasma6"; mystra = mkSystem "mystra" "nord-blue"; }; }; }