]> git.immae.eu Git - perso/Immae/Config/Nix.git/blob - flake.nix
Add monitoring script with smartctl
[perso/Immae/Config/Nix.git] / flake.nix
1 {
2 description = "immae-eu infrastructure";
3 inputs = {
4 flake-parts.url = "github:hercules-ci/flake-parts";
5 devshell.url = "github:numtide/devshell";
6 # nixpkgs for local tools
7 nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
8
9 flakes.url = "path:./flakes";
10 };
11 outputs = inputs@{ self, flake-parts, flakes, ... }:
12 let
13 inherit (flakes.subflakes) public private;
14 inherit (public) mypackages;
15 in
16 flake-parts.lib.mkFlake { inherit inputs; } ({ withSystem, ... }: {
17 imports = [
18 inputs.devshell.flakeModule
19 (mypackages.mylibs.flakePartsAddPerSystem { name = "lib"; type = "unspecified"; })
20 ];
21 systems = [ "x86_64-linux" ];
22 perSystem = { config, inputs', pkgs, system, ... }:
23 {
24 packages = mypackages.packages."${system}";
25 lib = mypackages.lib."${system}";
26 devshells.default = {
27 packages = [
28 pkgs.colmena
29 pkgs.nixUnstable pkgs.python3 pkgs.sops
30 pkgs.curl pkgs.shellcheck pkgs.jq
31 pkgs.gnumake pkgs.yq
32 ];
33 env = [
34 { name = "NIX_BUILD_TOP"; value = ""; }
35 { name = "PATH"; prefix = "scripts"; }
36 { name = "NIX_PATH"; value = "nixpkgs=${pkgs.path}"; }
37 ];
38 };
39 };
40 flake = {
41 inherit (mypackages) mylibs sources overlays;
42 inherit (flakes) subflakes;
43 };
44 });
45 }