{ inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-22.05"; nixpkgsUnstable.url = "github:nixos/nixpkgs"; home-manager = { url = "github:nix-community/home-manager/release-22.05"; inputs.nixpkgs.follows = "nixpkgs"; }; nur.url = "github:nix-community/NUR"; impermanence.url = "github:nix-community/impermanence"; }; outputs = { self, nixpkgs, nixpkgsUnstable, home-manager, nur, impermanence, ... }: with nixpkgs.lib; let util = import ./util; inherit (util nixpkgs.lib) importAll; pkgSet = pkgs: import ./pkgs { inherit pkgs; util = util pkgs.lib; }; in { packages."x86_64-linux" = pkgSet nixpkgs.legacyPackages."x86_64-linux"; overlay = self: super: { local = pkgSet super; unstable = import nixpkgsUnstable { inherit (super) config system; }; }; nixosConfigurations = let hostConfig = host: (makeOverridable nixosSystem) { system = "x86_64-linux"; modules = [ (import ./sys { inherit self impermanence; }) host ]; }; in mapAttrs (_: hostConfig) (importAll { root = ./sys/platform; }); homeConfigurations = let home = platform: home-manager.lib.homeManagerConfiguration { system = "x86_64-linux"; configuration = import ./home { inherit self nixpkgs nixpkgsUnstable nur; }; extraModules = [ platform ]; username = "ale"; homeDirectory = "/home/ale"; # Update the state version as needed. # See the changelog here: # https://nix-community.github.io/home-manager/release-notes.html#sec-release-21.05 stateVersion = "21.11"; # Optionally use extraSpecialArgs # to pass through arguments to home.nix extraSpecialArgs = {}; }; homeConfig = id: platform: { name = "ale@${id}"; value = home platform; }; in mapAttrs' homeConfig (importAll { root = ./home/platform; }); }; }