forked from the-argus/spicetify-nix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
111 lines (99 loc) · 2.96 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
107
108
109
110
111
{
description = "A nix flake that provides a home-manager module to configure spicetify with.";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = {
self,
nixpkgs,
flake-utils,
...
}:
{
homeManagerModules = {
spicetify = (import ./module.nix) {
isNixOSModule = false;
};
default = self.homeManagerModules.spicetify;
};
nixosModules = {
spicetify = import ./module.nix {
isNixOSModule = true;
};
default = self.nixosModules.spicetify;
};
# nice aliases
homeManagerModule = self.homeManagerModules.default;
nixosModule = self.nixosModules.default;
templates.default = {
path = ./template;
description = "A basic home-manager configuration which installs spicetify with the Dribbblish theme.";
};
}
# legacy stuff thats just for x86_64 linux
// (
let
legacyPkgs = import nixpkgs {
config.allowUnfree = true;
system = flake-utils.lib.system.x86_64-linux;
};
in {
pkgs =
nixpkgs.lib.warn
"spicetify-nix.pkgs is deprecated, use spicetify-nix.packages.\${pkgs.system}"
(legacyPkgs.callPackage ./pkgs {});
lib =
nixpkgs.lib.warn
"spicetify-nix.lib is deprecated, use spicetify-nix.libs.\${pkgs.system}"
(legacyPkgs.callPackage ./lib {});
}
)
// flake-utils.lib.eachSystem
(
let
inherit (flake-utils.lib) system;
in [
system.aarch64-linux
system.x86_64-linux
]
)
(system: let
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
in {
libs = pkgs.callPackage ./lib {};
packages = {
spicetify = pkgs.callPackage ./pkgs {};
default = self.packages.${system}.spicetify;
};
checks = {
all-tests = pkgs.callPackage ./tests {};
minimal-config = pkgs.callPackage ./tests/minimal-config.nix {};
all-for-theme = pkgs.callPackage ./tests/all-for-theme.nix {};
apps = pkgs.callPackage ./tests/apps.nix {};
default = self.checks.${system}.all-tests;
all-exts-and-apps =
builtins.mapAttrs
(_: value: self.checks.${system}.all-for-theme value)
(builtins.removeAttrs
(pkgs.callPackage ./pkgs {}).themes
["override" "overrideDerivation"]);
};
formatter = pkgs.alejandra;
# DEPRECATED ---------------------------------------------------------------
pkgSets =
nixpkgs.lib.warn
"spicetify-nix.pkgSets is deprecated, use spicetify-nix.packages.\${pkgs.system}.default"
self.packages.${system}.default;
devShells = {
default = pkgs.mkShell {
packages = [
pkgs.nvfetcher
];
};
};
});
}