generated from cosmic-utils/cosmic-app-template
-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathflake.nix
57 lines (51 loc) · 1.41 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
{
description = "A tweaking tool for the COSMIC desktop";
inputs = {
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
treefmt-nix = {
url = "github:numtide/treefmt-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
inputs:
let
inherit (inputs.nixpkgs) lib;
in
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"aarch64-linux"
"x86_64-linux"
];
imports = lib.optionals (inputs.treefmt-nix ? flakeModule) [ inputs.treefmt-nix.flakeModule ];
perSystem =
{ pkgs, self', ... }:
{
devShells.default = import ./shell.nix { inherit pkgs; };
packages = {
default = self'.packages.cosmic-ext-tweaks;
cosmic-ext-tweaks = import ./. { inherit pkgs; };
};
}
// lib.optionalAttrs (inputs.treefmt-nix ? flakeModule) {
treefmt.config = {
flakeCheck = true;
projectRootFile = "flake.nix";
programs = {
nixfmt = {
enable = true;
package = pkgs.nixfmt-rfc-style;
};
rustfmt = {
enable = true;
package = pkgs.rustfmt;
};
};
};
};
};
}