diff options
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 64 |
1 files changed, 24 insertions, 40 deletions
@@ -1,45 +1,29 @@ { - description = "Jon's NixOS configuration"; - - inputs = { - nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-23.05"; - nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - - home-manager = { - url = "github:nix-community/home-manager"; - inputs.nixpkgs.follows = "nixpkgs"; - }; + description = "Jon's NixOS configuration"; - nixos-hardware.url = "github:NixOS/nixos-hardware/master"; - - nurpkgs.url = "github:nix-community/NUR"; - }; - - outputs = { self, nixpkgs, nixos-hardware, home-manager, ... }@inputs: - let - inherit (self) outputs; - stateVersion = "23.05"; - - overlays = [ - inputs.nurpkgs.overlay - ]; - - housemaker = import ./housemaker.nix { inherit inputs outputs stateVersion overlays; }; - in { - nixosConfigurations = { - jontest = housemaker.newhost { nixpkgs = nixpkgs; overlays = overlays; hostname = "jontest"; username = "jon"; }; - }; - nixosConfigurations = { - jontop = housemaker.newhost { nixpkgs = nixpkgs; overlays = overlays; hostname = "jontop"; username = "jon"; }; + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; + + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + nurpkgs.url = "github:nix-community/NUR"; + nixos-hardware.url = "github:NixOS/nixos-hardware/master"; }; - nixosConfigurations = { - jonbox = housemaker.newhost { nixpkgs = nixpkgs; overlays = overlays; hostname = "jonbox"; username = "jon"; }; - }; - - homeConfigurations = { - "jon@jontest" = housemaker.newhome { nixpkgs = nixpkgs; overlays = overlays; hostname = "jontest"; username = "jon"; platform = "x86_64-linux"; }; - "jon@jontop" = housemaker.newhome { nixpkgs = nixpkgs; overlays = overlays; hostname = "jontop"; username = "jon"; platform = "x86_64-linux"; }; - "jon@jonbox" = housemaker.newhome { nixpkgs = nixpkgs; overlays = overlays; hostname = "jonbox"; username = "jon"; platform = "x86_64-linux"; }; + + outputs = { self, nixpkgs, nixpkgs-unstable, nixos-hardware, nurpkgs, home-manager, ... }@inputs: + let + inherit (self) outputs; + stateVersion = "23.05"; + in { + nixosConfigurations = ( + import ./hosts { + inherit (nixpkgs) lib; + inherit inputs nixpkgs nixpkgs-unstable nurpkgs home-manager stateVersion; + } + ); }; - }; } |