nixos-flake/flake.nix

34 lines
990 B
Nix
Raw Normal View History

2023-09-04 06:34:53 +00:00
{
inputs = {
2023-10-03 01:50:41 +00:00
#nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
2023-12-26 04:11:10 +00:00
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
stable.url = "github:NixOS/nixpkgs/nixos-23.11";
2023-09-04 06:34:53 +00:00
unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
};
2023-12-26 04:11:10 +00:00
outputs = { self, nixpkgs, stable, unstable }@attrs: {
2023-09-04 06:34:53 +00:00
nixosConfigurations.harrowhark = nixpkgs.lib.nixosSystem rec {
2023-12-26 04:11:10 +00:00
pkgs = let
nixpkgsConfig = {
inherit system;
config.allowUnfree = true;
};
in import nixpkgs (nixpkgsConfig // {
overlays = [
(new: prev: {
unstable = import unstable nixpkgsConfig;
stable = import stable nixpkgsConfig;
})
];
});
2023-09-04 06:34:53 +00:00
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;
})
];
};
};
}