WS-KCNHUB/flake.nix

50 lines
1.3 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/release-23.05";
};
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;
};
};
applyOverlays = overlays: ({...}:{ nixpkgs.overlays = overlays; });
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 = [
(applyOverlays [ unfree-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
];
};
};
}