{ description = "My System Configs"; inputs = { nixpkgs.url = "nixpkgs/nixos-unstable"; i3utils.url = "git+file:///home/daniel/go/src/i3utils"; home-manager.url = "github:nix-community/home-manager/master"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; }; outputs = { nixpkgs, home-manager, i3utils, ... }: let system = "x86_64-linux"; pkgs = import nixpkgs { inherit system; config = { allowUnfree = true; }; }; lib = nixpkgs.lib; hostSystem = { hostname }: lib.nixosSystem { inherit system; modules = [ ./hosts/${hostname}/configuration.nix ({ pkgs, ... }: { nixpkgs.overlays = [ i3utils.overlay ]; }) ]; }; daniel = home-manager.lib.homeManagerConfiguration { inherit system pkgs; username = "daniel"; homeDirectory = "/home/daniel"; configuration = { imports = [ ./user/daniel/home.nix ({ pkgs, ... }: { nixpkgs.overlays = [ i3utils.overlay ]; }) ]; }; stateVersion = "21.05"; }; mkUserConf = { hostname, extraSauce ? [] }: home-manager.lib.homeManagerConfiguration { inherit system pkgs; username = "daniel"; homeDirectory = "/home/daniel"; configuration = { imports = [ ./user/daniel/home.nix ({ pkgs, ... }: { nixpkgs.overlays = [ i3utils.overlay ]; }) ] ++ extraSauce; }; stateVersion = "21.05"; }; in { homeConfigurations = { daniel-dingbox = mkUserConf { hostname = "dingbox"; }; daniel-miniding = mkUserConf { hostname = "miniding"; extraSauce = [ ./user/host-specific/miniding ]; }; }; nixosConfigurations = { dingbox = hostSystem { hostname = "dingbox"; }; miniding = hostSystem { hostname = "miniding"; }; }; }; }