WS-KCNHUB/flake.nix

54 lines
1.5 KiB
Nix
Raw Normal View History

2023-07-25 13:25:23 -04:00
{
2023-07-27 12:32:01 -04:00
inputs = {
nixpkgs = {
url = "github:NixOS/nixpkgs/nixos-23.11";
2023-07-27 12:32:01 -04:00
};
2023-07-28 10:58:16 -04:00
nixpkgs-unstable = {
url = "github:NixOS/nixpkgs/nixos-unstable";
};
2023-07-27 16:15:53 -04:00
sops-nix = {
url = "github:Mic92/sops-nix";
# Follow the system nixpkgs
inputs.nixpkgs.follows = "nixpkgs";
};
2023-07-28 10:02:26 -04:00
nix-matlab = {
url = "gitlab:doronbehar/nix-matlab";
# Follow the system nixpkgs
inputs.nixpkgs.follows = "nixpkgs";
};
2023-07-27 12:32:01 -04:00
};
2023-07-28 10:58:16 -04:00
outputs = { self, nixpkgs, nixpkgs-unstable, sops-nix, nix-matlab }@attrs: let
system = "x86_64-linux";
unfree-overlay = final: prev: {
unfree = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
};
2023-07-28 10:58:16 -04:00
unstable-overlay = final: prev: {
unstable = import nixpkgs-unstable { inherit system; } ;
};
unstable-unfree-overlay = final: prev: {
unstable-unfree = import nixpkgs-unstable {
inherit system;
config.allowUnfree = true;
2024-04-02 10:46:33 -04:00
config.cudaSupport = true;
2023-07-28 10:58:16 -04:00
};
};
2024-05-10 13:53:29 -04:00
python-overlay = import ./overlays/python.nix;
applyOverlays = overlays: ({...}:{ nixpkgs.overlays = overlays; });
2023-07-28 11:44:18 -04:00
flakes = {...}: {nix.settings.experimental-features = [ "nix-command" "flakes" ];};
in {
2023-07-25 13:25:23 -04:00
nixosConfigurations.kcnhub = nixpkgs.lib.nixosSystem {
inherit system;
2023-07-28 10:02:26 -04:00
specialArgs = attrs;
2023-07-25 13:25:23 -04:00
modules = [
2023-07-28 11:44:18 -04:00
flakes
2024-05-10 13:53:29 -04:00
(applyOverlays [ unfree-overlay unstable-overlay python-overlay ])
2023-07-27 16:15:53 -04:00
./machines/kcnhub/configuration.nix
sops-nix.nixosModules.sops
2023-07-25 13:25:23 -04:00
];
};
};
}