nixos-config/flake.nix

43 lines
1.5 KiB
Nix

{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
flake-utils.url = "github:numtide/flake-utils";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager/release-23.11";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
};
#inputs.nvidia_pinned = {
# inputs.nixpkgs.follows = "nixos-unstable";
#};
inputs.nixos-hardware.url = "github:NixOS/nixos-hardware/master";
inputs.nixvim = {
# If you are not running an unstable channel of nixpkgs, select the corresponding branch of nixvim.
url = "github:nix-community/nixvim/nixos-23.11";
inputs.nixpkgs.follows = "nixpkgs";
};
outputs = inputs @ {self, nixpkgs, nixpkgs-unstable, home-manager, nixos-hardware, nixvim, ...}: let
lib = nixpkgs.lib;
util = (import ./overlays/util.nix {} {}).util;
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; overlays =
util.nixFilesIn ./overlays; };
in {
nixosConfigurations = pkgs.util.mapHostAttrs (host: host) (host: lib.nixosSystem {
inherit system;
modules = [ ./hosts/${host} home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = inputs;
home-manager.users.xqtc = {...}: {imports = [ ./home nixvim.homeManagerModules.nixvim ]; };
}
(lib.optionalString (host == "lilith") inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t480)
];
});
};
}