{ description = "System building flake"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; pkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; home-manager = { url = "github:nix-community/home-manager/master"; inputs.nixpkgs.follows = "nixpkgs"; }; hyprland = { url = "github:hyprwm/Hyprland"; inputs.nixpkgs.follows = "nixpkgs"; }; hyprland-plugins = { url = "github:hyprwm/hyprland-plugins"; inputs.hyprland.follows = "hyprland"; }; hyprland-split-monitor-workspaces = { url = "github:zjeffer/split-monitor-workspaces"; inputs.hyprland.follows = "hyprland"; }; # hyprland-hyprspace = { # url = "github:KZDKM/Hyprspace"; # inputs.hyprland.follows = "hyprland"; # }; }; outputs = { self, nixpkgs, pkgs-unstable, home-manager, ... } @ inputs: let system = "x86_64-linux"; mkHost = { hostname, configuration, hardware ? null, home, }: nixpkgs.lib.nixosSystem { inherit system; specialArgs = { inherit inputs; pkgs-unstable = import pkgs-unstable { inherit system; }; }; modules = [ { networking.hostName = hostname; } configuration home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.backupFileExtension = "backup"; home-manager.users.someone = import home; home-manager.extraSpecialArgs = { inherit inputs; }; } ] ++ nixpkgs.lib.optional (hardware != null) hardware; }; in { nixosConfigurations = { nixMain = mkHost { hostname = "nixMain"; configuration = ./nixMain/configuration.nix; home = ./nixMain/homemanager/someone.nix; }; nixLap = mkHost { hostname = "nixLap"; configuration = ./nixLap/configuration.nix; hardware = ./nixLap/hardware-configuration.nix; home = ./nixLap/homemanager/someone.nix; }; nixLjs = mkHost { hostname = "nixLjs"; configuration = ./nixLap/configuration.nix; hardware = ./nixLjs/hardware-configuration.nix; home = ./nixLap/homemanager/someone.nix; }; }; }; }