WS-KCNHUB/flake.nix

52 lines
1.4 KiB
Nix
Raw Normal View History

2023-07-25 13:25:23 -04:00
{
2023-07-27 12:32:01 -04:00
inputs = {
nixpkgs = {
2023-08-01 15:36:16 -04:00
url = "github:NixOS/nixpkgs/nixos-23.05";
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;
};
};
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
2023-07-28 10:56:58 -04:00
(applyOverlays [ unfree-overlay unstable-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
];
};
};
}