-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathflake.nix
106 lines (98 loc) · 2.74 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
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
{
description = "The Nixarr Media Server Nixos Module";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
nixpkgs-sonarr.url = "github:nixos/nixpkgs/328abff1f7a707dc8da8e802f724f025521793ea";
vpnconfinement.url = "github:Maroka-chan/VPN-Confinement";
website-builder.url = "github:rasmus-kirk/website-builder";
website-builder.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = {
nixpkgs,
nixpkgs-sonarr,
vpnconfinement,
website-builder,
self,
...
} @ inputs: let
# Systems supported
supportedSystems = [
"x86_64-linux" # 64-bit Intel/AMD Linux
"aarch64-linux" # 64-bit ARM Linux
"x86_64-darwin" # 64-bit Intel macOS
"aarch64-darwin" # 64-bit ARM macOS
];
# Helper to provide system-specific attributes
forAllSystems = f:
nixpkgs.lib.genAttrs supportedSystems (system:
f {
pkgs = import nixpkgs {inherit system;};
});
in {
nixosModules = {
default = {
imports = [./nixarr vpnconfinement.nixosModules.default];
config._module.args = {inherit nixpkgs-sonarr;};
};
};
devShells = forAllSystems ({pkgs}: {
default = pkgs.mkShell {
packages = with pkgs; [
alejandra
nixd
];
};
});
packages = forAllSystems ({pkgs}: let
website = website-builder.lib {
pkgs = pkgs;
src = "${self}";
headerTitle = "Nixarr";
standalonePages = [
{
title = "Nixarr - Media Server Nixos Module";
inputFile = ./README.md;
outputFile = "index.html";
}
];
includedDirs = ["docs"];
articleDirs = ["docs/wiki"];
navbar = [
{
title = "Home";
location = "/";
}
{
title = "Options";
location = "/nixos-options";
}
{
title = "Wiki";
location = "/wiki";
}
{
title = "Github";
location = "https://github.com/rasmus-kirk/nixarr";
}
];
favicons = {
# For all browsers
"16x16" = "/docs/img/favicons/16x16.png";
"32x32" = "/docs/img/favicons/32x32.png";
# For Google and Android
"48x48" = "/docs/img/favicons/48x48.png";
"192x192" = "/docs/img/favicons/192x192.png";
# For iPad
"167x167" = "/docs/img/favicons/167x167.png";
# For iPhone
"180x180" = "/docs/img/favicons/180x180.png";
};
nixosModules = ./nixarr;
};
in {
default = website.package;
debug = website.loop;
});
formatter = forAllSystems ({pkgs}: pkgs.alejandra);
};
}