nixos-flake/flake.nix
2024-07-25 00:42:50 -07:00

45 lines
1.3 KiB
Nix

{
inputs = {
#nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
stable.url = "github:NixOS/nixpkgs/nixos-24.05";
unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager/release-24.05";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, stable, unstable, home-manager, ... }@attrs: {
nixosConfigurations.harrowhark = nixpkgs.lib.nixosSystem rec {
pkgs = let
nixpkgsConfig = {
inherit system;
config.allowUnfree = true;
};
in import nixpkgs (nixpkgsConfig // {
overlays = [
(new: prev: {
unstable = import unstable nixpkgsConfig;
stable = import stable nixpkgsConfig;
})
];
});
system = "x86_64-linux";
modules = [
./configuration.nix
# This fixes nixpkgs (for e.g. "nix shell") to match the system nixpkgs
({ config, pkgs, options, ... }: {
nix.registry.nixpkgs.flake = nixpkgs;
})
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.jaina = import ./home-manager/home.nix;
}
];
};
};
}