-
Notifications
You must be signed in to change notification settings - Fork 4
/
flake.nix
44 lines (44 loc) · 1.48 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{
description = "A Flake for Mickael Kerjean's Filestash";
nixConfig = {
extra-substituters = [ "https://matthewcroughan.cachix.org" ];
extra-trusted-public-keys = [ "matthewcroughan.cachix.org-1:fON2C9BdzJlp1qPan4t5AF0xlnx8sB0ghZf8VDo7+e8=" ];
};
inputs = {
filestash-src = {
url = "github:mickael-kerjean/filestash";
flake = false;
};
nixpkgs.url = "github:nixos/nixpkgs/nixos-22.11";
dream2nix.url = "github:nix-community/dream2nix";
flake-parts.url = "github:hercules-ci/flake-parts";
};
outputs = { self, nixpkgs, flake-parts, dream2nix, filestash-src }@inputs:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"x86_64-linux"
"aarch64-linux"
];
flake = {
herculesCI.ciSystems = [ "x86_64-linux" ];
overlay = final: prev: {
filestash = self.packages.${prev.stdenv.hostPlatform.system}.filestash;
};
nixosModule = { pkgs, lib, config, ... }: {
imports = [ ./nix/filestash-module.nix ];
nixpkgs.overlays = [ self.overlay ];
};
};
perSystem = { config, self', inputs', pkgs, system, ... }: {
checks = {
filestash = pkgs.callPackage ./nix/filestash-vmtest.nix { nixosModule = self.nixosModule; };
};
packages = rec {
default = filestash;
filestash = pkgs.callPackage ./pkgs/filestash {
inherit dream2nix pkgs filestash-src self;
};
};
};
};
}