dotfiles/entropy/nixos/flake.nix

55 lines
1.7 KiB
Nix
Raw Permalink Normal View History

2023-01-24 09:43:41 +00:00
{
description = "NixOS configuration";
inputs = {
2024-02-22 09:20:35 +00:00
nixpkgs.url = "nixpkgs/nixos-unstable";
# nixpkgs.url = "nixpkgs/nixos-23.11";
2023-04-14 07:40:57 +00:00
unstable.url = "nixpkgs/nixos-unstable";
2023-01-24 09:43:41 +00:00
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
#home-manager = {
#url = "github:nix-community/home-manager";
#inputs.nixpkgs.follows = "nixpkgs";
#};
mlir = {
2023-08-08 07:55:53 +00:00
#url = "github:Feliix42/mlir.nix/main";
url = "github:Feliix42/mlir.nix/circt";
2024-03-18 14:00:38 +00:00
# inputs.nixpkgs.follows = "nixpkgs";
2023-01-24 09:43:41 +00:00
};
};
# TODO: define nixos-unstable and nixos-hardware as dependencies here
# outputs = inputs@{ nixpkgs, nixos-hardware, home-manager, mlir, ... }: {
2023-04-14 07:40:57 +00:00
outputs = inputs@{ self, nixpkgs, unstable, nixos-hardware, mlir, ... }: {
2023-01-24 09:43:41 +00:00
nixosConfigurations = {
2023-04-14 07:40:57 +00:00
entropy = nixpkgs.lib.nixosSystem rec {
2023-01-24 09:43:41 +00:00
system = "x86_64-linux";
modules = [
./configuration.nix
nixos-hardware.nixosModules.lenovo-thinkpad-t14
#home-manager.nixosModules.home-manager
#{
#home-manager.useGlobalPkgs = true;
#home-manager.useUserPackages = true;
#home-manager.users.jdoe = import ./home.nix;
## Optionally, use home-manager.extraSpecialArgs to pass
## arguments to home.nix
#}
2023-04-14 07:40:57 +00:00
({ config, ... }: {
2023-08-08 12:45:35 +00:00
nixpkgs.overlays = [ mlir.overlays.default ];
2023-04-14 07:40:57 +00:00
_module.args = {
unstable = import inputs.unstable {
inherit (config.nixpkgs) config;
inherit system;
};
};
2023-01-24 09:43:41 +00:00
})
];
};
};
2023-04-14 07:40:57 +00:00
hydraJobs.entropy."x86_64-linux" = self.nixosConfigurations.entropy.config.system.build.toplevel;
2023-01-24 09:43:41 +00:00
};
}