{ description = "Your new nix config"; inputs = { # Nixpkgs nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11"; # Home manager home-manager.url = "github:nix-community/home-manager/release-25.11"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; hyprland.url = "github:hyprwm/Hyprland"; serpantinum.url = "github:ilyamiro/serpantinum"; spicetify-nix.url = "github:Gerg-L/spicetify-nix"; ocnix.url = "github:albertov/opencode-nix"; opencode.url = "github:sst/opencode"; osu-nixos.url = "github:notgne2/osu-nixos"; helium-flake.url = "github:oxcl/nix-flake-helium-browser"; helium-flake.inputs.nixpkgs.follows = "nixpkgs"; lanzaboote = { url = "github:nix-community/lanzaboote/v0.4.3"; inputs.nixpkgs.follows = "nixpkgs"; }; }; outputs = { self, nixpkgs, home-manager, ocnix, osu-nixos, opencode, ... } @ inputs: let mkHost = { hostname, username, system ? "x86_64-linux", modules ? [], }: nixpkgs.lib.nixosSystem { inherit system; specialArgs = { inherit inputs; }; modules = [ { networking.hostName = hostname; nixpkgs.config.allowUnfree = true; nixpkgs.overlays = [ ocnix.overlays.default osu-nixos.overlay ]; users.users.${username} = { isNormalUser = true; extraGroups = [ "networkmanager" "wheel" ]; packages = [ ]; }; } ocnix.nixosModules.opencode home-manager.nixosModules.home-manager ./nixos/common.nix { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.backupFileExtension = "backup"; home-manager.extraSpecialArgs = { inherit inputs hostname username; }; home-manager.users.${username} = import ./home-manager/home.nix; } ] ++ modules; }; in { # NixOS configuration entrypoint # Available through 'nixos-rebuild --flake .#your-hostname' nixosConfigurations = { phosphophyllite = mkHost { hostname = "phosphophyllite"; username = "phos"; modules = [ ./hosts/phosphophyllite ]; }; diamond = mkHost { hostname = "diamond"; username = "dia"; modules = [ ./hosts/diamond ]; }; }; # Standalone home-manager configuration entrypoint # Available through 'home-manager --flake .#your-username@your-hostname' homeConfigurations = { # FIXME replace with your username@hostname "phos@phosphophyllite" = home-manager.lib.homeManagerConfiguration { # Home-manager requires 'pkgs' instance pkgs = nixpkgs.legacyPackages.x86_64-linux; # FIXME replace x86_64-linux with your architecture extraSpecialArgs = { inherit inputs; hostname = "phosphophyllite"; username = "phos"; }; # > Our main home-manager configuration file < modules = [./home-manager/home.nix]; }; }; }; }