nixos-flake/flake.nix
2023-12-25 20:11:10 -08:00

33 lines
990 B
Nix

{
inputs = {
#nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
stable.url = "github:NixOS/nixpkgs/nixos-23.11";
unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs, stable, unstable }@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;
})
];
};
};
}