{ description = "Nix config for both home-manager and nixos"; inputs = { # Nixpkgs nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; # Home manager home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; nixvim = { url = "github:nix-community/nixvim"; inputs.nixpkgs.follows = "nixpkgs"; }; # Shameless plug: looking for a way to nixify your themes and make # everything match nicely? Try nix-colors! # nix-colors.url = "github:misterio77/nix-colors"; }; outputs = { self, nixpkgs, home-manager, nixvim, ... } @ inputs: let inherit (self) outputs; in { formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra; # NixOS configuration entrypoint # Available through 'nixos-rebuild --flake .#your-hostname' nixosConfigurations = { archlaptop = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = {inherit inputs outputs;}; # > Our main nixos configuration file < modules = [ ./hosts/archlaptop/configuration.nix home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.users.gabe = import ./hosts/archlaptop/home.nix; home-manager.extraSpecialArgs = {inherit inputs outputs;}; } ]; }; }; # Standalone home-manager configuration entrypoint # Available through 'home-manager --flake .#your-username@your-hostname' homeConfigurations = { "gabe@archlaptop" = home-manager.lib.homeManagerConfiguration { pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance extraSpecialArgs = {inherit inputs outputs;}; # > Our main home-manager configuration file < modules = [ ./hosts/gabe-archlaptop.nix nixvim.homeManagerModules.nixvim ]; }; "gabe@workstation" = home-manager.lib.homeManagerConfiguration { pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance extraSpecialArgs = {inherit inputs outputs;}; # > Our main home-manager configuration file < modules = [ ./hosts/gabe-workstation.nix nixvim.homeManagerModules.nixvim ]; }; }; }; }