-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
92 lines (82 loc) · 2.1 KB
/
flake.nix
File metadata and controls
92 lines (82 loc) · 2.1 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
{
description = "NixOS configuration for nix-community CUDA infrastructure";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11-small";
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
devshell = {
url = "github:numtide/devshell";
inputs.nixpkgs.follows = "nixpkgs";
};
deploy-rs.url = "github:serokell/deploy-rs";
dnscontrol-nix = {
url = "git+https://codeberg.org/hu5ky/dnscontrol-nix.git";
inputs.nixpkgs.follows = "nixpkgs";
};
git-hooks-nix = {
url = "github:cachix/git-hooks.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{
self,
flake-parts,
nixpkgs,
...
}@inputs:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
imports = [
./dns.nix
./hosts
inputs.devshell.flakeModule
inputs.git-hooks-nix.flakeModule
];
perSystem =
{
pkgs,
lib,
config,
...
}:
{
pre-commit.settings.hooks = {
actionlint.enable = true;
nixfmt.enable = true;
};
devshells.default.packages = [
pkgs.sops
];
devShells.rust = pkgs.mkShell {
packages = [
pkgs.rustc
pkgs.cargo
pkgs.clippy
pkgs.rustfmt
]
++ lib.optional pkgs.stdenv.hostPlatform.isDarwin pkgs.libiconv;
};
packages = lib.packagesFromDirectoryRecursive {
inherit (pkgs) callPackage;
directory = ./packages;
};
checks = lib.mapAttrs' (name: lib.nameValuePair "package-${name}") config.packages;
};
};
}