This repository has been archived by the owner on May 4, 2024. It is now read-only.
forked from the-argus/spicetify-nix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
99 lines (90 loc) · 2.57 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
{
description = "A nix flake that provides a home-manager module to configure spicetify with.";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs =
{ self, nixpkgs }:
let
forSupportedSystems = nixpkgs.lib.genAttrs [
"x86_64-linux"
"aarch64-linux"
];
nixpkgsFor = forSupportedSystems (
system:
import nixpkgs {
inherit system;
config.allowUnfree = true;
}
);
in
{
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.";
};
libs = forSupportedSystems (
system:
let
pkgs = nixpkgsFor.${system};
in
pkgs.callPackage ./lib { }
);
packages = forSupportedSystems (
system:
let
pkgs = nixpkgsFor.${system};
in
{
default = self.packages.${system}.spicetify;
spicetify = pkgs.callPackage ./pkgs { };
}
);
spicePkgs = forSupportedSystems (
system:
let
pkgs = nixpkgsFor.${system};
in
pkgs.callPackage ./pkgs { }
);
checks = forSupportedSystems (
system:
let
pkgs = nixpkgsFor.${system};
in
{
default = self.checks.${system}.all-tests;
all-tests = pkgs.callPackage ./tests { };
all-themes = pkgs.callPackage ./tests/all-for-theme.nix { };
all-exts-and-apps = builtins.mapAttrs (_: value: self.checks.${system}.all-for-theme value) (
builtins.removeAttrs (pkgs.callPackage ./pkgs { }).themes [
"override"
"overrideDerivation"
]
);
minimal-config = pkgs.callPackage ./tests/minimal-config.nix { };
apps = pkgs.callPackage ./tests/apps.nix { };
}
);
devShells = forSupportedSystems (
system:
let
pkgs = nixpkgsFor.${system};
in
{
default = pkgs.mkShell { packages = [ pkgs.nvfetcher ]; };
}
);
};
}